diff --git a/avers.cabal b/avers.cabal
--- a/avers.cabal
+++ b/avers.cabal
@@ -1,129 +1,106 @@
-name:                avers
-version:             0.0.15
-license:             GPL-3
-license-file:        LICENSE
-author:              Tomas Carnecky
-maintainer:          tomas.carnecky@gmail.com
-category:            Avers
-build-type:          Simple
-cabal-version:       >= 1.10
-
-synopsis:            empty
-description:         empty
-
-
+name: avers
+version: 0.0.16
+cabal-version: >=1.10
+build-type: Simple
+license: GPL-3
+license-file: LICENSE
+maintainer: tomas.carnecky@gmail.com
+synopsis: empty
+description:
+    empty
+category: Avers
+author: Tomas Carnecky
 extra-source-files:
     src/Avers/Metrics/Measurements.txt
 
-
 source-repository head
-    type:     git
+    type: git
     location: git://github.com/wereHamster/avers-haskell.git
 
-
 library
-    hs-source-dirs:   src
-    default-language: Haskell2010
-
-    ghc-options:
-        -Wall
-
-
-    -- For the time being everything is exported.
     exposed-modules:
         Avers
-      , Avers.Handle
-      , Avers.Index
-      , Avers.Metrics
-      , Avers.Metrics.Measurements
-      , Avers.Metrics.TH
-      , Avers.Patching
-      , Avers.Storage
-      , Avers.Storage.Backend
-      , Avers.Storage.Expressions
-      , Avers.TH
-      , Avers.Types
-      , Avers.Views
-
-
-    -- Standard dependencies, stuff that is or should be in the platform.
+        Avers.Handle
+        Avers.Index
+        Avers.Metrics
+        Avers.Metrics.Measurements
+        Avers.Metrics.TH
+        Avers.Patching
+        Avers.Storage
+        Avers.Storage.Backend
+        Avers.Storage.Expressions
+        Avers.TH
+        Avers.Types
+        Avers.Views
     build-depends:
-        aeson
-      , attoparsec
-      , base <= 9999
-      , bytestring
-      , clock
-      , containers
-      , filepath
-      , mtl
-      , network
-      , network-uri
-      , safe
-      , stm
-      , template-haskell
-      , text
-      , time
-      , unordered-containers
-      , vector
+        aeson >=1.0.1.0 && <1.1,
+        attoparsec >=0.13.1.0 && <0.14,
+        base >=4.9.0.0 && <4.10,
+        bytestring >=0.10.8.1 && <0.11,
+        clock >=0.7.2 && <0.8,
+        containers >=0.5.7.1 && <0.6,
+        filepath >=1.4.1.0 && <1.5,
+        mtl >=2.2.1 && <2.3,
+        network >=2.6.3.1 && <2.7,
+        network-uri >=2.6.1.0 && <2.7,
+        safe >=0.3.9 && <0.4,
+        stm >=2.4.4.1 && <2.5,
+        template-haskell >=2.11.0.0 && <2.12,
+        text >=1.2.2.1 && <1.3,
+        time >=1.6.0.1 && <1.7,
+        unordered-containers >=0.2.7.1 && <0.3,
+        vector >=0.11.0.0 && <0.12,
+        MonadRandom >=0.4.2.3 && <0.5,
+        base16-bytestring >=0.1.1.6 && <0.2,
+        cryptohash >=0.11.9 && <0.12,
+        inflections >=0.2.0.1 && <0.3,
+        resource-pool >=0.2.3.2 && <0.3,
+        rethinkdb-client-driver >=0.0.23 && <0.1,
+        scrypt >=0.5.0 && <0.6
+    default-language: Haskell2010
+    hs-source-dirs: src
+    ghc-options: -Wall
 
-    -- More exotic dependencies which people may not immediately recognize.
+test-suite spec
+    type: exitcode-stdio-1.0
+    main-is: Test.hs
     build-depends:
-        MonadRandom
-      , base16-bytestring
-      , cryptohash
-      , inflections
-      , resource-pool
-      , rethinkdb-client-driver
-      , scrypt
-
-
+        MonadRandom >=0.4.2.3 && <0.5,
+        aeson >=1.0.1.0 && <1.1,
+        attoparsec >=0.13.1.0 && <0.14,
+        avers >=0.0.16 && <0.1,
+        base >=4.9.0.0 && <4.10,
+        base16-bytestring >=0.1.1.6 && <0.2,
+        bytestring >=0.10.8.1 && <0.11,
+        containers >=0.5.7.1 && <0.6,
+        cryptohash >=0.11.9 && <0.12,
+        hspec >=2.2.3 && <2.3,
+        inflections >=0.2.0.1 && <0.3,
+        mtl >=2.2.1 && <2.3,
+        resource-pool >=0.2.3.2 && <0.3,
+        rethinkdb-client-driver >=0.0.23 && <0.1,
+        scrypt >=0.5.0 && <0.6,
+        stm >=2.4.4.1 && <2.5,
+        text >=1.2.2.1 && <1.3,
+        time >=1.6.0.1 && <1.7,
+        unordered-containers >=0.2.7.1 && <0.3,
+        vector >=0.11.0.0 && <0.12
+    default-language: Haskell2010
+    hs-source-dirs: test
 
 benchmark benchmark
-    hs-source-dirs:      benchmark
-    default-language:    Haskell2010
-
-    ghc-options:        -threaded -Wall -O2 -rtsopts
-
-    type:                exitcode-stdio-1.0
-    main-is:             Benchmark.hs
-
-    build-depends:
-        aeson
-      , avers
-      , base
-      , mtl
-      , criterion
-      , resource-pool
-      , rethinkdb-client-driver
-      , network-uri
-      , text
-
-
-test-suite spec
-    hs-source-dirs:      test
-    default-language:    Haskell2010
-
-    type:                exitcode-stdio-1.0
-    main-is:             Test.hs
-
+    type: exitcode-stdio-1.0
+    main-is: Benchmark.hs
     build-depends:
-        MonadRandom
-      , aeson
-      , attoparsec
-      , avers
-      , base
-      , base16-bytestring
-      , bytestring
-      , containers
-      , cryptohash
-      , hspec
-      , inflections
-      , mtl
-      , resource-pool
-      , rethinkdb-client-driver
-      , scrypt
-      , stm
-      , text
-      , time
-      , unordered-containers
-      , vector
+        aeson >=1.0.1.0 && <1.1,
+        avers >=0.0.16 && <0.1,
+        base >=4.9.0.0 && <4.10,
+        mtl >=2.2.1 && <2.3,
+        criterion >=1.1.1.0 && <1.2,
+        resource-pool >=0.2.3.2 && <0.3,
+        rethinkdb-client-driver >=0.0.23 && <0.1,
+        network-uri >=2.6.1.0 && <2.7,
+        text >=1.2.2.1 && <1.3
+    default-language: Haskell2010
+    hs-source-dirs: benchmark
+    ghc-options: -threaded -Wall -O2 -rtsopts
diff --git a/src/Avers/Metrics.hs b/src/Avers/Metrics.hs
--- a/src/Avers/Metrics.hs
+++ b/src/Avers/Metrics.hs
@@ -18,7 +18,7 @@
     end   <- liftIO $ getTime Monotonic
 
     reportMeasurement m
-        (fromIntegral (timeSpecAsNanoSecs (diffTimeSpec start end)) / 1000000000)
+        (fromIntegral (toNanoSecs (diffTimeSpec start end)) / 1000000000)
 
     return ret
 
diff --git a/src/Avers/Metrics/TH.hs b/src/Avers/Metrics/TH.hs
--- a/src/Avers/Metrics/TH.hs
+++ b/src/Avers/Metrics/TH.hs
@@ -64,7 +64,7 @@
     let metrics = toMetrics labels
 
     return
-        [ DataD [] (mkName "Measurement") [] (map genCon metrics) []
+        [ DataD [] (mkName "Measurement") [] Nothing (map genCon metrics) []
 
         , SigD (mkName "measurementLabels") (AppT (AppT ArrowT (ConT (mkName "Measurement"))) (AppT ListT $ AppT ListT (ConT ''Char)))
         , FunD (mkName "measurementLabels")
diff --git a/src/Avers/TH.hs b/src/Avers/TH.hs
--- a/src/Avers/TH.hs
+++ b/src/Avers/TH.hs
@@ -109,7 +109,7 @@
 
     let icxt = map (\tv -> AppT (ConT ''FromJSON) (VarT tv)) tyVars
     return
-        [ InstanceD icxt
+        [ InstanceD Nothing icxt
             (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars)))
             [ FunD 'parseJSON
                 [ Clause [VarP xN]
@@ -171,7 +171,7 @@
 
     let icxt = map (\tv -> AppT (ConT ''FromDatum) (VarT tv)) tyVars
     return
-        [ InstanceD icxt
+        [ InstanceD Nothing icxt
             (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars)))
             [ FunD 'parseDatum
                 [ Clause [VarP xN]
@@ -219,8 +219,8 @@
 getTyInfo typeN = do
     info <- reify typeN
     case info of
-        TyConI (DataD _ _ tvbs cons _)   -> pure (tvbs, getFieldNames =<< cons)
-        TyConI (NewtypeD _ _ tvbs con _) -> pure (tvbs, getFieldNames con)
+        TyConI (DataD _ _ tvbs _ cons _)   -> pure (tvbs, getFieldNames =<< cons)
+        TyConI (NewtypeD _ _ tvbs _ con _) -> pure (tvbs, getFieldNames con)
         _                                -> fail $
             "Avers.TH.getTyInfo: only simple data/newtype " ++
             "constructors are supported."
