diff --git a/language-ats.cabal b/language-ats.cabal
--- a/language-ats.cabal
+++ b/language-ats.cabal
@@ -1,5 +1,5 @@
 name:                language-ats
-version:             0.3.0.2
+version:             0.3.0.4
 synopsis:            Parser and pretty-printer for ATS.
 description:         Parser and pretty-printer for [ATS](http://www.ats-lang.org/), written with Happy and Alex.
 license:             BSD3
@@ -33,11 +33,9 @@
                      , lens
                      , deepseq
                      , ansi-wl-pprint >= 0.6.8
-                     , composition-prelude >= 0.1.1.2
                      , recursion-schemes
-                     , ansi-terminal
-                     , unordered-containers
                      , composition-prelude
+                     , ansi-terminal
   default-language:    Haskell2010
   build-tools:         happy
                      , alex
diff --git a/src/Language/ATS.hs b/src/Language/ATS.hs
--- a/src/Language/ATS.hs
+++ b/src/Language/ATS.hs
@@ -41,6 +41,9 @@
                     -- * Error types
                     , ATSError
                     -- * Lenses
+                    , preF
+                    , expression
+                    , fun
                     , leaves
                     , constructorUniversals
                     , typeCall
diff --git a/src/Language/ATS/Lexer.x b/src/Language/ATS/Lexer.x
--- a/src/Language/ATS/Lexer.x
+++ b/src/Language/ATS/Lexer.x
@@ -20,7 +20,7 @@
                               , get_staload
                               ) where
 
-import Control.Composition
+import Data.Bool (bool)
 import Data.Data (Typeable, Data)
 import Control.DeepSeq (NFData)
 import GHC.Generics (Generic)
diff --git a/src/Language/ATS/Types.hs b/src/Language/ATS/Types.hs
--- a/src/Language/ATS/Types.hs
+++ b/src/Language/ATS/Types.hs
@@ -49,6 +49,9 @@
     , rewriteATS
     , rewriteDecl
     -- * Lenses
+    , preF
+    , expression
+    , fun
     , leaves
     , constructorUniversals
     , typeCall
@@ -56,9 +59,9 @@
     , comment
     ) where
 
-import           Control.Composition
 import           Control.DeepSeq          (NFData)
 import           Control.Lens
+import           Data.Function            (on)
 import           Data.Functor.Foldable    (ListF (Cons), ana, cata, embed, project)
 import           Data.Functor.Foldable.TH (makeBaseFunctor)
 import           Data.Maybe               (isJust)
@@ -86,7 +89,7 @@
 type SortArgs = Maybe [SortArg]
 
 -- | Declare something in a scope (a function, value, action, etc.)
-data Declaration = Func AlexPosn Function
+data Declaration = Func { pos :: AlexPosn, _fun :: Function }
                  | Impl [Arg] Implementation -- TODO do something better for implicit universals
                  | ProofImpl [Arg] Implementation
                  | Val Addendum (Maybe Type) Pattern Expression
@@ -329,14 +332,14 @@
 
 -- | A function declaration accounting for all keywords ATS uses to
 -- define them.
-data Function = Fun PreFunction
-              | Fn PreFunction
-              | Fnx PreFunction
-              | And PreFunction
-              | PrFun PreFunction
-              | PrFn PreFunction
-              | Praxi PreFunction
-              | CastFn PreFunction
+data Function = Fun { _preF :: PreFunction }
+              | Fn { _preF :: PreFunction }
+              | Fnx { _preF :: PreFunction }
+              | And { _preF :: PreFunction }
+              | PrFun { _preF :: PreFunction }
+              | PrFn { _preF :: PreFunction }
+              | Praxi { _preF :: PreFunction }
+              | CastFn { _preF :: PreFunction }
               deriving (Show, Eq, Generic, NFData)
 
 data StackFunction = StackF { stSig        :: String
@@ -353,7 +356,7 @@
                         , args          :: [Arg] -- ^ Actual function arguments
                         , returnType    :: Maybe Type -- ^ Return type
                         , termetric     :: Maybe StaticExpression -- ^ Optional termination metric
-                        , expression    :: Maybe Expression -- ^ Expression holding the actual function body (not present in static templates)
+                        , _expression   :: Maybe Expression -- ^ Expression holding the actual function body (not present in static templates)
                         }
                         deriving (Show, Eq, Generic, NFData)
 
@@ -363,6 +366,8 @@
 makeBaseFunctor ''Type
 makeLenses ''Leaf
 makeLenses ''Declaration
+makeLenses ''PreFunction
+makeLenses ''Function
 makeLenses ''Type
 
 rewriteDecl :: Declaration -> Declaration
