diff --git a/Data/CSum.hs b/Data/CSum.hs
--- a/Data/CSum.hs
+++ b/Data/CSum.hs
@@ -1,28 +1,30 @@
-{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, DeriveDataTypeable #-}
 module Data.CSum
 	( csum16
 	, CSum
 	, zeroCSum
 	) where
 
-import qualified Data.ByteString.Lazy as B
+import qualified Data.ByteString as B
 import Data.List (foldl')
 import Control.Monad (sequence)
-import Data.Binary
-import Data.Binary.Get
-import Data.Binary.Put
+import Data.Serialize
+import Data.Serialize.Get
+import Data.Serialize.Put
 import Data.Bits
+import Data.Data
+import Data.Word
 
-newtype CSum = CSum Word16 deriving (Eq, Ord, Show, Bounded, Num)
+newtype CSum = CSum Word16 deriving (Eq, Ord, Show, Read, Bounded, Num, Data, Typeable)
 
 csum16 :: B.ByteString -> CSum
 csum16 b = CSum $ foldl' ( (+) . complement) 0 words
   where
   words :: [Word16]
-  words = runGet (sequence $ replicate (fromIntegral $ B.length b `div` 4) getWord16be) b
+  (Right words) = runGet (sequence $ replicate (fromIntegral $ B.length b `div` 4) getWord16be) b
 {-# INLINE csum16 #-}
 
-instance Binary CSum where
+instance Serialize CSum where
 	put (CSum w) = putWord16be w
 	get = getWord16be >>= return . CSum
 
diff --git a/Data/Header.hs b/Data/Header.hs
--- a/Data/Header.hs
+++ b/Data/Header.hs
@@ -4,11 +4,11 @@
 	, L3Address (..)
 	) where
 
-import Data.Binary (encode, Binary)
-import qualified Data.ByteString.Lazy as B
+import Data.Serialize (encode, Serialize)
+import qualified Data.ByteString as B
 
 -- |A class of network headers that assumes a checksum is present.
-class (Num c,Binary h) => L3Header h a c | h -> a, a -> h, h -> c where
+class (Num c,Serialize h) => L3Header h a c | h -> a, a -> h, h -> c where
 	-- |Returns the checksum from the header
 	getChecksum :: h -> c
 
@@ -41,11 +41,11 @@
 	valid h = computeChecksum h == getChecksum h
 
 -- |A class of network addresses that assumes there is a 'broadcast' concept.
-class (Binary a) => L3Address a h | a -> h, h -> a where
+class (Serialize a) => L3Address a h | a -> h, h -> a where
 	localBroadcast :: a -> a
 	globalBroadcast :: a
 
-class (Binary h, Binary p) => L4Header h p | h -> p where
+class (Serialize h, Serialize p) => L4Header h p | h -> p where
 	fixChecksum :: (L3Header l3 a c) => h -> l3 -> h
 	srcPort	:: h -> p
 	dstPort :: h -> p
diff --git a/Data/IP.hs b/Data/IP.hs
--- a/Data/IP.hs
+++ b/Data/IP.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DisambiguateRecordFields, FlexibleInstances, MultiParamTypeClasses #-}
+{-# LANGUAGE DisambiguateRecordFields, FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable #-}
 {- |The Data.IP library exports IPv4 address and header structures.
 
    FIXME:
@@ -8,17 +8,20 @@
 	( IPv4(..)
 	, IPv4Header(..)
 	, IPv4Flag(..)
+	, IP
+	, IPHeader
 	, dummyIPv4Header
 	, module Data.IPv6
 	, ipv4
 	) where
 
-import Control.Monad (sequence, when)
-import qualified Data.ByteString.Lazy as B
-import Data.Binary
-import Data.Binary.Put
-import Data.Binary.Get
+import Control.Monad (sequence, when, liftM)
+import qualified Data.ByteString as B
+import Data.Serialize
+import Data.Serialize.Put
+import Data.Serialize.Get
 import Data.CSum
+import Data.Data
 import Data.List
 import Data.IPv6
 import Data.Header
@@ -28,16 +31,20 @@
 import qualified Text.ParserCombinators.Parsec as P
 import Text.ParserCombinators.Parsec.Prim
 
+type IP = Either IPv4 IPv6
+
+type IPHeader = Either IPv4Header IPv6Header
+
 -- |For IPv4 addresses.  The internal representation is a bytestring so
 -- use the pretty print 'ipv4' function as needed (instead of 'show').
-data IPv4 = IPv4 B.ByteString deriving (Eq, Ord, Show, Read)
+data IPv4 = IPv4 B.ByteString deriving (Eq, Ord, Show, Read, Data, Typeable)
 
-instance Binary IPv4 where
-	put (IPv4 b) = putLazyByteString b
-	get = getLazyByteString 4 >>= return . IPv4
+instance Serialize IPv4 where
+	put (IPv4 b) = putByteString b
+	get = liftM IPv4 (getByteString 4)
 
 -- |Don't fragment, more fragment and reserved flags
-data IPv4Flag = DF | MF | Res deriving (Eq, Ord, Show, Read)
+data IPv4Flag = DF | MF | Res deriving (Eq, Ord, Show, Read, Data, Typeable)
 
 instance Enum [IPv4Flag] where
 	fromEnum xs = foldl' (.|.) 0 $ map fromEnum1 xs
@@ -64,14 +71,14 @@
 		, checksum		:: CSum
 		, source		:: IPv4
 		, destination		:: IPv4
-	} deriving (Eq, Ord, Show)
+	} deriving (Eq, Ord, Show, Read, Data, Typeable)
 
 -- |A dummy header with zeroed fields except version, header length and TTL (255).
 dummyIPv4Header = IPv4Hdr 5 4 0 0 0 [] 0 255 0 0 ipv4zero ipv4zero
 
 ipv4zero = IPv4 (B.pack [0,0,0,0])
 
-instance Binary IPv4Header where
+instance Serialize IPv4Header where
   put (IPv4Hdr ihl ver tos len id flags off ttl prot csum src dst) = do
 	pW8 $ (ihl .&. 0xF) .|. (ver `shiftL` 4 .&. 0xF0)
 	pW8 tos
diff --git a/Data/IPv6.hs b/Data/IPv6.hs
--- a/Data/IPv6.hs
+++ b/Data/IPv6.hs
@@ -1,16 +1,18 @@
-{-# LANGUAGE DisambiguateRecordFields #-}
+{-# LANGUAGE DisambiguateRecordFields, DeriveDataTypeable #-}
 
 module Data.IPv6
 	( IPv6 (..)
+	, IPv6Header
 	, ipv6
 	) where
 
 import Control.Monad (sequence, when)
-import qualified Data.ByteString.Lazy as B
-import Data.Binary
-import Data.Binary.Put
-import Data.Binary.Get
+import qualified Data.ByteString as B
+import Data.Serialize
+import Data.Serialize.Put
+import Data.Serialize.Get
 import Data.Bits
+import Data.Data
 import Data.List (group)
 import Numeric (showHex, readHex)
 import Text.PrettyPrint
@@ -24,11 +26,11 @@
 pW16 = putWord16be . fromIntegral
 pW32 = putWord32be . fromIntegral
 
-data IPv6 = IPv6 B.ByteString deriving (Eq, Ord, Show, Read)
+data IPv6 = IPv6 B.ByteString deriving (Eq, Ord, Show, Read, Data, Typeable)
 
-instance Binary IPv6 where
-	put (IPv6 b) = putLazyByteString b
-	get = getLazyByteString 16 >>= return . IPv6
+instance Serialize IPv6 where
+	put (IPv6 b) = putByteString b
+	get = getByteString 16 >>= return . IPv6
 
 data IPv6Header =
 	IPv6Hdr { version		:: Int
@@ -39,9 +41,9 @@
 		, hopLimit		:: Int
 		, source		:: IPv6
 		, destination		:: IPv6
-	} deriving (Eq, Ord, Show)
+	} deriving (Eq, Ord, Show, Read, Data, Typeable)
 
-instance Binary IPv6Header where
+instance Serialize IPv6Header where
   put (IPv6Hdr ver tc fl len nh hop src dst) = do
 	let verTCFlow = (ver .&. 0xF `shiftL` 28) .|. (tc .&. 0xFF `shiftL` 20) .|. (fl .&. 0xFFFFF)
 	pW32 verTCFlow
@@ -63,9 +65,9 @@
 	dst <- get
 	return $ IPv6Hdr ver tc fl len nh hop src dst
 
-data IPv6Ext = E deriving (Eq, Ord, Show)
+data IPv6Ext = E deriving (Eq, Ord, Show, Read, Data, Typeable)
 
-instance Binary IPv6Ext where
+instance Serialize IPv6Ext where
 	get = return E
 	put _ = return ()
 
diff --git a/Data/TCP.hs b/Data/TCP.hs
--- a/Data/TCP.hs
+++ b/Data/TCP.hs
@@ -1,34 +1,36 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, DeriveDataTypeable #-}
 module Data.TCP
 	( TCPPort
 	, TCPHeader (..)
 	) where
 
-import Data.Binary
-import Data.Binary.Get
-import Data.Binary.Put
+import Data.Serialize
+import Data.Serialize.Get
+import Data.Serialize.Put
 import Data.CSum
 import Data.Bits
 import Data.List
+import Data.Data
+import Data.Word
 
-newtype TCPPort = TCPPort Word16 deriving (Eq, Ord, Show, Read, Num, Bounded)
+newtype TCPPort = TCPPort Word16 deriving (Eq, Ord, Show, Read, Num, Bounded, Data, Typeable)
 
-instance Binary TCPPort where
+instance Serialize TCPPort where
 	put (TCPPort p) = putWord16be p
 	get = getWord16be >>= return . TCPPort
 
-newtype SeqNumber = SN Word32 deriving (Eq, Ord, Show, Read, Num, Bounded)
-newtype AckNumber = AN Word32 deriving (Eq, Ord, Show, Read, Num, Bounded)
+newtype SeqNumber = SN Word32 deriving (Eq, Ord, Show, Read, Num, Bounded, Data, Typeable)
+newtype AckNumber = AN Word32 deriving (Eq, Ord, Show, Read, Num, Bounded, Data, Typeable)
 
-instance Binary SeqNumber where
+instance Serialize SeqNumber where
 	put (SN n) = putWord32be n
 	get = getWord32be >>= return . SN
 
-instance Binary AckNumber where
+instance Serialize AckNumber where
 	put (AN n) = putWord32be n
 	get = getWord32be >>= return . AN
 
-data TCPFlag = FIN | SYN | RST | PSH | ACK | URG | ECE | CWR deriving (Eq, Ord, Show, Enum)
+data TCPFlag = FIN | SYN | RST | PSH | ACK | URG | ECE | CWR deriving (Eq, Ord, Show, Read, Enum, Data, Typeable)
 
 instance Enum [TCPFlag] where
 	fromEnum fs = foldl' (+) 0 $ map (bit . fromEnum) fs
@@ -45,9 +47,9 @@
 		, windowSize	:: Int
 		, checksum	:: CSum
 		, urgentPtr	:: Int
-	} deriving (Eq, Ord, Show)
+	} deriving (Eq, Ord, Show, Read, Data, Typeable)
 
-instance Binary TCPHeader where
+instance Serialize TCPHeader where
 	put (TCPHdr s d seq ack dat res fs w c u) = do
 		put s
 		put d
diff --git a/Data/UDP.hs b/Data/UDP.hs
--- a/Data/UDP.hs
+++ b/Data/UDP.hs
@@ -1,18 +1,24 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving, MultiParamTypeClasses #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving, MultiParamTypeClasses, DeriveDataTypeable #-}
 module Data.UDP
 	( UDPPort(..)
 	, UDPHeader (..)
 	) where
 
-import Data.Binary
-import Data.Binary.Get
-import Data.Binary.Put
+import Data.Serialize
+import Data.Serialize.Get
+import Data.Serialize.Put
 import Data.CSum
 import Data.Header
+import Text.PrettyPrint.HughesPJClass
+import Data.Data
+import Data.Word
 
-newtype UDPPort = UDPPort Word16 deriving (Eq, Ord, Show, Read, Num, Bounded)
+newtype UDPPort = UDPPort Word16 deriving (Eq, Ord, Show, Read, Num, Bounded, Data, Typeable)
 
-instance Binary UDPPort where
+instance Pretty UDPPort where
+	pPrint (UDPPort p) = text (show p)
+
+instance Serialize UDPPort where
 	put (UDPPort p) = putWord16be p
 	get = getWord16be >>= return . UDPPort
 
@@ -21,9 +27,9 @@
 		, dstPort	:: UDPPort
 		, payloadLength :: Int
 		, checksum	:: CSum
-	} deriving (Eq, Ord, Show)
+	} deriving (Eq, Ord, Show, Read, Data, Typeable)
 
-instance Binary UDPHeader where
+instance Serialize UDPHeader where
 	put (UDPHdr s d l c) = do
 		put s
 		put d
diff --git a/network-data.cabal b/network-data.cabal
--- a/network-data.cabal
+++ b/network-data.cabal
@@ -1,5 +1,5 @@
 name:		network-data
-version:	0.1.0
+version:	0.2.0
 license:	BSD3
 license-file:	LICENSE
 author:		Thomas DuBuisson <thomas.dubuisson@gmail.com>
@@ -22,7 +22,7 @@
 Library
   Build-Depends: base >= 3 && < 5,
                    bytestring >= 0.9 && < 1.0,
-                   binary >= 0.5.0 && < 0.6.0,
+                   cereal >= 0.2 && < 0.4,
                    prettyclass >= 1.0.0.0 && < 1.1,
                    pretty >= 1.0.0 && < 1.1.0,
                    parsec >= 3 && < 4
