diff --git a/rosmsg.cabal b/rosmsg.cabal
--- a/rosmsg.cabal
+++ b/rosmsg.cabal
@@ -1,5 +1,5 @@
 name:                rosmsg
-version:             0.5.0.0
+version:             0.5.1.0
 synopsis:            ROS message parser, render, TH
 description:         Please see README.md
 homepage:            https://github.com/RoboticsHS/rosmsg#readme
@@ -18,6 +18,7 @@
                      , Robotics.ROS.Msg.TH
                      , Robotics.ROS.Msg.MD5
                      , Robotics.ROS.Msg.Types
+                     , Robotics.ROS.Msg.Class
                      , Robotics.ROS.Msg.Parser
                      , Robotics.ROS.Msg.Render
   build-depends:       base                 >= 4.7    && < 5
@@ -26,9 +27,9 @@
                      , pureMD5              >= 2.1    && < 3
                      , attoparsec           >= 0.13   && < 1
                      , bytestring           >= 0.10   && < 1
-                     , lens-family          >= 1.2    && < 2
-                     , data-default         >= 0.5    && < 1
                      , template-haskell     >= 2.10   && < 2.12
+                     , lens-family-core     >= 1.2    && < 2
+                     , data-default-class
 
   other-modules:       Robotics.ROS.Msg.ROSArray
   default-language:    Haskell2010
diff --git a/src/Robotics/ROS/Msg.hs b/src/Robotics/ROS/Msg.hs
--- a/src/Robotics/ROS/Msg.hs
+++ b/src/Robotics/ROS/Msg.hs
@@ -23,16 +23,9 @@
 -- message representation given by parser can be used in TemplateHaskell codegen
 -- for native Haskell structures creation.
 --
--- >>> [rosmsgFrom|/opt/ros/jade/share/std_msgs/msg/Byte.msg|]
--- "[Variable (Simple RByte,\"data\")]"
---
--- >>> [rosmsgFrom|/opt/ros/jade/share/geometry_msgs/msg/Polygon.msg|]
--- "[Variable (Array (Custom \"Point32\"),\"points\")]"
---
 module Robotics.ROS.Msg (
   -- * ROS Message classes
-    Message(..)
-  , Stamped(..)
+    module Robotics.ROS.Msg.Class
   -- * Common used types
   -- ** Array-like
   , ROSFixedArray(..)
@@ -42,42 +35,6 @@
   , ROSTime
   ) where
 
-import Data.ByteString (ByteString)
-import Data.Binary (Binary)
-import Data.Word (Word32)
-import Data.Text (Text)
-
 import Robotics.ROS.Msg.ROSArray
 import Robotics.ROS.Msg.Types
-import Robotics.ROS.Msg.MD5
-
--- | Haskell native type for ROS message language described
--- data structure. Serialization guaranted by 'Binary' super
--- class. And no more is needed for transfer over socket.
-class Binary a => Message a where
-    -- | Get message type string, e.g. @std_msgs/Char@
-    getType   :: a -> Text
-
-    -- | Get message source
-    getSource :: a -> Text
-
-    -- | Get recurrent MD5 of message source
-    getDigest :: a -> MD5Digest
-
--- | Sometime ROS messages have a special @Header@ field.
--- It used for tracking package sequence, time stamping
--- and frame tagging. Headers is frequently field. The
--- 'Stamped' type class lifts header fields on the top
--- of message and abstracting of type.
-class Message a => Stamped a where
-    -- | Get sequence number
-    getSequence :: a -> Word32
-
-    -- | Set sequence number
-    setSequence :: Word32 -> a -> a
-
-    -- | Get timestamp of message
-    getStamp    :: a -> ROSTime
-
-    -- | Get frame of message
-    getFrame    :: a -> ByteString
+import Robotics.ROS.Msg.Class
diff --git a/src/Robotics/ROS/Msg/Class.hs b/src/Robotics/ROS/Msg/Class.hs
new file mode 100644
--- /dev/null
+++ b/src/Robotics/ROS/Msg/Class.hs
@@ -0,0 +1,53 @@
+-- |
+-- Module      :  Robotics.ROS.Msg.Class
+-- Copyright   :  Alexander Krupenkin 2016
+-- License     :  BSD3
+--
+-- Maintainer  :  mail@akru.me
+-- Stability   :  experimental
+-- Portability :  POSIX / WIN32
+--
+-- ROS message type class declaration.
+--
+module Robotics.ROS.Msg.Class (
+    Message(..)
+  , Stamped(..)
+  ) where
+
+import Robotics.ROS.Msg.Types (ROSTime)
+import Data.Digest.Pure.MD5 (MD5Digest)
+import Data.ByteString (ByteString)
+import Data.Binary (Binary)
+import Data.Word (Word32)
+import Data.Text (Text)
+
+-- | Haskell native type for ROS message language described
+-- data structure. Serialization guaranted by 'Binary' super
+-- class. And no more is needed for transfer over socket.
+class Binary a => Message a where
+    -- | Get message type string, e.g. @std_msgs/Char@
+    getType   :: a -> Text
+
+    -- | Get message source
+    getSource :: a -> Text
+
+    -- | Get recurrent MD5 of message source
+    getDigest :: a -> MD5Digest
+
+-- | Sometime ROS messages have a special @Header@ field.
+-- It used for tracking package sequence, time stamping
+-- and frame tagging. Headers is frequently field. The
+-- 'Stamped' type class lifts header fields on the top
+-- of message and abstracting of type.
+class Message a => Stamped a where
+    -- | Get sequence number
+    getSequence :: a -> Word32
+
+    -- | Set sequence number
+    setSequence :: Word32 -> a -> a
+
+    -- | Get timestamp of message
+    getStamp    :: a -> ROSTime
+
+    -- | Get frame of message
+    getFrame    :: a -> ByteString
diff --git a/src/Robotics/ROS/Msg/ROSArray.hs b/src/Robotics/ROS/Msg/ROSArray.hs
--- a/src/Robotics/ROS/Msg/ROSArray.hs
+++ b/src/Robotics/ROS/Msg/ROSArray.hs
@@ -20,9 +20,9 @@
   ) where
 
 import GHC.TypeLits (Nat, KnownNat, natVal)
+import Data.Default.Class (Default(..))
 import Data.Binary (Binary(..), Get)
 import Control.Monad (replicateM)
-import Data.Default (Default(..))
 import Data.Typeable (Typeable)
 import Data.Word (Word32)
 import Data.Data (Data)
diff --git a/src/Robotics/ROS/Msg/Render.hs b/src/Robotics/ROS/Msg/Render.hs
--- a/src/Robotics/ROS/Msg/Render.hs
+++ b/src/Robotics/ROS/Msg/Render.hs
@@ -12,7 +12,7 @@
 module Robotics.ROS.Msg.Render (
   -- * Lazy Text builder
     render
-  -- * Stric Text render
+  -- * Strict Text render
   , renderT
   ) where
 
diff --git a/src/Robotics/ROS/Msg/TH.hs b/src/Robotics/ROS/Msg/TH.hs
--- a/src/Robotics/ROS/Msg/TH.hs
+++ b/src/Robotics/ROS/Msg/TH.hs
@@ -10,6 +10,12 @@
 -- Template Haskell driven code generator from ROS message language
 -- to Haskell native representation.
 --
+-- >>> [rosmsgFrom|/opt/ros/jade/share/std_msgs/msg/Byte.msg|]
+-- "[Variable (Simple RByte,\"data\")]"
+--
+-- >>> [rosmsgFrom|/opt/ros/jade/share/geometry_msgs/msg/Polygon.msg|]
+-- "[Variable (Array (Custom \"Point32\"),\"points\")]"
+--
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE QuasiQuotes #-}
@@ -21,15 +27,14 @@
   , rosmsgFrom
   ) where
 
-import           Data.Attoparsec.Text.Lazy (Result(..))
 import           Data.Char (isAlphaNum, toLower)
+import           Data.Default.Class (def)
 import           Data.Maybe (catMaybes)
 import           Data.Text.Lazy (pack)
 import           Data.List (groupBy)
-import           Data.Default (def)
 import           Data.Monoid ((<>))
-import qualified Lens.Family2 as L
 import           Data.Text (Text)
+import qualified Lens.Family as L
 import qualified Data.Text as T
 
 import           Language.Haskell.TH.Quote
@@ -286,11 +291,11 @@
       , mkStamped
       , mkLenses
       ]
-  where Done _ msg = Parser.parse Parser.rosmsg (pack txt)
+  where Parser.Done _ msg = Parser.parse Parser.rosmsg (pack txt)
         mkDataName = mkName . drop 1 . last . groupBy (const isAlphaNum)
         msgRun n   = ($ (n, msg)) . uncurry
 
 -- | Simple parse ROS message and show
 quoteMsgExp :: String -> ExpQ
 quoteMsgExp txt = stringE (show msg)
-  where Done _ msg = Parser.parse Parser.rosmsg (pack txt)
+  where Parser.Done _ msg = Parser.parse Parser.rosmsg (pack txt)
