diff --git a/Data/Geo/OSM.hs b/Data/Geo/OSM.hs
--- a/Data/Geo/OSM.hs
+++ b/Data/Geo/OSM.hs
@@ -1,6 +1,5 @@
 -- | OpenStreetMap API v0.6 DTD <http://wiki.openstreetmap.org/wiki/API_v0.6/DTD>
 module Data.Geo.OSM(
-                module Text.XML.HXT.Arrow,
                 module Data.Geo.OSM.Api,
                 module Data.Geo.OSM.Area,
                 module Data.Geo.OSM.Bound,
@@ -64,7 +63,7 @@
               ) where
 
 
-import Text.XML.HXT.Arrow
+
 import Data.Geo.OSM.Api
 import Data.Geo.OSM.Area
 import Data.Geo.OSM.Bound
diff --git a/Data/Geo/OSM/Api.hs b/Data/Geo/OSM/Api.hs
--- a/Data/Geo/OSM/Api.hs
+++ b/Data/Geo/OSM/Api.hs
@@ -6,7 +6,7 @@
                          api
                        ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.VersionE
 import Data.Geo.OSM.Area
diff --git a/Data/Geo/OSM/Area.hs b/Data/Geo/OSM/Area.hs
--- a/Data/Geo/OSM/Area.hs
+++ b/Data/Geo/OSM/Area.hs
@@ -4,7 +4,7 @@
                           area
                         ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.Maximum
 
diff --git a/Data/Geo/OSM/Bound.hs b/Data/Geo/OSM/Bound.hs
--- a/Data/Geo/OSM/Bound.hs
+++ b/Data/Geo/OSM/Bound.hs
@@ -4,7 +4,7 @@
                       bound
                     ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.Box
 import Data.Geo.OSM.Accessor.Origin
diff --git a/Data/Geo/OSM/Bounds.hs b/Data/Geo/OSM/Bounds.hs
--- a/Data/Geo/OSM/Bounds.hs
+++ b/Data/Geo/OSM/Bounds.hs
@@ -4,7 +4,7 @@
                        bounds
                      ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.Minlat
 import Data.Geo.OSM.Accessor.Maxlat
diff --git a/Data/Geo/OSM/ChangesetE.hs b/Data/Geo/OSM/ChangesetE.hs
--- a/Data/Geo/OSM/ChangesetE.hs
+++ b/Data/Geo/OSM/ChangesetE.hs
@@ -4,7 +4,7 @@
                                 changesetE
                               ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Tag
 import Data.Geo.OSM.Accessor.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
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
+{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
 
 -- | The @gpx_file@ element of a OSM file.
 module Data.Geo.OSM.GpxFile(
@@ -6,7 +6,7 @@
                              gpxFile
                            ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Char
 import Data.Geo.OSM.Accessor.Id
@@ -33,12 +33,14 @@
      -> Bool -- ^ The @pending@ attribute.
      -> String -- ^ The @timestamp@ attribute.
      -> GpxFile
-gpxFile = GpxFile
+gpxFile =
+  GpxFile
 
 instance XmlPickler GpxFile where
-  xpickle = let b = xpWrapMaybe (\s -> case fmap toLower s of "true" -> Just True
-                                                              "false" -> Just False
-                                                              _ -> Nothing, fmap toLower . show)
+  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', \(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
diff --git a/Data/Geo/OSM/Home.hs b/Data/Geo/OSM/Home.hs
--- a/Data/Geo/OSM/Home.hs
+++ b/Data/Geo/OSM/Home.hs
@@ -4,7 +4,7 @@
                           home
                         ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.Lat
 import Data.Geo.OSM.Accessor.Lon
diff --git a/Data/Geo/OSM/Member.hs b/Data/Geo/OSM/Member.hs
--- a/Data/Geo/OSM/Member.hs
+++ b/Data/Geo/OSM/Member.hs
@@ -4,7 +4,7 @@
                        member
                      ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.MemberType
 import Data.Geo.OSM.Accessor.Mtype
diff --git a/Data/Geo/OSM/MemberType.hs b/Data/Geo/OSM/MemberType.hs
--- a/Data/Geo/OSM/MemberType.hs
+++ b/Data/Geo/OSM/MemberType.hs
@@ -7,7 +7,7 @@
                            relationType
                          ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Char
 
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
@@ -6,8 +6,8 @@
                           nwrCommon
                         ) where
 
-import Text.XML.HXT.Arrow
-import Text.XML.HXT.Extras
+import Control.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Control.Applicative
 import Data.Char
 import Data.Geo.OSM.Tag
diff --git a/Data/Geo/OSM/Nd.hs b/Data/Geo/OSM/Nd.hs
--- a/Data/Geo/OSM/Nd.hs
+++ b/Data/Geo/OSM/Nd.hs
@@ -4,7 +4,7 @@
                    nd
                  ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.Ref
 
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
@@ -6,7 +6,7 @@
                      node
                    ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.NWRCommon
 import Data.Geo.OSM.Tag
diff --git a/Data/Geo/OSM/NodeWayRelation.hs b/Data/Geo/OSM/NodeWayRelation.hs
--- a/Data/Geo/OSM/NodeWayRelation.hs
+++ b/Data/Geo/OSM/NodeWayRelation.hs
@@ -10,7 +10,7 @@
                                 isRelation
                               ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Node
 import Data.Geo.OSM.Way
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
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
+{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
 
 -- | The @osm@ element of a OSM file, which is the root element. <http://wiki.openstreetmap.org/wiki/API_v0.6/DTD>
 module Data.Geo.OSM.OSM(
@@ -17,7 +17,8 @@
                   ) where
 
 import Prelude hiding (mapM, foldr)
-import Text.XML.HXT.Arrow
+
+import Text.XML.HXT.Core
 import Text.XML.HXT.Extras
 import Control.Monad hiding (mapM)
 import Data.Foldable
@@ -81,14 +82,15 @@
        -> Maybe (Either Bound Bounds) -- ^ The @bound@ or @bounds@ elements.
        -> OSMChildren -- ^ The child elements.
        -> OSM
-osm = OSM
+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)]
+  runX . xunpickleDocument (xpickle :: PU OSM) ([withRemoveWS yes, withFileMimeType v_1]) -- FIXME v_1?
 
 -- | Reads 0 or more OSM files into a list of @OSM@ values removing whitespace.
 readOsmFiles ::
@@ -100,9 +102,9 @@
 -- | Reads a OSM file, executes the given function on the XML, then writes the given file.
 interactOSMIO' ::
   (OSM -> IO OSM) -- ^ The function to execute on the XML that is read.
-  -> Attributes -- ^ The options for reading the OSM file.
+  -> SysConfigList -- ^ The options for reading the OSM file.
   -> FilePath -- ^ The OSM file to read.
-  -> Attributes -- ^ The options for writing the OSM file.
+  -> SysConfigList -- ^ The options for writing the OSM file.
   -> FilePath -- ^ The OSM file to write.
   -> IO ()
 interactOSMIO' f froma from toa to =
@@ -112,9 +114,9 @@
 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.
+  -> SysConfigList -- ^ The options for reading the OSM file.
   -> FilePath -- ^ The OSM file to read.
-  -> Attributes -- ^ The options for writing the OSM file.
+  -> SysConfigList -- ^ The options for writing the OSM file.
   -> FilePath -- ^ The OSM file to write.
   -> IO ()
 interactsOSMIO' =
@@ -127,7 +129,7 @@
   -> FilePath -- ^ The OSM file to write.
   -> IO ()
 interactOSMIO f from =
-  interactOSMIO' f [(a_remove_whitespace, v_1)] from [(a_indent, v_1)]
+  interactOSMIO' f [withRemoveWS yes, withFileMimeType v_1] from [withIndent yes, withFileMimeType v_1]
 
 -- | Reads a OSM file removing whitespace, executes the given functions on the XML, then writes the given file with indentation.
 interactsOSMIO ::
@@ -142,9 +144,9 @@
 -- | Reads a OSM file, executes the given function on the XML, then writes the given file.
 interactOSM' ::
   (OSM -> OSM) -- ^ The function to execute on the XML that is read.
-  -> Attributes -- ^ The options for reading the OSM file.
+  -> SysConfigList -- ^ The options for reading the OSM file.
   -> FilePath -- ^ The OSM file to read.
-  -> Attributes -- ^ The options for writing the OSM file.
+  -> SysConfigList -- ^ The options for writing the OSM file.
   -> FilePath -- ^ The OSM file to write.
   -> IO ()
 interactOSM' f =
@@ -154,9 +156,9 @@
 interactsOSM' ::
   Foldable t =>
   t (OSM -> OSM) -- ^ The functions to execute on the XML that is read.
-  -> Attributes -- ^ The options for reading the OSM file.
+  -> SysConfigList -- ^ The options for reading the OSM file.
   -> FilePath -- ^ The OSM file to read.
-  -> Attributes -- ^ The options for writing the OSM file.
+  -> SysConfigList -- ^ The options for writing the OSM file.
   -> FilePath -- ^ The OSM file to write.
   -> IO ()
 interactsOSM' =
diff --git a/Data/Geo/OSM/OSMChildren.hs b/Data/Geo/OSM/OSMChildren.hs
--- a/Data/Geo/OSM/OSMChildren.hs
+++ b/Data/Geo/OSM/OSMChildren.hs
@@ -9,7 +9,7 @@
                                  foldOSMChildren
                                ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.UserE
 import Data.Geo.OSM.Preferences
diff --git a/Data/Geo/OSM/Preferences.hs b/Data/Geo/OSM/Preferences.hs
--- a/Data/Geo/OSM/Preferences.hs
+++ b/Data/Geo/OSM/Preferences.hs
@@ -4,7 +4,7 @@
                                  preferences
                                ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Tag
 import Data.Geo.OSM.Accessor.Tags
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
@@ -6,7 +6,7 @@
                          relation
                        ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Member
 import Data.Geo.OSM.NWRCommon
diff --git a/Data/Geo/OSM/Tag.hs b/Data/Geo/OSM/Tag.hs
--- a/Data/Geo/OSM/Tag.hs
+++ b/Data/Geo/OSM/Tag.hs
@@ -4,7 +4,8 @@
                     tag
                   ) where
 
-import Text.XML.HXT.Arrow
+
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.K
 import Data.Geo.OSM.Accessor.V
diff --git a/Data/Geo/OSM/Tracepoints.hs b/Data/Geo/OSM/Tracepoints.hs
--- a/Data/Geo/OSM/Tracepoints.hs
+++ b/Data/Geo/OSM/Tracepoints.hs
@@ -4,7 +4,8 @@
                                  tracepoints
                                ) where
 
-import Text.XML.HXT.Arrow
+
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.PerPage
 
diff --git a/Data/Geo/OSM/UserE.hs b/Data/Geo/OSM/UserE.hs
--- a/Data/Geo/OSM/UserE.hs
+++ b/Data/Geo/OSM/UserE.hs
@@ -4,7 +4,7 @@
                            userE
                          ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Home
 import Data.Geo.OSM.Accessor.Hm
diff --git a/Data/Geo/OSM/VersionE.hs b/Data/Geo/OSM/VersionE.hs
--- a/Data/Geo/OSM/VersionE.hs
+++ b/Data/Geo/OSM/VersionE.hs
@@ -4,7 +4,8 @@
                                versionE
                             ) where
 
-import Text.XML.HXT.Arrow
+
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.Minimum
 import Data.Geo.OSM.Accessor.Maximum
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
@@ -6,7 +6,7 @@
                     way
                   ) where
 
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Nd
 import Data.Geo.OSM.NWRCommon
diff --git a/Data/Geo/OSM/Waynodes.hs b/Data/Geo/OSM/Waynodes.hs
--- a/Data/Geo/OSM/Waynodes.hs
+++ b/Data/Geo/OSM/Waynodes.hs
@@ -4,7 +4,8 @@
                               waynodes
                             ) where
 
-import Text.XML.HXT.Arrow
+
+import Text.XML.HXT.Arrow.Pickle
 import Text.XML.HXT.Extras
 import Data.Geo.OSM.Accessor.Maximum
 
diff --git a/OSM.cabal b/OSM.cabal
--- a/OSM.cabal
+++ b/OSM.cabal
@@ -1,5 +1,5 @@
 Name:                 OSM
-Version:              0.5.0
+Version:              0.5.1
 License:              BSD3
 License-File:         LICENSE
 Synopsis:             Parse OpenStreetMap files
@@ -7,8 +7,8 @@
                       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ɐɥ
+Author:               Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>
+Maintainer:           Tony Morris
 Copyright:            2009-2010 Tony Morris
 build-type:           Simple
 cabal-version:        >= 1.2
@@ -18,9 +18,9 @@
 
 Library
   if flag(small_base)
-    Build-Depends:    base < 5 && >= 3, hxt, hxt-extras, containers
+    Build-Depends:    base < 5 && >= 3, hxt >= 9.0 && < 10.0, hxt-extras, containers
   else
-    Build-Depends:    base < 5 && >= 3, hxt, hxt-extras, containers
+    Build-Depends:    base < 5 && >= 3, hxt >= 9.0 && < 10.0, hxt-extras, containers
 
   GHC-Options:        -Wall
   Exposed-Modules:    Data.Geo.OSM
