diff --git a/Data/Aeson/AutoType/CodeGen.hs b/Data/Aeson/AutoType/CodeGen.hs
--- a/Data/Aeson/AutoType/CodeGen.hs
+++ b/Data/Aeson/AutoType/CodeGen.hs
@@ -31,6 +31,7 @@
   ,"{-# LANGUAGE RecordWildCards     #-}"
   ,"{-# LANGUAGE OverloadedStrings   #-}"
   ,"{-# LANGUAGE TypeOperators       #-}"
+  ,"{-# LANGUAGE DeriveGeneric       #-}"
   ,""
   ,Text.concat ["module ", capitalize moduleName, " where"]
   ,""
@@ -45,6 +46,7 @@
   ,"                            (.:), (.:?), (.!=), (.=), object)"
   ,"import           Data.Text (Text)"
   ,"import           Data.Aeson.TH" 
+  ,"import           GHC.Generics" 
   ,""]
 
 epilogue :: Text
diff --git a/Data/Aeson/AutoType/Format.hs b/Data/Aeson/AutoType/Format.hs
--- a/Data/Aeson/AutoType/Format.hs
+++ b/Data/Aeson/AutoType/Format.hs
@@ -1,5 +1,8 @@
-{-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-}
-{-# LANGUAGE ViewPatterns, OverloadedStrings #-}
+{-# LANGUAGE TemplateHaskell     #-}
+{-# LANGuaGE ScopedTypeVariables #-}
+{-# LANGUAGE ViewPatterns        #-}
+{-# LANGUAGE OverloadedStrings   #-}
+{-# LANGuaGE DeriveGeneric       #-}
 module Data.Aeson.AutoType.Format(
   displaySplitTypes, splitTypeByLabel, unificationCandidates,
   unifyCandidates
@@ -10,12 +13,8 @@
 import           Control.Lens
 import           Control.Monad             (forM)
 import           Control.Exception(assert)
---import qualified Data.ByteString.Lazy.Char8 as BSL
 import qualified Data.HashMap.Strict        as Map
 import qualified Data.Set                   as Set
---import qualified Data.Vector                as V
---import           Data.Aeson
---import           Data.Aeson.Types
 import qualified Data.Text                  as Text
 import           Data.Text                 (Text)
 import           Data.Set                  (Set )
@@ -24,6 +23,7 @@
 import           Control.Monad.State.Class
 import           Control.Monad.State.Strict(State, runState)
 import qualified Data.Graph          as Graph
+import           GHC.Generics              (Generic)
 
 import           Data.Aeson.AutoType.Type
 import           Data.Aeson.AutoType.Extract
@@ -35,7 +35,7 @@
 data DeclState = DeclState { _decls   :: [Text]
                            , _counter :: Int
                            }
-  deriving (Eq, Show, Ord)
+  deriving (Eq, Show, Ord, Generic)
 
 makeLenses ''DeclState
 
@@ -50,7 +50,7 @@
 tShow = Text.pack . show 
 
 wrapDecl ::  Text -> Text -> Text
-wrapDecl identifier contents = Text.unlines [header, contents, "  } deriving (Show,Eq)"]
+wrapDecl identifier contents = Text.unlines [header, contents, "  } deriving (Show,Eq,Generic)"]
                                             --,"\nderiveJSON defaultOptions ''" `Text.append` identifier]
   where
     header = Text.concat ["data ", identifier, " = ", identifier, " { "]
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,9 @@
 Changelog
 =========
+    0.2.5.4  Dec 2014
+
+        * Relaxed upper bounds for new lens.
+
     0.2.5.3  Dec 2014
 
         * Relaxed upper bounds again.
diff --git a/json-autotype.cabal b/json-autotype.cabal
--- a/json-autotype.cabal
+++ b/json-autotype.cabal
@@ -1,6 +1,6 @@
 -- Build information for the package.
 name:                json-autotype
-version:             0.2.5.3
+version:             0.2.5.4
 synopsis:            Automatic type declaration for JSON input data
 description:         Generates datatype declarations with Aeson's "FromJSON" instances
                      from a set of example ".json" files.
@@ -32,7 +32,7 @@
 extra-source-files:  README.md changelog.md
 cabal-version:       >=1.10
 bug-reports:         https://github.com/mgajda/json-autotype/issues
-tested-with:         GHC==7.6.3,GHC==7.8.3
+tested-with:         GHC==7.6.3,GHC==7.8.4
 
 source-repository head
   type:     git
@@ -58,14 +58,13 @@
                        Data.Aeson.AutoType.Util
   build-depends:       base                 >=4.3  && <4.9,
                        GenericPretty        >=1.2  && <1.3,
-                       MissingH             >=1.2  && <1.4,
                        aeson                >=0.7  && <0.9,
                        bytestring           >=0.9  && <0.11,
                        containers           >=0.3  && <0.6,
                        filepath             >=1.3  && <1.4,
                        hashable             >=1.2  && <1.3,
                        hflags               >=0.4  && <0.5,
-                       lens                 >=4.1  && <4.7,
+                       lens                 >=4.1  && <4.8,
                        mtl                  >=2.1  && <2.3,
                        pretty               >=1.1  && <1.3,
                        process              >=1.2  && <1.4,
@@ -89,14 +88,13 @@
                        RecordWildCards
   build-depends:       base                 >=4.3  && <4.9,
                        GenericPretty        >=1.2  && <1.3,
-                       MissingH             >=1.2  && <1.4,
                        aeson                >=0.7  && <0.9,
                        bytestring           >=0.9  && <0.11,
                        containers           >=0.3  && <0.6,
                        filepath             >=1.3  && <1.4,
                        hashable             >=1.2  && <1.3,
                        hflags               >=0.4  && <0.5,
-                       lens                 >=4.1  && <4.7,
+                       lens                 >=4.1  && <4.8,
                        mtl                  >=2.1  && <2.3,
                        pretty               >=1.1  && <1.3,
                        process              >=1.2  && <1.4,
