diff --git a/Data/Geo/OSM/Accessor/Id.hs b/Data/Geo/OSM/Accessor/Id.hs
--- a/Data/Geo/OSM/Accessor/Id.hs
+++ b/Data/Geo/OSM/Accessor/Id.hs
@@ -5,8 +5,8 @@
 import Prelude hiding (id)
 
 class Id a where
-  id :: a -> String
+  id' :: a -> String
   setId :: String -> a -> a
 
   updateId :: (String -> String) -> a -> a
-  updateId = id `using` setId
+  updateId = id' `using` setId
diff --git a/Data/Geo/OSM/Accessor/NodeWayRelations.hs b/Data/Geo/OSM/Accessor/NodeWayRelations.hs
--- a/Data/Geo/OSM/Accessor/NodeWayRelations.hs
+++ b/Data/Geo/OSM/Accessor/NodeWayRelations.hs
@@ -21,13 +21,13 @@
   usingNwr = usingNwrs . map
 
   usingNode :: (Node -> Node) -> a -> a
-  usingNode f a = usingNwr (\p -> foldNodeWayRelation p (node' . f) way' relation') a
+  usingNode f = usingNwr (\p -> foldNodeWayRelation p (node' . f) way' relation')
 
   usingWay :: (Way -> Way) -> a -> a
-  usingWay f a = usingNwr (\p -> foldNodeWayRelation p node' (way' . f) relation') a
+  usingWay f = usingNwr (\p -> foldNodeWayRelation p node' (way' . f) relation')
 
   usingRelation :: (Relation -> Relation) -> a -> a
-  usingRelation f a = usingNwr (\p -> foldNodeWayRelation p node' way' (relation' . f)) a
+  usingRelation f = usingNwr (\p -> foldNodeWayRelation p node' way' (relation' . f))
 
 nodes :: (NodeWayRelations a) => a -> [Node]
 nodes k = nwrs k >>= \t -> foldNodeWayRelation t return (const []) (const [])
diff --git a/Data/Geo/OSM/Accessor/Tags.hs b/Data/Geo/OSM/Accessor/Tags.hs
--- a/Data/Geo/OSM/Accessor/Tags.hs
+++ b/Data/Geo/OSM/Accessor/Tags.hs
@@ -24,7 +24,7 @@
   usingTag = usingTags . map
 
   usingTag' :: ((String, String) -> (String, String)) -> a -> a
-  usingTag' f a = usingTag (\t -> uncurry tag (f (k t, v t))) a
+  usingTag' f = usingTag (\t -> uncurry tag (f (k t, v t)))
 
 tagMap :: (Tags a) => a -> M.Map String String
 tagMap = M.fromList . map (k &&& v) . tags
diff --git a/Data/Geo/OSM/GpxFile.hs b/Data/Geo/OSM/GpxFile.hs
--- a/Data/Geo/OSM/GpxFile.hs
+++ b/Data/Geo/OSM/GpxFile.hs
@@ -38,14 +38,14 @@
 instance XmlPickler GpxFile where
   xpickle = let b = xpWrapMaybe (\s -> case fmap toLower s of "true" -> Just True
                                                               "false" -> Just False
-                                                              _ -> Nothing, (fmap toLower) . show)
-            in xpElem "gpx_file" (xpWrap (\(id', name', lat', lon', user', public', pending', timestamp') -> gpxFile id' name' lat' lon' user' public' pending' timestamp', undefined) (xp8Tuple (xpAttr "id" xpText) (xpAttr "name" xpText) (xpAttr "lat" xpText) (xpAttr "lon" xpText) (xpAttr "user" xpText) (xpDefault False (b (xpAttr "public" xpText))) (xpDefault False (b (xpAttr "pending" xpText))) (xpAttr "timestamp" xpText)))
+                                                              _ -> Nothing, fmap toLower . show)
+            in xpElem "gpx_file" (xpWrap (\(id'', name', lat', lon', user', public', pending', timestamp') -> gpxFile id'' name' lat' lon' user' public' pending' timestamp', \(GpxFile id'' name' lat' lon' user' public' pending' timestamp') -> (id'', name', lat', lon', user', public', pending', timestamp')) (xp8Tuple (xpAttr "id" xpText) (xpAttr "name" xpText) (xpAttr "lat" xpText) (xpAttr "lon" xpText) (xpAttr "user" xpText) (xpDefault False (b (xpAttr "public" xpText))) (xpDefault False (b (xpAttr "pending" xpText))) (xpAttr "timestamp" xpText)))
 
 instance Show GpxFile where
   show = showPickled []
 
 instance Id GpxFile where
-  id (GpxFile x _ _ _ _ _ _ _) = x
+  id' (GpxFile x _ _ _ _ _ _ _) = x
   setId a (GpxFile _ b c d e f g h) = gpxFile a b c d e f g h
 
 instance Name GpxFile where
diff --git a/Data/Geo/OSM/NWRCommon.hs b/Data/Geo/OSM/NWRCommon.hs
--- a/Data/Geo/OSM/NWRCommon.hs
+++ b/Data/Geo/OSM/NWRCommon.hs
@@ -38,7 +38,7 @@
   show = showPickled []
 
 instance Id NWRCommon where
-  id (NWRCommon x _ _ _ _ _) = x
+  id' (NWRCommon x _ _ _ _ _) = x
   setId a (NWRCommon _ b c d e f) = nwrCommon a b c d e f
 
 instance Tags NWRCommon where
diff --git a/Data/Geo/OSM/Node.hs b/Data/Geo/OSM/Node.hs
--- a/Data/Geo/OSM/Node.hs
+++ b/Data/Geo/OSM/Node.hs
@@ -41,32 +41,32 @@
   setLon b (Node a _ c) = Node a b c
 
 instance Id Node where
-  id (Node _ _ x) = id x
+  id' (Node _ _ x) = id' x
   setId c (Node a b cc) = Node a b (nwrCommon c (tags cc) (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Tags Node where
   tags (Node _ _ x) = tags x
-  setTags c (Node a b cc) = Node a b (nwrCommon (id cc) c (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
+  setTags c (Node a b cc) = Node a b (nwrCommon (id' cc) c (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Changeset Node where
   changeset (Node _ _ x) = changeset x
-  setChangeset c (Node a b cc) = Node a b (nwrCommon (id cc) (tags cc) c (visible cc) (user cc, uid cc) (timestamp cc))
+  setChangeset c (Node a b cc) = Node a b (nwrCommon (id' cc) (tags cc) c (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Visible Node where
   visible (Node _ _ x) = visible x
-  setVisible c (Node a b cc) = Node a b (nwrCommon (id cc) (tags cc) (changeset cc) c (user cc, uid cc) (timestamp cc))
+  setVisible c (Node a b cc) = Node a b (nwrCommon (id' cc) (tags cc) (changeset cc) c (user cc, uid cc) (timestamp cc))
 
 instance User Node (Maybe String) where
   user (Node _ _ x) = user x
-  setUser c (Node a b cc) = Node a b (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (c, uid cc) (timestamp cc))
+  setUser c (Node a b cc) = Node a b (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (c, uid cc) (timestamp cc))
 
 instance Uid Node where
   uid (Node _ _ x) = uid x
-  setUid c (Node a b cc) = Node a b (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (user cc, c) (timestamp cc))
+  setUid c (Node a b cc) = Node a b (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (user cc, c) (timestamp cc))
 
 instance Timestamp Node (Maybe String) where
   timestamp (Node _ _ x) = timestamp x
-  setTimestamp c (Node a b cc) = Node a b (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (user cc, uid cc) c)
+  setTimestamp c (Node a b cc) = Node a b (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (user cc, uid cc) c)
 
 -- | Constructs a node with a lat, lon, id, list of tags, changeset, visible, user&uid and timestamp.
 node :: String -- ^ The @lat@ attribute.
diff --git a/Data/Geo/OSM/OSM.hs b/Data/Geo/OSM/OSM.hs
--- a/Data/Geo/OSM/OSM.hs
+++ b/Data/Geo/OSM/OSM.hs
@@ -16,10 +16,12 @@
                     interactsOSM'
                   ) where
 
+import Prelude hiding (mapM, foldr)
 import Text.XML.HXT.Arrow
 import Text.XML.HXT.Extras
-import Control.Monad
-import Data.List
+import Control.Monad hiding (mapM)
+import Data.Foldable
+import Data.Traversable
 import Data.Geo.OSM.OSMChildren
 import Data.Geo.OSM.Bound
 import Data.Geo.OSM.Bounds
@@ -27,39 +29,51 @@
 import Data.Geo.OSM.Accessor.Generator
 import Data.Geo.OSM.Accessor.BoundOrs
 import Data.Geo.OSM.Accessor.NodeWayRelations
+import Data.Monoid
 
 -- | The @osm@ element of a OSM file, which is the root element.
 data OSM = OSM String (Maybe String) (Maybe (Either Bound Bounds)) OSMChildren
   deriving Eq
 
 instance XmlPickler OSM where
-  xpickle = xpElem "osm" (xpWrap (\(version', generator', bound', nwr') -> osm version' generator' bound' nwr', \(OSM version' generator' bound' nwr') -> (version', generator', bound', nwr'))
-              (xp4Tuple (xpAttr "version" xpText)
-                        (xpOption (xpAttr "generator" xpText))
-                        (xpOption (xpAlt (either (const 0) (const 1)) [xpWrap (Left, \(Left b) -> b) xpickle, xpWrap (Right, \(Right b) -> b) xpickle]))
-                        xpickle))
+  xpickle =
+    xpElem "osm" (xpWrap (\(version', generator', bound', nwr') -> osm version' generator' bound' nwr', \(OSM version' generator' bound' nwr') -> (version', generator', bound', nwr'))
+      (xp4Tuple (xpAttr "version" xpText)
+                (xpOption (xpAttr "generator" xpText))
+                (xpOption (xpAlt (either (const 0) (const 1)) [xpWrap (Left, \(Left b) -> b) xpickle, xpWrap (Right, \(Right b) -> b) xpickle]))
+                xpickle))
 
 instance Show OSM where
-  show = showPickled []
+  show =
+    showPickled []
 
 instance Version OSM String where
-  version (OSM x _ _ _) = x
-  setVersion a (OSM _ b c d) = osm a b c d
+  version (OSM x _ _ _) =
+    x
+  setVersion a (OSM _ b c d) =
+    osm a b c d
 
 instance Generator OSM where
-  generator (OSM _ x _ _) = x
-  setGenerator b (OSM a _  c d) = osm a b c d
+  generator (OSM _ x _ _) =
+    x
+  setGenerator b (OSM a _  c d) =
+    osm a b c d
 
 instance BoundOrs OSM where
-  boundOrs (OSM _ _ x _) n b bs = case x of Nothing -> n
-                                            Just (Left b') -> b b'
-                                            Just (Right b') -> bs b'
-  setBoundOrs c (OSM a b _ d) = osm a b c d
+  boundOrs (OSM _ _ x _) n b bs =
+    case x
+    of Nothing -> n
+       Just (Left b') -> b b'
+       Just (Right b') -> bs b'
+  setBoundOrs c (OSM a b _ d) =
+    osm a b c d
 
 instance NodeWayRelations OSM where
-  nwrs (OSM _ _ _ x) = let t = const []
-                       in foldOSMChildren t t t t t id x
-  setNwrs d (OSM a b c _) = osm a b c (osmNodeWayRelation d)
+  nwrs (OSM _ _ _ x) =
+    let t = const []
+    in foldOSMChildren t t t t t id x
+  setNwrs d (OSM a b c _) =
+    osm a b c (osmNodeWayRelation d)
 
 -- | Constructs a osm with a version, bound or bounds, and node attributes and way or relation elements.
 osm :: String -- ^ The @version@ attribute.
@@ -70,81 +84,117 @@
 osm = OSM
 
 -- | Reads an OSM file into a list of @OSM@ values removing whitespace.
-readOsmFile :: FilePath -> IO [OSM]
-readOsmFile = runX . xunpickleDocument (xpickle :: PU OSM) [(a_remove_whitespace, v_1)]
+readOsmFile ::
+  FilePath
+  -> IO [OSM]
+readOsmFile =
+  runX . xunpickleDocument (xpickle :: PU OSM) [(a_remove_whitespace, v_1)]
 
 -- | Reads 0 or more OSM files into a list of @OSM@ values removing whitespace.
-readOsmFiles :: [FilePath] -> IO [OSM]
-readOsmFiles = fmap join . (mapM readOsmFile)
+readOsmFiles ::
+  [FilePath]
+  -> IO [OSM]
+readOsmFiles =
+  fmap join . mapM readOsmFile
 
 -- | Reads a OSM file, executes the given function on the XML, then writes the given file.
-interactOSMIO' :: Attributes -- ^ The options for reading the OSM file.
-                  -> FilePath -- ^ The OSM file to read.
-                  -> (OSM -> IO OSM) -- ^ The function to execute on the XML that is read.
-                  -> Attributes -- ^ The options for writing the OSM file.
-                  -> FilePath -- ^ The OSM file to write.
-                  -> IO ()
-interactOSMIO' froma from f toa to = runX (xunpickleDocument (xpickle :: PU OSM) froma from >>> arrIO f >>> xpickleDocument (xpickle :: PU OSM) toa to) >> return ()
+interactOSMIO' ::
+  (OSM -> IO OSM) -- ^ The function to execute on the XML that is read.
+  -> Attributes -- ^ The options for reading the OSM file.
+  -> FilePath -- ^ The OSM file to read.
+  -> Attributes -- ^ The options for writing the OSM file.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactOSMIO' f froma from toa to =
+  runX (xunpickleDocument (xpickle :: PU OSM) froma from >>> arrIO f >>> xpickleDocument (xpickle :: PU OSM) toa to) >> return ()
 
 -- | Reads a OSM file, executes the given functions on the XML, then writes the given file.
-interactsOSMIO' :: Attributes -- ^ The options for reading the OSM file.
-                   -> FilePath -- ^ The OSM file to read.
-                   -> [OSM -> IO OSM] -- ^ The function to execute on the XML that is read.
-                   -> Attributes -- ^ The options for writing the OSM file.
-                   -> FilePath -- ^ The OSM file to write.
-                   -> IO ()
-interactsOSMIO' froma from = interactOSMIO' froma from . sumIO'
+interactsOSMIO' ::
+  Foldable t =>
+  t (OSM -> IO OSM) -- ^ The function to execute on the XML that is read.
+  -> Attributes -- ^ The options for reading the OSM file.
+  -> FilePath -- ^ The OSM file to read.
+  -> Attributes -- ^ The options for writing the OSM file.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactsOSMIO' =
+  interactOSMIO' . sumM
 
 -- | Reads a OSM file removing whitespace, executes the given function on the XML, then writes the given file with indentation.
-interactOSMIO :: FilePath -- ^ The OSM file to read.
-                 -> (OSM -> IO OSM) -- ^ The function to execute on the XML that is read.
-                 -> FilePath -- ^ The OSM file to write.
-                 -> IO ()
-interactOSMIO from f = interactOSMIO' [(a_remove_whitespace, v_1)] from f [(a_indent, v_1)]
+interactOSMIO ::
+  (OSM -> IO OSM) -- ^ The function to execute on the XML that is read.
+  -> FilePath -- ^ The OSM file to read.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactOSMIO f from =
+  interactOSMIO' f [(a_remove_whitespace, v_1)] from [(a_indent, v_1)]
 
 -- | Reads a OSM file removing whitespace, executes the given functions on the XML, then writes the given file with indentation.
-interactsOSMIO :: FilePath -- ^ The OSM file to read.
-                  -> [OSM -> IO OSM] -- ^ The function to execute on the XML that is read.
-                  -> FilePath -- ^ The OSM file to write.
-                  -> IO ()
-interactsOSMIO from = interactOSMIO from . sumIO'
+interactsOSMIO ::
+  Foldable t =>
+  t (OSM -> IO OSM) -- ^ The function to execute on the XML that is read.
+  -> FilePath -- ^ The OSM file to read.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactsOSMIO =
+  interactOSMIO . sumM
 
 -- | Reads a OSM file, executes the given function on the XML, then writes the given file.
-interactOSM' :: Attributes -- ^ The options for reading the OSM file.
-                -> FilePath -- ^ The OSM file to read.
-                -> (OSM -> OSM) -- ^ The function to execute on the XML that is read.
-                -> Attributes -- ^ The options for writing the OSM file.
-                -> FilePath -- ^ The OSM file to write.
-                -> IO ()
-interactOSM' froma from f = interactOSMIO' froma from (return . f)
+interactOSM' ::
+  (OSM -> OSM) -- ^ The function to execute on the XML that is read.
+  -> Attributes -- ^ The options for reading the OSM file.
+  -> FilePath -- ^ The OSM file to read.
+  -> Attributes -- ^ The options for writing the OSM file.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactOSM' f =
+  interactOSMIO' (return . f)
 
 -- | Reads a OSM file, executes the given functions on the XML, then writes the given file.
-interactsOSM' :: Attributes -- ^ The options for reading the OSM file.
-                 -> FilePath -- ^ The OSM file to read.
-                 -> [OSM -> OSM] -- ^ The functions to execute on the XML that is read.
-                 -> Attributes -- ^ The options for writing the OSM file.
-                 -> FilePath -- ^ The OSM file to write.
-                 -> IO ()
-interactsOSM' froma from = interactOSM' froma from . sum'
+interactsOSM' ::
+  Foldable t =>
+  t (OSM -> OSM) -- ^ The functions to execute on the XML that is read.
+  -> Attributes -- ^ The options for reading the OSM file.
+  -> FilePath -- ^ The OSM file to read.
+  -> Attributes -- ^ The options for writing the OSM file.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactsOSM' =
+  interactOSM' . sum'
 
 -- | Reads a OSM file removing whitespace, executes the given function on the XML, then writes the given file with indentation.
-interactOSM :: FilePath -- ^ The OSM file to read.
-               -> (OSM -> OSM) -- ^ The function to execute on the XML that is read.
-               -> FilePath -- ^ The OSM file to write.
-               -> IO ()
-interactOSM from f = interactOSMIO from (return . f)
+interactOSM ::
+  (OSM -> OSM) -- ^ The function to execute on the XML that is read.
+  -> FilePath -- ^ The OSM file to read.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactOSM f =
+  interactOSMIO (return . f)
 
 -- | Reads a OSM file removing whitespace, executes the given functions on the XML, then writes the given file with indentation.
-interactsOSM :: FilePath -- ^ The OSM file to read.
-                -> [OSM -> OSM] -- ^ The function to execute on the XML that is read.
-                -> FilePath -- ^ The OSM file to write.
-                -> IO ()
-interactsOSM from = interactOSM from . sum'
+interactsOSM ::
+  Foldable t =>
+  t (OSM -> OSM) -- ^ The function to execute on the XML that is read.
+  -> FilePath -- ^ The OSM file to read.
+  -> FilePath -- ^ The OSM file to write.
+  -> IO ()
+interactsOSM =
+  interactOSM . sum'
 
 -- not exported
 
-sum' :: [a -> a] -> a -> a
-sum' = foldl' (.) id
+sum' ::
+  Foldable t =>
+  t (a -> a)
+  -> a
+  -> a
+sum' =
+  appEndo . foldMap Endo
 
-sumIO' :: (Monad m) => [a -> m a] -> a -> m a
-sumIO' x = foldl' (>=>) return x
+sumM ::
+  (Monad m, Foldable t) =>
+  t (a -> m a)
+  -> a
+  -> m a
+sumM =
+  foldr (>=>) return
diff --git a/Data/Geo/OSM/Relation.hs b/Data/Geo/OSM/Relation.hs
--- a/Data/Geo/OSM/Relation.hs
+++ b/Data/Geo/OSM/Relation.hs
@@ -37,32 +37,32 @@
   setMembers a (Relation _ c) = Relation a c
 
 instance Id Relation where
-  id (Relation _ x) = id x
+  id' (Relation _ x) = id' x
   setId c (Relation a cc) = Relation a (nwrCommon c (tags cc) (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Tags Relation where
   tags (Relation _ x) = tags x
-  setTags c (Relation a cc) = Relation a (nwrCommon (id cc) c (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
+  setTags c (Relation a cc) = Relation a (nwrCommon (id' cc) c (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Changeset Relation where
   changeset (Relation _ x) = changeset x
-  setChangeset c (Relation a cc) = Relation a (nwrCommon (id cc) (tags cc) c (visible cc) (user cc, uid cc) (timestamp cc))
+  setChangeset c (Relation a cc) = Relation a (nwrCommon (id' cc) (tags cc) c (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Visible Relation where
   visible (Relation _ x) = visible x
-  setVisible c (Relation a cc) = Relation a (nwrCommon (id cc) (tags cc) (changeset cc) c (user cc, uid cc) (timestamp cc))
+  setVisible c (Relation a cc) = Relation a (nwrCommon (id' cc) (tags cc) (changeset cc) c (user cc, uid cc) (timestamp cc))
 
 instance User Relation (Maybe String) where
   user (Relation _ x) = user x
-  setUser c (Relation a cc) = Relation a (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (c, uid cc) (timestamp cc))
+  setUser c (Relation a cc) = Relation a (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (c, uid cc) (timestamp cc))
 
 instance Uid Relation where
   uid (Relation _ x) = uid x
-  setUid c (Relation a cc) = Relation a (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (user cc, c) (timestamp cc))
+  setUid c (Relation a cc) = Relation a (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (user cc, c) (timestamp cc))
 
 instance Timestamp Relation (Maybe String) where
   timestamp (Relation _ x) = timestamp x
-  setTimestamp c (Relation a cc) = Relation a (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (user cc, uid cc) c)
+  setTimestamp c (Relation a cc) = Relation a (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (user cc, uid cc) c)
 
 -- | Constructs a relation with a list of members, id, list of tags, changeset, visible, user&uid and timestamp.
 relation :: [Member] -- ^ The list of members (@member@ elements).
diff --git a/Data/Geo/OSM/Way.hs b/Data/Geo/OSM/Way.hs
--- a/Data/Geo/OSM/Way.hs
+++ b/Data/Geo/OSM/Way.hs
@@ -37,32 +37,32 @@
   setNds a (Way _ c) = Way a c
 
 instance Id Way where
-  id (Way _ x) = id x
+  id' (Way _ x) = id' x
   setId c (Way a cc) = Way a (nwrCommon c (tags cc) (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Tags Way where
   tags (Way _ x) = tags x
-  setTags c (Way a cc) = Way a (nwrCommon (id cc) c (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
+  setTags c (Way a cc) = Way a (nwrCommon (id' cc) c (changeset cc) (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Changeset Way where
   changeset (Way _ x) = changeset x
-  setChangeset c (Way a cc) = Way a (nwrCommon (id cc) (tags cc) c (visible cc) (user cc, uid cc) (timestamp cc))
+  setChangeset c (Way a cc) = Way a (nwrCommon (id' cc) (tags cc) c (visible cc) (user cc, uid cc) (timestamp cc))
 
 instance Visible Way where
   visible (Way _ x) = visible x
-  setVisible c (Way a cc) = Way a (nwrCommon (id cc) (tags cc) (changeset cc) c (user cc, uid cc) (timestamp cc))
+  setVisible c (Way a cc) = Way a (nwrCommon (id' cc) (tags cc) (changeset cc) c (user cc, uid cc) (timestamp cc))
 
 instance User Way (Maybe String) where
   user (Way _ x) = user x
-  setUser c (Way a cc) = Way a (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (c, uid cc) (timestamp cc))
+  setUser c (Way a cc) = Way a (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (c, uid cc) (timestamp cc))
 
 instance Uid Way where
   uid (Way _ x) = uid x
-  setUid c (Way a cc) = Way a (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (user cc, c) (timestamp cc))
+  setUid c (Way a cc) = Way a (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (user cc, c) (timestamp cc))
 
 instance Timestamp Way (Maybe String) where
   timestamp (Way _ x) = timestamp x
-  setTimestamp c (Way a cc) = Way a (nwrCommon (id cc) (tags cc) (changeset cc) (visible cc) (user cc, uid cc) c)
+  setTimestamp c (Way a cc) = Way a (nwrCommon (id' cc) (tags cc) (changeset cc) (visible cc) (user cc, uid cc) c)
 
 -- | Constructs a way with a list of nds, id, list of tags, changeset, visible, user&uid and timestamp.
 way :: [Nd] -- ^ The list of nds (@nd@ elements).
diff --git a/OSM.cabal b/OSM.cabal
--- a/OSM.cabal
+++ b/OSM.cabal
@@ -1,89 +1,89 @@
-Name:                OSM
-Version:             0.4.1
-License:             BSD3
-License-File:        LICENSE
-Synopsis:            Parse OpenStreetMap files
-Description:         Parse OpenStreetMap http:\/\/osm.org/ files using HXT into data structures.
-                     The Data.Geo.OSM module is the core module that exports all others.
-Homepage:            http://code.google.com/p/geo-osm/
-Category:            Utils
-Author:              Tony Morris
-Maintainer:          code@tmorris.net
-Copyright:           2009 Tony Morris
-build-type:          Simple
-cabal-version:       >= 1.2
+Name:                 OSM
+Version:              0.5.0
+License:              BSD3
+License-File:         LICENSE
+Synopsis:             Parse OpenStreetMap files
+Description:          Parse OpenStreetMap http:\/\/osm.org/ files using HXT into data structures.
+                      The Data.Geo.OSM module is the core module that exports all others.
+Homepage:             http://code.google.com/p/geo-osm/
+Category:             Utils
+Author:               Tony Morris
+Maintainer:           ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ
+Copyright:            2009-2010 Tony Morris
+build-type:           Simple
+cabal-version:        >= 1.2
 
 Flag small_base
-  Description:     Choose the new, split-up base package.
+  Description:        Choose the new, split-up base package.
 
 Library
   if flag(small_base)
-    Build-Depends: base < 4 && >= 3, hxt, hxt-extras, containers
+    Build-Depends:    base < 5 && >= 3, hxt, hxt-extras, containers
   else
-    Build-Depends: base < 3, hxt, hxt-extras, containers
+    Build-Depends:    base < 5 && >= 3, hxt, hxt-extras, containers
 
-  GHC-Options:    -Wall
-  Exposed-Modules: Data.Geo.OSM
-                   Data.Geo.OSM.Api
-                   Data.Geo.OSM.Area
-                   Data.Geo.OSM.Bound
-                   Data.Geo.OSM.Bounds
-                   Data.Geo.OSM.ChangesetE
-                   Data.Geo.OSM.GpxFile
-                   Data.Geo.OSM.Home
-                   Data.Geo.OSM.Nd
-                   Data.Geo.OSM.Node
-                   Data.Geo.OSM.NodeWayRelation
-                   Data.Geo.OSM.NWRCommon
-                   Data.Geo.OSM.MemberType
-                   Data.Geo.OSM.Member
-                   Data.Geo.OSM.OSM
-                   Data.Geo.OSM.OSMChildren
-                   Data.Geo.OSM.Preferences
-                   Data.Geo.OSM.Relation
-                   Data.Geo.OSM.Tag
-                   Data.Geo.OSM.Tracepoints
-                   Data.Geo.OSM.UserE
-                   Data.Geo.OSM.VersionE
-                   Data.Geo.OSM.Way
-                   Data.Geo.OSM.Waynodes
-                   Data.Geo.OSM.Accessor.Accessor
-                   Data.Geo.OSM.Accessor.AccountCreated
-                   Data.Geo.OSM.Accessor.Ar
-                   Data.Geo.OSM.Accessor.BoundOrs
-                   Data.Geo.OSM.Accessor.Box
-                   Data.Geo.OSM.Accessor.Changeset
-                   Data.Geo.OSM.Accessor.DisplayName
-                   Data.Geo.OSM.Accessor.Generator
-                   Data.Geo.OSM.Accessor.Hm
-                   Data.Geo.OSM.Accessor.Id
-                   Data.Geo.OSM.Accessor.K
-                   Data.Geo.OSM.Accessor.Lat
-                   Data.Geo.OSM.Accessor.Lon
-                   Data.Geo.OSM.Accessor.Members
-                   Data.Geo.OSM.Accessor.Maximum
-                   Data.Geo.OSM.Accessor.Maxlat
-                   Data.Geo.OSM.Accessor.Maxlon
-                   Data.Geo.OSM.Accessor.Minimum
-                   Data.Geo.OSM.Accessor.Minlat
-                   Data.Geo.OSM.Accessor.Minlon
-                   Data.Geo.OSM.Accessor.Mtype
-                   Data.Geo.OSM.Accessor.Name
-                   Data.Geo.OSM.Accessor.Nds
-                   Data.Geo.OSM.Accessor.NodeWayRelations
-                   Data.Geo.OSM.Accessor.Origin
-                   Data.Geo.OSM.Accessor.Pending
-                   Data.Geo.OSM.Accessor.PerPage
-                   Data.Geo.OSM.Accessor.Public
-                   Data.Geo.OSM.Accessor.Ref
-                   Data.Geo.OSM.Accessor.Role
-                   Data.Geo.OSM.Accessor.Tags
-                   Data.Geo.OSM.Accessor.Timestamp
-                   Data.Geo.OSM.Accessor.Tpoints
-                   Data.Geo.OSM.Accessor.User
-                   Data.Geo.OSM.Accessor.Uid
-                   Data.Geo.OSM.Accessor.V
-                   Data.Geo.OSM.Accessor.Version
-                   Data.Geo.OSM.Accessor.Visible
-                   Data.Geo.OSM.Accessor.Wnodes
-                   Data.Geo.OSM.Accessor.Zoom
+  GHC-Options:        -Wall
+  Exposed-Modules:    Data.Geo.OSM
+                      Data.Geo.OSM.Api
+                      Data.Geo.OSM.Area
+                      Data.Geo.OSM.Bound
+                      Data.Geo.OSM.Bounds
+                      Data.Geo.OSM.ChangesetE
+                      Data.Geo.OSM.GpxFile
+                      Data.Geo.OSM.Home
+                      Data.Geo.OSM.Nd
+                      Data.Geo.OSM.Node
+                      Data.Geo.OSM.NodeWayRelation
+                      Data.Geo.OSM.NWRCommon
+                      Data.Geo.OSM.MemberType
+                      Data.Geo.OSM.Member
+                      Data.Geo.OSM.OSM
+                      Data.Geo.OSM.OSMChildren
+                      Data.Geo.OSM.Preferences
+                      Data.Geo.OSM.Relation
+                      Data.Geo.OSM.Tag
+                      Data.Geo.OSM.Tracepoints
+                      Data.Geo.OSM.UserE
+                      Data.Geo.OSM.VersionE
+                      Data.Geo.OSM.Way
+                      Data.Geo.OSM.Waynodes
+                      Data.Geo.OSM.Accessor.Accessor
+                      Data.Geo.OSM.Accessor.AccountCreated
+                      Data.Geo.OSM.Accessor.Ar
+                      Data.Geo.OSM.Accessor.BoundOrs
+                      Data.Geo.OSM.Accessor.Box
+                      Data.Geo.OSM.Accessor.Changeset
+                      Data.Geo.OSM.Accessor.DisplayName
+                      Data.Geo.OSM.Accessor.Generator
+                      Data.Geo.OSM.Accessor.Hm
+                      Data.Geo.OSM.Accessor.Id
+                      Data.Geo.OSM.Accessor.K
+                      Data.Geo.OSM.Accessor.Lat
+                      Data.Geo.OSM.Accessor.Lon
+                      Data.Geo.OSM.Accessor.Members
+                      Data.Geo.OSM.Accessor.Maximum
+                      Data.Geo.OSM.Accessor.Maxlat
+                      Data.Geo.OSM.Accessor.Maxlon
+                      Data.Geo.OSM.Accessor.Minimum
+                      Data.Geo.OSM.Accessor.Minlat
+                      Data.Geo.OSM.Accessor.Minlon
+                      Data.Geo.OSM.Accessor.Mtype
+                      Data.Geo.OSM.Accessor.Name
+                      Data.Geo.OSM.Accessor.Nds
+                      Data.Geo.OSM.Accessor.NodeWayRelations
+                      Data.Geo.OSM.Accessor.Origin
+                      Data.Geo.OSM.Accessor.Pending
+                      Data.Geo.OSM.Accessor.PerPage
+                      Data.Geo.OSM.Accessor.Public
+                      Data.Geo.OSM.Accessor.Ref
+                      Data.Geo.OSM.Accessor.Role
+                      Data.Geo.OSM.Accessor.Tags
+                      Data.Geo.OSM.Accessor.Timestamp
+                      Data.Geo.OSM.Accessor.Tpoints
+                      Data.Geo.OSM.Accessor.User
+                      Data.Geo.OSM.Accessor.Uid
+                      Data.Geo.OSM.Accessor.V
+                      Data.Geo.OSM.Accessor.Version
+                      Data.Geo.OSM.Accessor.Visible
+                      Data.Geo.OSM.Accessor.Wnodes
+                      Data.Geo.OSM.Accessor.Zoom
