diff --git a/Control/Compilation.hs b/Control/Compilation.hs
--- a/Control/Compilation.hs
+++ b/Control/Compilation.hs
@@ -19,22 +19,13 @@
 ----------------------------------------------------------------
 -- | Data types, class declarations, and class memberships.
 
-type FreshIndex = Integer
-type Indentation = String
-type ModuleName = String
-type NestingDepth = Integer
-
-data State a =
-  State
-    FreshIndex
-    Indentation
-    (Maybe ModuleName)
-    NestingDepth
-    a     -- State data structure.
-
 class StateExtension a where
   initial :: a
 
+-- | State data structure wrapper.
+data State a =
+  State a
+  
 type Compile a b = Compilation a b
 data Compilation a b = 
     Compilation (State a -> (State a, b))
@@ -63,19 +54,19 @@
 -- | Generic combinators and functions.
 
 extract :: StateExtension a => Compilation a b -> a
-extract (Compilation c) = let (State _ _ _ _ r, _) = c (State 0 "" Nothing 0 initial) in r
+extract (Compilation c) = let (State e, _) = c (State initial) in e
 
 extractFromState :: StateExtension a => a -> Compilation a b -> a
-extractFromState s (Compilation c) = let (State _ _ _ _ r, _) = c (State 0 "" Nothing 0 s) in r
+extractFromState s (Compilation c) = let (State e, _) = c (State s) in e
 
 nothing :: Compilation a ()
 nothing = Compilation $ \s -> (s, ())
 
 get :: StateExtension a => Compilation a a
-get = Compilation $ \(State f i m n s) -> (State f i m n s, s)
+get = Compilation $ \(State e) -> (State e, e)
 
 set :: StateExtension a => a -> Compilation a ()
-set s = Compilation $ \(State f i m n _) -> (State f i m n s, ())
+set e = Compilation $ \(State _) -> (State e, ())
 
 error :: String -> Compilation a ()
 error err = Error err
diff --git a/Control/Compilation/Environment.hs b/Control/Compilation/Environment.hs
--- a/Control/Compilation/Environment.hs
+++ b/Control/Compilation/Environment.hs
@@ -15,6 +15,7 @@
 --
 
 {-# LANGUAGE MultiParamTypeClasses, ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
 
 module Control.Compilation.Environment
   where
@@ -22,50 +23,53 @@
 import Control.Compilation
 
 ----------------------------------------------------------------
--- | Type synonyms.
+-- | Type synonyms and class memberships.
 
-type Env a = [(String, a)]
+type StateExtensionEnv a = [(String, a)]
 
+instance StateExtension (StateExtensionEnv a) where
+  initial = []
+
 ----------------------------------------------------------------
 -- | State extension class definition.
 
-class StateExtension a => Environment a b where
-  project :: a -> Env b
-  inject :: Env b -> a -> a
+class StateExtension a => HasEnvironment a b where
+  project :: a -> StateExtensionEnv b
+  inject :: StateExtensionEnv b -> a -> a
 
   addEnv :: String -> b -> Compilation a ()
   addEnv v x =
     do s :: a <- get
-       env :: Env b <- return $ project s
+       env :: StateExtensionEnv b <- return $ project s
        set $ inject ((v,x):env) s
 
   popEnv :: Compilation a ()
   popEnv =
     do s :: a <- get
-       env :: Env b <- return $ project s
+       env :: StateExtensionEnv b <- return $ project s
        set $ inject (tail env) s
 
   dropEnv :: Int -> Compilation a ()
   dropEnv n =
     do s :: a <- get
-       env :: Env b <- return $ project s
+       env :: StateExtensionEnv b <- return $ project s
        set $ inject (drop n env) s
 
   lookupEnv :: String -> Compilation a (Maybe b)
   lookupEnv v =
     do s :: a <- get
-       env :: Env b <- return $ project s
+       env :: StateExtensionEnv b <- return $ project s
        return $ lookup v env
 
-  setEnv :: Env b -> Compilation a ()
+  setEnv :: StateExtensionEnv b -> Compilation a ()
   setEnv env =
     do s :: a <- get
        set $ inject env s
 
-  getEnv :: Compilation a (Env b)
+  getEnv :: Compilation a (StateExtensionEnv b)
   getEnv =
     do s :: a <- get
-       env :: Env b <- return $ project s
+       env :: StateExtensionEnv b <- return $ project s
        return $ env
 
 --eof
diff --git a/Control/Compilation/Fresh.hs b/Control/Compilation/Fresh.hs
--- a/Control/Compilation/Fresh.hs
+++ b/Control/Compilation/Fresh.hs
@@ -14,18 +14,29 @@
 ----------------------------------------------------------------
 --
 
+{-# LANGUAGE TypeSynonymInstances #-}
+
 module Control.Compilation.Fresh
   where
 
 import Control.Compilation
 
 ----------------------------------------------------------------
+-- | Type synonyms and class memberships.
+
+type FreshIndex = Integer
+type StateExtensionFresh = FreshIndex
+
+instance StateExtension StateExtensionFresh where
+  initial = 0
+
+----------------------------------------------------------------
 -- | State extension class definition, including combinators
 --   and convenient synonyms.
 
-class StateExtension a => Fresh a where
-  project :: a -> Integer
-  inject :: Integer -> a -> a
+class StateExtension a => HasFresh a where
+  project :: a -> StateExtensionFresh
+  inject :: StateExtensionFresh -> a -> a
 
   freshInteger :: Compilation a Integer
   freshInteger =
@@ -62,5 +73,5 @@
   freshes_ prefix i =
     do ns <- mapM (\_ -> fresh) [0..i-1]
        return $ [prefix ++ show n | n <- ns]
-
+       
 --eof
diff --git a/Control/Compilation/Module.hs b/Control/Compilation/Module.hs
--- a/Control/Compilation/Module.hs
+++ b/Control/Compilation/Module.hs
@@ -13,17 +13,25 @@
 ----------------------------------------------------------------
 --
 
+{-# LANGUAGE TypeSynonymInstances #-}
+
 module Control.Compilation.Module
   where
 
 import Control.Compilation
 
 ----------------------------------------------------------------
+-- | Type synonyms and class memberships.
+
+type ModuleName = String
+type StateExtensionModule = ModuleName
+
+----------------------------------------------------------------
 -- | State extension class definition, including combinators.
 
-class StateExtension a => Module a where
-  project :: a -> String
-  inject :: String -> a -> a
+class StateExtension a => HasModule a where
+  project :: a -> StateExtensionModule
+  inject :: StateExtensionModule -> a -> a
 
   setModule :: String -> Compilation a ()
   setModule m =
diff --git a/Control/Compilation/Sequence.hs b/Control/Compilation/Sequence.hs
deleted file mode 100644
--- a/Control/Compilation/Sequence.hs
+++ /dev/null
@@ -1,53 +0,0 @@
-----------------------------------------------------------------
---
--- | Compilation
---   Monad and combinators for quickly assembling simple
---   compilers.
---
--- @Control\/Compilation\/Sequence.hs@
---
---   A generic compilation monad for quickly assembling simple
---   compilers for target languages that are primarily
---   sequences of instructions (possibly with nesting, e.g., 
---   loop constructs or procedures).
---
-
-----------------------------------------------------------------
---
-
-{-# LANGUAGE MultiParamTypeClasses, ScopedTypeVariables #-}
-
-module Control.Compilation.Sequence
-  where
-
-import Control.Compilation
-
-----------------------------------------------------------------
--- | State extension class definition, and combinators for
---   compiling into a sequence (possibly with nested blocks)
---   of instructions.
-
-class StateExtension a => Sequence a b where
-  project :: a -> [[b]]
-  inject :: [[b]] -> a -> a
-
-  nest :: [b] -> Compilation a ()
-  nest xs =
-    do s :: a <- get
-       xss :: [[b]] <- return $ project s
-       set $ inject (xs : xss) s
-
-  unnest :: Compilation a [b]
-  unnest =
-    do s :: a <- get
-       xs :: [[b]] <- return $ project s
-       set $ inject (tail $ xs) s
-       return $ head $ project s
-
-  depth :: Compilation a Integer
-  depth =
-    do s <- get
-       xss :: [[b]] <- return $ project s
-       return $ toInteger $ length xss
-
---eof
diff --git a/Control/Compilation/Sequences.hs b/Control/Compilation/Sequences.hs
new file mode 100644
--- /dev/null
+++ b/Control/Compilation/Sequences.hs
@@ -0,0 +1,62 @@
+----------------------------------------------------------------
+--
+-- | Compilation
+--   Monad and combinators for quickly assembling simple
+--   compilers.
+--
+-- @Control\/Compilation\/Sequences.hs@
+--
+--   A generic compilation monad for quickly assembling simple
+--   compilers for target languages that are primarily
+--   sequences of instructions (possibly with nesting, e.g., 
+--   loop constructs or procedures).
+--
+
+----------------------------------------------------------------
+--
+
+{-# LANGUAGE MultiParamTypeClasses, ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+
+module Control.Compilation.Sequences
+  where
+
+import Control.Compilation
+
+----------------------------------------------------------------
+-- | Type synonyms and class memberships.
+
+type StateExtensionSequences a = [[a]]
+
+instance StateExtension (StateExtensionSequences a) where
+  initial = []
+
+----------------------------------------------------------------
+-- | State extension class definition, and combinators for
+--   compiling into a sequence (possibly with nested blocks)
+--   of instructions.
+
+class StateExtension a => HasSequences a b where
+  project :: a -> StateExtensionSequences b
+  inject :: StateExtensionSequences b -> a -> a
+
+  nest :: [b] -> Compilation a ()
+  nest xs =
+    do s :: a <- get
+       xss :: StateExtensionSequences b <- return $ project s
+       set $ inject (xs : xss) s
+
+  unnest :: Compilation a [b]
+  unnest =
+    do s :: a <- get
+       xs :: StateExtensionSequences b <- return $ project s
+       set $ inject (tail $ xs) s
+       return $ head $ project s
+
+  depth :: Compilation a Integer
+  depth =
+    do s <- get
+       xss :: StateExtensionSequences b <- return $ project s
+       return $ toInteger $ length xss
+
+--eof
diff --git a/Control/Compilation/String.hs b/Control/Compilation/String.hs
--- a/Control/Compilation/String.hs
+++ b/Control/Compilation/String.hs
@@ -15,37 +15,78 @@
 ----------------------------------------------------------------
 --
 
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
 module Control.Compilation.String
   where
   
 import Control.Compilation
 
 ----------------------------------------------------------------
--- | Combinators and functions for compiling directly into a raw
---   ASCII string.
+-- | Type synonyms and class memberships.
 
-indent :: Compilation String ()
-indent = Compilation $ \(State f i m n s) -> (State f ("  " ++ i) m n s, ())
+type Indentation = Integer
+type StateExtensionString = (Indentation, String)
 
-unindent :: Compilation String ()
-unindent = Compilation $ \(State f i m n s) -> (State f (drop (min (length i) 2) i) m n s, ())
+instance StateExtension StateExtensionString where
+  initial = (0, "")
 
-space :: Compilation String ()
-space = Compilation $ \(State f i m n s) -> (State f i m n (s ++ " "), ())
+----------------------------------------------------------------
+-- | State extension class definition, including combinators
+--   and convenient synonyms for compiling directly into a raw
+--   ASCII string.
 
-spaces :: Int -> Compilation String ()
-spaces k = Compilation $ \(State f i m n s) -> (State f i m n (s ++ (take k $ repeat ' ')), ())
+class StateExtension a => HasString a where
+  project :: a -> StateExtensionString
+  inject :: StateExtensionString -> a -> a
+  
+  indent :: Compilation a ()
+  indent =
+    do state <- get
+       (i, s) <- return $ project state
+       set $ inject (i + 2, s) state
 
-newline :: Compilation String ()
-newline = Compilation $ \(State f i m n s) -> (State f i m n (s ++ "\n" ++ i), ())
+  unindent :: Compilation a ()
+  unindent =
+    do state <- get
+       (i, s) <- return $ project state
+       set $ inject (max 0 (i - 2), s) state
+   
+  space :: Compilation a ()
+  space =
+    do state <- get
+       (i, s) <- return $ project state
+       set $ inject (i, s ++ " ") state
 
-newlines :: Int -> Compilation String ()
-newlines k = Compilation $ \(State f i m n s) -> (State f i m n (s ++ (take k $ repeat '\n') ++ i), ())
+  spaces :: Int -> Compilation a ()
+  spaces k =
+    do state <- get
+       (i, s) <- return $ project state
+       set $ inject (i, s ++ (take k $ repeat ' ')) state
 
-string :: String -> Compilation String ()
-string s' = Compilation $ \(State f i m n s) -> (State f i m n (s ++ s'), ())
+  newline :: Compilation a ()
+  newline =
+    do state <- get
+       (i, s) <- return $ project state
+       set $ inject (i, s ++ "\n" ++ (take (fromInteger i) $ repeat ' ')) state
 
-raw :: String -> Compilation String ()
-raw = string
+  newlines :: Int -> Compilation a ()
+  newlines k =
+    do state <- get
+       (i, s) <- return $ project state
+       set $ inject (i, s ++ (take k $ repeat '\n') ++ (take (fromInteger i) $ repeat ' ')) state
+
+  string :: String -> Compilation a ()
+  string s' =
+    do state <- get
+       (i, s) <- return $ project state
+       set $ inject (i, s ++ s') state
+
+  raw :: String -> Compilation a ()
+  raw = string
+  
+  compiled :: Compilation a b -> String
+  compiled c = let (_, s) :: StateExtensionString = project (extract c) in s
 
 --eof
diff --git a/Control/Compilation/Tree.hs b/Control/Compilation/Tree.hs
deleted file mode 100644
--- a/Control/Compilation/Tree.hs
+++ /dev/null
@@ -1,27 +0,0 @@
-----------------------------------------------------------------
---
--- | Compilation
---   Monad and combinators for quickly assembling simple
---   compilers.
---
--- @Control\/Compilation\/Tree.hs@
---
---   A generic compilation monad for quickly assembling simple
---   compilers for target languages that are primarily
---   expression trees.
---
-
-----------------------------------------------------------------
---
-
-module Control.Compilation.Tree
-  where
-
-import Control.Compilation
-
-----------------------------------------------------------------
--- Combinator definitions.
-
-() = ()
-
---eof
diff --git a/Control/Compilation/Trees.hs b/Control/Compilation/Trees.hs
new file mode 100644
--- /dev/null
+++ b/Control/Compilation/Trees.hs
@@ -0,0 +1,28 @@
+----------------------------------------------------------------
+--
+-- | Compilation
+--   Monad and combinators for quickly assembling simple
+--   compilers.
+--
+-- @Control\/Compilation\/Trees.hs@
+--
+--   A generic compilation monad for quickly assembling simple
+--   compilers for target languages that are primarily
+--   expression trees.
+--
+
+----------------------------------------------------------------
+--
+
+module Control.Compilation.Trees
+  where
+
+import Control.Compilation
+
+----------------------------------------------------------------
+-- | State extension class definition, including combinators
+--   and convenient synonyms.
+
+() = ()
+
+--eof
diff --git a/compilation.cabal b/compilation.cabal
--- a/compilation.cabal
+++ b/compilation.cabal
@@ -1,5 +1,5 @@
 Name:              compilation
-Version:           0.0.0.2
+Version:           0.0.0.3
 Cabal-Version:     >= 1.6
 License:           GPL-3
 License-File:      LICENSE
@@ -16,8 +16,8 @@
                    Control.Compilation.Module,
                    Control.Compilation.Environment,
                    Control.Compilation.String,
-                   Control.Compilation.Sequence,
-                   Control.Compilation.Tree
+                   Control.Compilation.Sequences,
+                   Control.Compilation.Trees
   Build-Depends:   base >= 3 && < 5, MissingH
 
 Source-Repository head
