diff --git a/Data/Geo/GPX.hs b/Data/Geo/GPX.hs
deleted file mode 100644
--- a/Data/Geo/GPX.hs
+++ /dev/null
@@ -1,150 +0,0 @@
--- | GPX 1.1 Schema <http://www.topografix.com/GPX/1/1/>
-module Data.Geo.GPX(
-                module Data.Geo.GPX.DgpsStationType,
-                module Data.Geo.GPX.FixType,
-                module Data.Geo.GPX.DegreesType,
-                module Data.Geo.GPX.LongitudeType,
-                module Data.Geo.GPX.LatitudeType,
-                module Data.Geo.GPX.BoundsType,
-                module Data.Geo.GPX.ExtensionsType,
-                module Data.Geo.GPX.PtType,
-                module Data.Geo.GPX.PtsegType,
-                module Data.Geo.GPX.EmailType,
-                module Data.Geo.GPX.LinkType,
-                module Data.Geo.GPX.PersonType,
-                module Data.Geo.GPX.CopyrightType,
-                module Data.Geo.GPX.WptType,
-                module Data.Geo.GPX.TrksegType,
-                module Data.Geo.GPX.TrkType,
-                module Data.Geo.GPX.RteType,
-                module Data.Geo.GPX.MetadataType,
-                module Data.Geo.GPX.GpxType,
-                module Data.Geo.GPX.Gpx,
-                module Data.Geo.GPX.Accessor.Minlat,
-                module Data.Geo.GPX.Accessor.Maxlat,
-                module Data.Geo.GPX.Accessor.Minlon,
-                module Data.Geo.GPX.Accessor.Maxlon,
-                module Data.Geo.GPX.Accessor.Author,
-                module Data.Geo.GPX.Accessor.Year,
-                module Data.Geo.GPX.Accessor.License,
-                module Data.Geo.GPX.Accessor.Value,
-                module Data.Geo.GPX.Accessor.Id,
-                module Data.Geo.GPX.Accessor.Domain,
-                module Data.Geo.GPX.Accessor.Version,
-                module Data.Geo.GPX.Accessor.Creator,
-                module Data.Geo.GPX.Accessor.Metadata,
-                module Data.Geo.GPX.Accessor.Wpts,
-                module Data.Geo.GPX.Accessor.Rtes,
-                module Data.Geo.GPX.Accessor.Trks,
-                module Data.Geo.GPX.Accessor.Extensions,
-                module Data.Geo.GPX.Accessor.Href,
-                module Data.Geo.GPX.Accessor.Text,
-                module Data.Geo.GPX.Accessor.Type,
-                module Data.Geo.GPX.Accessor.Name,
-                module Data.Geo.GPX.Accessor.Desc,
-                module Data.Geo.GPX.Accessor.Copyright,
-                module Data.Geo.GPX.Accessor.Links,
-                module Data.Geo.GPX.Accessor.Time,
-                module Data.Geo.GPX.Accessor.Keywords,
-                module Data.Geo.GPX.Accessor.Bounds,
-                module Data.Geo.GPX.Accessor.Lat,
-                module Data.Geo.GPX.Accessor.Lon,
-                module Data.Geo.GPX.Accessor.Ele,
-                module Data.Geo.GPX.Accessor.Magvar,
-                module Data.Geo.GPX.Accessor.Geoidheight,
-                module Data.Geo.GPX.Accessor.Cmt,
-                module Data.Geo.GPX.Accessor.Src,
-                module Data.Geo.GPX.Accessor.Sym,
-                module Data.Geo.GPX.Accessor.Fix,
-                module Data.Geo.GPX.Accessor.Sat,
-                module Data.Geo.GPX.Accessor.Hdop,
-                module Data.Geo.GPX.Accessor.Vdop,
-                module Data.Geo.GPX.Accessor.Pdop,
-                module Data.Geo.GPX.Accessor.Ageofdgpsdata,
-                module Data.Geo.GPX.Accessor.Dgpsid,
-                module Data.Geo.GPX.Accessor.Email,
-                module Data.Geo.GPX.Accessor.Link,
-                module Data.Geo.GPX.Accessor.Pts,
-                module Data.Geo.GPX.Accessor.Number,
-                module Data.Geo.GPX.Accessor.Rtepts,
-                module Data.Geo.GPX.Accessor.Trkpts,
-                module Data.Geo.GPX.Accessor.Trksegs,
-                module Data.Geo.GPX.Accessor.Latlon,
-                module Data.Geo.GPX.Util.Remove,
-                module Data.Geo.GPX.Util.Reverse,
-                module Control.Arrow
-              ) where
-
-import Data.Geo.GPX.DgpsStationType
-import Data.Geo.GPX.FixType
-import Data.Geo.GPX.DegreesType
-import Data.Geo.GPX.LongitudeType
-import Data.Geo.GPX.LatitudeType
-import Data.Geo.GPX.BoundsType
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.PtType
-import Data.Geo.GPX.PtsegType
-import Data.Geo.GPX.EmailType
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.PersonType
-import Data.Geo.GPX.CopyrightType
-import Data.Geo.GPX.WptType
-import Data.Geo.GPX.TrksegType
-import Data.Geo.GPX.TrkType
-import Data.Geo.GPX.RteType
-import Data.Geo.GPX.MetadataType
-import Data.Geo.GPX.GpxType
-import Data.Geo.GPX.Gpx
-import Data.Geo.GPX.Accessor.Minlat
-import Data.Geo.GPX.Accessor.Maxlat
-import Data.Geo.GPX.Accessor.Minlon
-import Data.Geo.GPX.Accessor.Maxlon
-import Data.Geo.GPX.Accessor.Author
-import Data.Geo.GPX.Accessor.Year
-import Data.Geo.GPX.Accessor.License
-import Data.Geo.GPX.Accessor.Value
-import Data.Geo.GPX.Accessor.Id
-import Data.Geo.GPX.Accessor.Domain
-import Data.Geo.GPX.Accessor.Version
-import Data.Geo.GPX.Accessor.Creator
-import Data.Geo.GPX.Accessor.Metadata
-import Data.Geo.GPX.Accessor.Wpts
-import Data.Geo.GPX.Accessor.Rtes
-import Data.Geo.GPX.Accessor.Trks
-import Data.Geo.GPX.Accessor.Extensions
-import Data.Geo.GPX.Accessor.Href
-import Data.Geo.GPX.Accessor.Text
-import Data.Geo.GPX.Accessor.Type
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Desc
-import Data.Geo.GPX.Accessor.Copyright
-import Data.Geo.GPX.Accessor.Links
-import Data.Geo.GPX.Accessor.Time
-import Data.Geo.GPX.Accessor.Keywords
-import Data.Geo.GPX.Accessor.Bounds
-import Data.Geo.GPX.Accessor.Lat
-import Data.Geo.GPX.Accessor.Lon
-import Data.Geo.GPX.Accessor.Ele
-import Data.Geo.GPX.Accessor.Magvar
-import Data.Geo.GPX.Accessor.Geoidheight
-import Data.Geo.GPX.Accessor.Cmt
-import Data.Geo.GPX.Accessor.Src
-import Data.Geo.GPX.Accessor.Sym
-import Data.Geo.GPX.Accessor.Fix
-import Data.Geo.GPX.Accessor.Sat
-import Data.Geo.GPX.Accessor.Hdop
-import Data.Geo.GPX.Accessor.Vdop
-import Data.Geo.GPX.Accessor.Pdop
-import Data.Geo.GPX.Accessor.Ageofdgpsdata
-import Data.Geo.GPX.Accessor.Dgpsid
-import Data.Geo.GPX.Accessor.Email
-import Data.Geo.GPX.Accessor.Link
-import Data.Geo.GPX.Accessor.Pts
-import Data.Geo.GPX.Accessor.Number
-import Data.Geo.GPX.Accessor.Rtepts
-import Data.Geo.GPX.Accessor.Trkpts
-import Data.Geo.GPX.Accessor.Trksegs
-import Data.Geo.GPX.Accessor.Latlon
-import Data.Geo.GPX.Util.Remove
-import Data.Geo.GPX.Util.Reverse
-import Control.Arrow
diff --git a/Data/Geo/GPX/Accessor/Accessor.hs b/Data/Geo/GPX/Accessor/Accessor.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Accessor.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Data.Geo.GPX.Accessor.Accessor(
-                                       using
-                                     ) where
-
-import Control.Monad.Instances()
-
-using :: (a -> d) -> (c -> a -> b) -> (d -> c) -> a -> b
-using f g = flip (flip =<< (g .) . flip id . f)
diff --git a/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs b/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Ageofdgpsdata.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Ageofdgpsdata where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Ageofdgpsdata a where
-  ageofdgpsdata :: a -> Maybe Double
-  setAgeofdgpsdata :: Maybe Double -> a -> a
-
-  setAgeofdgpsdata' :: Double -> a -> a
-  setAgeofdgpsdata' = setAgeofdgpsdata . Just
-
-  usingAgeofdgpsdata :: (Maybe Double -> Maybe Double) -> a -> a
-  usingAgeofdgpsdata = ageofdgpsdata `using` setAgeofdgpsdata
-
-  usingAgeofdgpsdata' :: (Double -> Double) -> a -> a
-  usingAgeofdgpsdata' = usingAgeofdgpsdata . fmap
diff --git a/Data/Geo/GPX/Accessor/Author.hs b/Data/Geo/GPX/Accessor/Author.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Author.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
-
-module Data.Geo.GPX.Accessor.Author where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Author a b | a -> b where
-  author :: a -> b
-  setAuthor :: b -> a -> a
-
-  usingAuthor :: (b -> b) -> a -> a
-  usingAuthor = author `using` setAuthor
diff --git a/Data/Geo/GPX/Accessor/Bounds.hs b/Data/Geo/GPX/Accessor/Bounds.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Bounds.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Bounds where
-
-import Data.Geo.GPX.BoundsType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Bounds a where
-  bounds :: a -> Maybe BoundsType
-  setBounds :: Maybe BoundsType -> a -> a
-
-  setBounds' :: BoundsType -> a -> a
-  setBounds' = setBounds . Just
-
-  usingBounds :: (Maybe BoundsType -> Maybe BoundsType) -> a -> a
-  usingBounds = bounds `using` setBounds
-
-  usingBounds' :: (BoundsType -> BoundsType) -> a -> a
-  usingBounds' = usingBounds . fmap
diff --git a/Data/Geo/GPX/Accessor/Cmt.hs b/Data/Geo/GPX/Accessor/Cmt.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Cmt.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Cmt where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Cmt a where
-  cmt :: a -> Maybe String
-  setCmt :: Maybe String -> a -> a
-
-  setCmt' :: String -> a -> a
-  setCmt' = setCmt . Just
-
-  usingCmt :: (Maybe String -> Maybe String) -> a -> a
-  usingCmt = cmt `using` setCmt
-
-  usingCmt' :: (String -> String) -> a -> a
-  usingCmt' = usingCmt . fmap
diff --git a/Data/Geo/GPX/Accessor/Copyright.hs b/Data/Geo/GPX/Accessor/Copyright.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Copyright.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Copyright where
-
-import Data.Geo.GPX.CopyrightType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Copyright a where
-  copyright :: a -> Maybe CopyrightType
-  setCopyright :: Maybe CopyrightType -> a -> a
-
-  setCopyright' :: CopyrightType -> a -> a
-  setCopyright' = setCopyright . Just
-
-  usingCopyright :: (Maybe CopyrightType -> Maybe CopyrightType) -> a -> a
-  usingCopyright = copyright `using` setCopyright
-
-  usingCopyright' :: (CopyrightType -> CopyrightType) -> a -> a
-  usingCopyright' = usingCopyright . fmap
diff --git a/Data/Geo/GPX/Accessor/Creator.hs b/Data/Geo/GPX/Accessor/Creator.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Creator.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-module Data.Geo.GPX.Accessor.Creator where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Creator a where
-  creator :: a -> String
-  setCreator :: String -> a -> a
-
-  usingCreator :: (String -> String) -> a -> a
-  usingCreator = creator `using` setCreator
diff --git a/Data/Geo/GPX/Accessor/Desc.hs b/Data/Geo/GPX/Accessor/Desc.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Desc.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Desc where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Desc a where
-  desc :: a -> Maybe String
-  setDesc :: Maybe String -> a -> a
-
-  setDesc' :: String -> a -> a
-  setDesc' = setDesc . Just
-
-  usingDesc :: (Maybe String -> Maybe String) -> a -> a
-  usingDesc = desc `using` setDesc
-
-  usingDesc' :: (String -> String) -> a -> a
-  usingDesc' = usingDesc . fmap
diff --git a/Data/Geo/GPX/Accessor/Dgpsid.hs b/Data/Geo/GPX/Accessor/Dgpsid.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Dgpsid.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Dgpsid where
-
-import Data.Geo.GPX.DgpsStationType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Dgpsid a where
-  dgpsid :: a -> Maybe DgpsStationType
-  setDgpsid :: Maybe DgpsStationType -> a -> a
-
-  setDgpsid' :: DgpsStationType -> a -> a
-  setDgpsid' = setDgpsid . Just
-
-  usingDgpsid :: (Maybe DgpsStationType -> Maybe DgpsStationType) -> a -> a
-  usingDgpsid = dgpsid `using` setDgpsid
-
-  usingDgpsid' :: (DgpsStationType -> DgpsStationType) -> a -> a
-  usingDgpsid' = usingDgpsid . fmap
diff --git a/Data/Geo/GPX/Accessor/Domain.hs b/Data/Geo/GPX/Accessor/Domain.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Domain.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-module Data.Geo.GPX.Accessor.Domain where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Domain a where
-  domain :: a -> String
-  setDomain :: String -> a -> a
-
-  usingDomain :: (String -> String) -> a -> a
-  usingDomain = domain `using` setDomain
diff --git a/Data/Geo/GPX/Accessor/Ele.hs b/Data/Geo/GPX/Accessor/Ele.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Ele.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Ele where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Ele a where
-  ele :: a -> Maybe Double
-  setEle :: Maybe Double -> a -> a
-
-  setEle' :: Double -> a -> a
-  setEle' = setEle . Just
-
-  usingEle :: (Maybe Double -> Maybe Double) -> a -> a
-  usingEle = ele `using` setEle
-
-  usingEle' :: (Double -> Double) -> a -> a
-  usingEle' = usingEle . fmap
diff --git a/Data/Geo/GPX/Accessor/Email.hs b/Data/Geo/GPX/Accessor/Email.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Email.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Email where
-
-import Data.Geo.GPX.EmailType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Email a where
-  email :: a -> Maybe EmailType
-  setEmail :: Maybe EmailType -> a -> a
-
-  setEmail' :: EmailType -> a -> a
-  setEmail' = setEmail . Just
-
-  usingEmail :: (Maybe EmailType -> Maybe EmailType) -> a -> a
-  usingEmail = email `using` setEmail
-
-  usingEmail' :: (EmailType -> EmailType) -> a -> a
-  usingEmail' = usingEmail . fmap
diff --git a/Data/Geo/GPX/Accessor/Extensions.hs b/Data/Geo/GPX/Accessor/Extensions.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Extensions.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Extensions where
-
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Extensions a where
-  extensions :: a -> Maybe ExtensionsType
-  setExtensions :: Maybe ExtensionsType -> a -> a
-
-  setExtensions' :: ExtensionsType -> a -> a
-  setExtensions' = setExtensions . Just
-
-  usingExtensions :: (Maybe ExtensionsType -> Maybe ExtensionsType) -> a -> a
-  usingExtensions = extensions `using` setExtensions
-
-  usingExtensions' :: (ExtensionsType -> ExtensionsType) -> a -> a
-  usingExtensions' = usingExtensions . fmap
diff --git a/Data/Geo/GPX/Accessor/Fix.hs b/Data/Geo/GPX/Accessor/Fix.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Fix.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Fix where
-
-import Data.Geo.GPX.FixType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Fix a where
-  fix :: a -> Maybe FixType
-  setFix :: Maybe FixType -> a -> a
-
-  setFix' :: FixType -> a -> a
-  setFix' = setFix . Just
-
-  usingFix :: (Maybe FixType -> Maybe FixType) -> a -> a
-  usingFix = fix `using` setFix
-
-  usingFix' :: (FixType -> FixType) -> a -> a
-  usingFix' = usingFix . fmap
diff --git a/Data/Geo/GPX/Accessor/Geoidheight.hs b/Data/Geo/GPX/Accessor/Geoidheight.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Geoidheight.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Geoidheight where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Geoidheight a where
-  geoidheight :: a -> Maybe Double
-  setGeoidheight :: Maybe Double -> a -> a
-
-  setGeoidheight' :: Double -> a -> a
-  setGeoidheight' = setGeoidheight . Just
-
-  usingGeoidheight :: (Maybe Double -> Maybe Double) -> a -> a
-  usingGeoidheight = geoidheight `using` setGeoidheight
-
-  usingGeoidheight' :: (Double -> Double) -> a -> a
-  usingGeoidheight' = usingGeoidheight . fmap
diff --git a/Data/Geo/GPX/Accessor/Hdop.hs b/Data/Geo/GPX/Accessor/Hdop.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Hdop.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Hdop where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Hdop a where
-  hdop :: a -> Maybe Double
-  setHdop :: Maybe Double -> a -> a
-
-  setHdop' :: Double -> a -> a
-  setHdop' = setHdop . Just
-
-  usingHdop :: (Maybe Double -> Maybe Double) -> a -> a
-  usingHdop = hdop `using` setHdop
-
-  usingHdop' :: (Double -> Double) -> a -> a
-  usingHdop' = usingHdop . fmap
diff --git a/Data/Geo/GPX/Accessor/Href.hs b/Data/Geo/GPX/Accessor/Href.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Href.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-module Data.Geo.GPX.Accessor.Href where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Href a where
-  href :: a -> String
-  setHref :: String -> a -> a
-
-  usingHref :: (String -> String) -> a -> a
-  usingHref = href `using` setHref
diff --git a/Data/Geo/GPX/Accessor/Id.hs b/Data/Geo/GPX/Accessor/Id.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Id.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Data.Geo.GPX.Accessor.Id where
-
-import Data.Geo.GPX.Accessor.Accessor
-import Prelude hiding (id)
-
-class Id a where
-  id :: a -> String
-  setId :: String -> a -> a
-
-  usingId :: (String -> String) -> a -> a
-  usingId = id `using` setId
diff --git a/Data/Geo/GPX/Accessor/Keywords.hs b/Data/Geo/GPX/Accessor/Keywords.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Keywords.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Keywords where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Keywords a where
-  keywords :: a -> Maybe String
-  setKeywords :: Maybe String -> a -> a
-
-  setKeywords' :: String -> a -> a
-  setKeywords' = setKeywords . Just
-
-  usingKeywords :: (Maybe String -> Maybe String) -> a -> a
-  usingKeywords = keywords `using` setKeywords
-
-  usingKeywords' :: (String -> String) -> a -> a
-  usingKeywords' = usingKeywords . fmap
diff --git a/Data/Geo/GPX/Accessor/Lat.hs b/Data/Geo/GPX/Accessor/Lat.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Lat.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Data.Geo.GPX.Accessor.Lat where
-
-import Data.Geo.GPX.LatitudeType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Lat a where
-  lat :: a -> LatitudeType
-  setLat :: LatitudeType -> a -> a
-
-  usingLat :: (LatitudeType -> LatitudeType) -> a -> a
-  usingLat = lat `using` setLat
diff --git a/Data/Geo/GPX/Accessor/Latlon.hs b/Data/Geo/GPX/Accessor/Latlon.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Latlon.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-{-# LANGUAGE FlexibleContexts, FlexibleInstances, UndecidableInstances #-}
-
-module Data.Geo.GPX.Accessor.Latlon where
-import Data.Geo.GPX.Accessor.Accessor
-
-class Latlon a where
-  latlon :: a -> (Double, Double)
-  setLatlon :: (Double, Double) -> a -> a
-
-  usingLatlon :: ((Double, Double) -> (Double, Double)) -> a -> a
-  usingLatlon = latlon `using` setLatlon
diff --git a/Data/Geo/GPX/Accessor/License.hs b/Data/Geo/GPX/Accessor/License.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/License.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.License where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class License a where
-  license :: a -> Maybe String
-  setLicense :: Maybe String -> a -> a
-
-  setLicense' :: String -> a -> a
-  setLicense' = setLicense . Just
-
-  usingLicense :: (Maybe String -> Maybe String) -> a -> a
-  usingLicense = license `using` setLicense
-
-  usingLicense' :: (String -> String) -> a -> a
-  usingLicense' = usingLicense . fmap
diff --git a/Data/Geo/GPX/Accessor/Link.hs b/Data/Geo/GPX/Accessor/Link.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Link.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Link where
-
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Link a where
-  link :: a -> Maybe LinkType
-  setLink :: Maybe LinkType -> a -> a
-
-  setLink' :: LinkType -> a -> a
-  setLink' = setLink . Just
-
-  usingLink :: (Maybe LinkType -> Maybe LinkType) -> a -> a
-  usingLink = link `using` setLink
-
-  usingLink' :: (LinkType -> LinkType) -> a -> a
-  usingLink' = usingLink . fmap
diff --git a/Data/Geo/GPX/Accessor/Links.hs b/Data/Geo/GPX/Accessor/Links.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Links.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Links where
-
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Links a where
-  links :: a -> [LinkType]
-  setLinks :: [LinkType] -> a -> a
-
-  setLinks' :: LinkType -> a -> a
-  setLinks' = setLinks . return
-
-  usingLinks :: ([LinkType] -> [LinkType]) -> a -> a
-  usingLinks = links `using` setLinks
-
-  usingLinks' :: (LinkType -> LinkType) -> a -> a
-  usingLinks' = usingLinks . fmap
diff --git a/Data/Geo/GPX/Accessor/Lon.hs b/Data/Geo/GPX/Accessor/Lon.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Lon.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Data.Geo.GPX.Accessor.Lon where
-
-import Data.Geo.GPX.LongitudeType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Lon a where
-  lon :: a -> LongitudeType
-  setLon :: LongitudeType -> a -> a
-
-  usingLon :: (LongitudeType -> LongitudeType) -> a -> a
-  usingLon = lon `using` setLon
diff --git a/Data/Geo/GPX/Accessor/Magvar.hs b/Data/Geo/GPX/Accessor/Magvar.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Magvar.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Magvar where
-
-import Data.Geo.GPX.DegreesType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Magvar a where
-  magvar :: a -> Maybe DegreesType
-  setMagvar :: Maybe DegreesType -> a -> a
-
-  setMagvar' :: DegreesType -> a -> a
-  setMagvar' = setMagvar . Just
-
-  usingMagvar :: (Maybe DegreesType -> Maybe DegreesType) -> a -> a
-  usingMagvar = magvar `using` setMagvar
-
-  usingMagvar' :: (DegreesType -> DegreesType) -> a -> a
-  usingMagvar' = usingMagvar . fmap
diff --git a/Data/Geo/GPX/Accessor/Maxlat.hs b/Data/Geo/GPX/Accessor/Maxlat.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Maxlat.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Data.Geo.GPX.Accessor.Maxlat where
-
-import Data.Geo.GPX.LatitudeType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Maxlat a where
-  maxlat :: a -> LatitudeType
-  setMaxlat :: LatitudeType -> a -> a
-
-  usingMaxlat :: (LatitudeType -> LatitudeType) -> a -> a
-  usingMaxlat = maxlat `using` setMaxlat
diff --git a/Data/Geo/GPX/Accessor/Maxlon.hs b/Data/Geo/GPX/Accessor/Maxlon.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Maxlon.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Data.Geo.GPX.Accessor.Maxlon where
-
-import Data.Geo.GPX.LongitudeType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Maxlon a where
-  maxlon :: a -> LongitudeType
-  setMaxlon :: LongitudeType -> a -> a
-
-  usingMaxlon :: (LongitudeType -> LongitudeType) -> a -> a
-  usingMaxlon = maxlon `using` setMaxlon
diff --git a/Data/Geo/GPX/Accessor/Metadata.hs b/Data/Geo/GPX/Accessor/Metadata.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Metadata.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Metadata where
-
-import Data.Geo.GPX.MetadataType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Metadata a where
-  metadata :: a -> Maybe MetadataType
-  setMetadata :: Maybe MetadataType -> a -> a
-
-  setMetadata' :: MetadataType -> a -> a
-  setMetadata' = setMetadata . Just
-
-  usingMetadata :: (Maybe MetadataType -> Maybe MetadataType) -> a -> a
-  usingMetadata = metadata `using` setMetadata
-
-  usingMetadata' :: (MetadataType -> MetadataType) -> a -> a
-  usingMetadata' = usingMetadata . fmap
diff --git a/Data/Geo/GPX/Accessor/Minlat.hs b/Data/Geo/GPX/Accessor/Minlat.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Minlat.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Data.Geo.GPX.Accessor.Minlat where
-
-import Data.Geo.GPX.LatitudeType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Minlat a where
-  minlat :: a -> LatitudeType
-  setMinlat :: LatitudeType -> a -> a
-
-  usingMinlat :: (LatitudeType -> LatitudeType) -> a -> a
-  usingMinlat = minlat `using` setMinlat
diff --git a/Data/Geo/GPX/Accessor/Minlon.hs b/Data/Geo/GPX/Accessor/Minlon.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Minlon.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module Data.Geo.GPX.Accessor.Minlon where
-
-import Data.Geo.GPX.LongitudeType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Minlon a where
-  minlon :: a -> LongitudeType
-  setMinlon :: LongitudeType -> a -> a
-
-  usingMinlon :: (LongitudeType -> LongitudeType) -> a -> a
-  usingMinlon = minlon `using` setMinlon
diff --git a/Data/Geo/GPX/Accessor/Name.hs b/Data/Geo/GPX/Accessor/Name.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Name.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Name where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Name a where
-  name :: a -> Maybe String
-  setName :: Maybe String -> a -> a
-
-  setName' :: String -> a -> a
-  setName' = setName . Just
-
-  usingName :: (Maybe String -> Maybe String) -> a -> a
-  usingName = name `using` setName
-
-  usingName' :: (String -> String) -> a -> a
-  usingName' = usingName . fmap
diff --git a/Data/Geo/GPX/Accessor/Number.hs b/Data/Geo/GPX/Accessor/Number.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Number.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Number where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Number a where
-  number :: a -> Maybe Int
-  setNumber :: Maybe Int -> a -> a
-
-  setNumber' :: Int -> a -> a
-  setNumber' = setNumber . Just
-
-  usingNumber :: (Maybe Int -> Maybe Int) -> a -> a
-  usingNumber = number `using` setNumber
-
-  usingNumber' :: (Int -> Int) -> a -> a
-  usingNumber' = usingNumber . fmap
diff --git a/Data/Geo/GPX/Accessor/Pdop.hs b/Data/Geo/GPX/Accessor/Pdop.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Pdop.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Pdop where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Pdop a where
-  pdop :: a -> Maybe Double
-  setPdop :: Maybe Double -> a -> a
-
-  setPdop' :: Double -> a -> a
-  setPdop' = setPdop . Just
-
-  usingPdop :: (Maybe Double -> Maybe Double) -> a -> a
-  usingPdop = pdop `using` setPdop
-
-  usingPdop' :: (Double -> Double) -> a -> a
-  usingPdop' = usingPdop . fmap
diff --git a/Data/Geo/GPX/Accessor/Pts.hs b/Data/Geo/GPX/Accessor/Pts.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Pts.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Pts where
-
-import Data.Geo.GPX.PtType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Pts a where
-  pts :: a -> [PtType]
-  setPts :: [PtType] -> a -> a
-
-  setPts' :: PtType -> a -> a
-  setPts' = setPts . return
-
-  usingPts :: ([PtType] -> [PtType]) -> a -> a
-  usingPts = pts `using` setPts
-
-  usingPts' :: (PtType -> PtType) -> a -> a
-  usingPts' = usingPts . fmap
diff --git a/Data/Geo/GPX/Accessor/Rtepts.hs b/Data/Geo/GPX/Accessor/Rtepts.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Rtepts.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Rtepts where
-
-import Data.Geo.GPX.WptType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Rtepts a where
-  rtepts :: a -> [WptType]
-  setRtepts :: [WptType] -> a -> a
-
-  setRtepts' :: WptType -> a -> a
-  setRtepts' = setRtepts . return
-
-  usingRtepts :: ([WptType] -> [WptType]) -> a -> a
-  usingRtepts = rtepts `using` setRtepts
-
-  usingRtepts' :: (WptType -> WptType) -> a -> a
-  usingRtepts' = usingRtepts . fmap
diff --git a/Data/Geo/GPX/Accessor/Rtes.hs b/Data/Geo/GPX/Accessor/Rtes.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Rtes.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Rtes where
-
-import Data.Geo.GPX.RteType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Rtes a where
-  rtes :: a -> [RteType]
-  setRtes :: [RteType] -> a -> a
-
-  setRtes' :: RteType -> a -> a
-  setRtes' = setRtes . return
-
-  usingRtes :: ([RteType] -> [RteType]) -> a -> a
-  usingRtes = rtes `using` setRtes
-
-  usingRtes' :: (RteType -> RteType) -> a -> a
-  usingRtes' = usingRtes . fmap
diff --git a/Data/Geo/GPX/Accessor/Sat.hs b/Data/Geo/GPX/Accessor/Sat.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Sat.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Sat where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Sat a where
-  sat :: a -> Maybe Int
-  setSat :: Maybe Int -> a -> a
-
-  setSat' :: Int -> a -> a
-  setSat' = setSat . Just
-
-  usingSat :: (Maybe Int -> Maybe Int) -> a -> a
-  usingSat = sat `using` setSat
-
-  usingSat' :: (Int -> Int) -> a -> a
-  usingSat' = usingSat . fmap
diff --git a/Data/Geo/GPX/Accessor/Src.hs b/Data/Geo/GPX/Accessor/Src.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Src.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Src where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Src a where
-  src :: a -> Maybe String
-  setSrc :: Maybe String -> a -> a
-
-  setSrc' :: String -> a -> a
-  setSrc' = setSrc . Just
-
-  usingSrc :: (Maybe String -> Maybe String) -> a -> a
-  usingSrc = src `using` setSrc
-
-  usingSrc' :: (String -> String) -> a -> a
-  usingSrc' = usingSrc . fmap
diff --git a/Data/Geo/GPX/Accessor/Sym.hs b/Data/Geo/GPX/Accessor/Sym.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Sym.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Sym where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Sym a where
-  sym :: a -> Maybe String
-  setSym :: Maybe String -> a -> a
-
-  setSym' :: String -> a -> a
-  setSym' = setSym . Just
-
-  usingSym :: (Maybe String -> Maybe String) -> a -> a
-  usingSym = sym `using` setSym
-
-  usingSym' :: (String -> String) -> a -> a
-  usingSym' = usingSym . fmap
diff --git a/Data/Geo/GPX/Accessor/Text.hs b/Data/Geo/GPX/Accessor/Text.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Text.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Text where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Text a where
-  text :: a -> Maybe String
-  setText :: Maybe String -> a -> a
-
-  setText' :: String -> a -> a
-  setText' = setText . Just
-
-  usingText :: (Maybe String -> Maybe String) -> a -> a
-  usingText = text `using` setText
-
-  usingText' :: (String -> String) -> a -> a
-  usingText' = usingText . fmap
diff --git a/Data/Geo/GPX/Accessor/Time.hs b/Data/Geo/GPX/Accessor/Time.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Time.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Time where
-
-import Text.XML.XSD.DateTime
-import Data.Geo.GPX.Accessor.Accessor
-
-class Time a where
-  time :: a -> Maybe DateTime
-  setTime :: Maybe DateTime -> a -> a
-
-  setTime' :: DateTime -> a -> a
-  setTime' = setTime . Just
-
-  usingTime :: (Maybe DateTime -> Maybe DateTime) -> a -> a
-  usingTime = time `using` setTime
-
-  usingTime' :: (DateTime -> DateTime) -> a -> a
-  usingTime' = usingTime . fmap
diff --git a/Data/Geo/GPX/Accessor/Trkpts.hs b/Data/Geo/GPX/Accessor/Trkpts.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Trkpts.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Trkpts where
-
-import Data.Geo.GPX.WptType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Trkpts a where
-  trkpts :: a -> [WptType]
-  setTrkpts :: [WptType] -> a -> a
-
-  setTrkpts' :: WptType -> a -> a
-  setTrkpts' = setTrkpts . return
-
-  usingTrkpts :: ([WptType] -> [WptType]) -> a -> a
-  usingTrkpts = trkpts `using` setTrkpts
-
-  usingTrkpts' :: (WptType -> WptType) -> a -> a
-  usingTrkpts' = usingTrkpts . fmap
diff --git a/Data/Geo/GPX/Accessor/Trks.hs b/Data/Geo/GPX/Accessor/Trks.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Trks.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Trks where
-
-import Data.Geo.GPX.TrkType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Trks a where
-  trks :: a -> [TrkType]
-  setTrks :: [TrkType] -> a -> a
-
-  setTrks' :: TrkType -> a -> a
-  setTrks' = setTrks . return
-
-  usingTrks :: ([TrkType] -> [TrkType]) -> a -> a
-  usingTrks = trks `using` setTrks
-
-  usingTrks' :: (TrkType -> TrkType) -> a -> a
-  usingTrks' = usingTrks . fmap
diff --git a/Data/Geo/GPX/Accessor/Trksegs.hs b/Data/Geo/GPX/Accessor/Trksegs.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Trksegs.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Trksegs where
-
-import Data.Geo.GPX.TrksegType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Trksegs a where
-  trksegs :: a -> [TrksegType]
-  setTrksegs :: [TrksegType] -> a -> a
-
-  setTrksegs' :: TrksegType -> a -> a
-  setTrksegs' = setTrksegs . return
-
-  usingTrksegs :: ([TrksegType] -> [TrksegType]) -> a -> a
-  usingTrksegs = trksegs `using` setTrksegs
-
-  usingTrksegs' :: (TrksegType -> TrksegType) -> a -> a
-  usingTrksegs' = usingTrksegs . fmap
diff --git a/Data/Geo/GPX/Accessor/Type.hs b/Data/Geo/GPX/Accessor/Type.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Type.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Type where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Type a where
-  type' :: a -> Maybe String
-  setType :: Maybe String -> a -> a
-
-  setType' :: String -> a -> a
-  setType' = setType . Just
-
-  usingType :: (Maybe String -> Maybe String) -> a -> a
-  usingType = type' `using` setType
-
-  usingType' :: (String -> String) -> a -> a
-  usingType' = usingType . fmap
diff --git a/Data/Geo/GPX/Accessor/Value.hs b/Data/Geo/GPX/Accessor/Value.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Value.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
-module Data.Geo.GPX.Accessor.Value where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Value a b | a -> b where
-  value :: a -> b
-  setValue :: b -> a -> a
-
-  usingValue :: (b -> b) -> a -> a
-  usingValue = value `using` setValue
diff --git a/Data/Geo/GPX/Accessor/Vdop.hs b/Data/Geo/GPX/Accessor/Vdop.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Vdop.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Vdop where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Vdop a where
-  vdop :: a -> Maybe Double
-  setVdop :: Maybe Double -> a -> a
-
-  setVdop' :: Double -> a -> a
-  setVdop' = setVdop . Just
-
-  usingVdop :: (Maybe Double -> Maybe Double) -> a -> a
-  usingVdop = vdop `using` setVdop
-
-  usingVdop' :: (Double -> Double) -> a -> a
-  usingVdop' = usingVdop . fmap
diff --git a/Data/Geo/GPX/Accessor/Version.hs b/Data/Geo/GPX/Accessor/Version.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Version.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-module Data.Geo.GPX.Accessor.Version where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Version a where
-  version :: a -> String
-  setVersion :: String -> a -> a
-
-  usingVersion :: (String -> String) -> a -> a
-  usingVersion = version `using` setVersion
diff --git a/Data/Geo/GPX/Accessor/Wpts.hs b/Data/Geo/GPX/Accessor/Wpts.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Wpts.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-module Data.Geo.GPX.Accessor.Wpts where
-
-import Data.Geo.GPX.WptType
-import Data.Geo.GPX.Accessor.Accessor
-
-class Wpts a where
-  wpts :: a -> [WptType]
-  setWpts :: [WptType] -> a -> a
-
-  setWpts' :: WptType -> a -> a
-  setWpts' = setWpts . return
-
-  usingWpts :: ([WptType] -> [WptType]) -> a -> a
-  usingWpts = wpts `using` setWpts
-
-  usingWpts' :: (WptType -> WptType) -> a -> a
-  usingWpts' = usingWpts . fmap
diff --git a/Data/Geo/GPX/Accessor/Year.hs b/Data/Geo/GPX/Accessor/Year.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Accessor/Year.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-module Data.Geo.GPX.Accessor.Year where
-
-import Data.Geo.GPX.Accessor.Accessor
-
-class Year a where
-  year :: a -> Maybe String
-  setYear :: Maybe String -> a -> a
-
-  setYear' :: String -> a -> a
-  setYear' = setYear . Just
-
-  usingYear :: (Maybe String -> Maybe String) -> a -> a
-  usingYear = year `using` setYear
-
-  usingYear' :: (String -> String) -> a -> a
-  usingYear' = usingYear . fmap
diff --git a/Data/Geo/GPX/BoundsType.hs b/Data/Geo/GPX/BoundsType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/BoundsType.hs
+++ /dev/null
@@ -1,45 +0,0 @@
--- | Complex Type: @boundsType@ <http://www.topografix.com/GPX/1/1/#type_boundsType>
-module Data.Geo.GPX.BoundsType(
-                                BoundsType,
-                                boundsType
-                              ) where
-
-import Data.Geo.GPX.LatitudeType
-import Data.Geo.GPX.LongitudeType
-import Data.Geo.GPX.Accessor.Minlat
-import Data.Geo.GPX.Accessor.Maxlat
-import Data.Geo.GPX.Accessor.Minlon
-import Data.Geo.GPX.Accessor.Maxlon
-import Text.XML.HXT.Core
-
-data BoundsType = BoundsType (LatitudeType, LongitudeType) (LatitudeType, LongitudeType)
-  deriving (Show, Eq)
-
-boundsType :: (LatitudeType, LongitudeType) -- ^ The minimum latitude and longitude.
-              -> (LatitudeType, LongitudeType) -- ^ The maximum latitude and longitude.
-              -> BoundsType
-boundsType = BoundsType
-
-instance XmlPickler BoundsType where
-  xpickle = xpWrap (\(minlat', minlon', maxlat', maxlon') -> boundsType (minlat', minlon') (maxlat', maxlon'),
-                    \(BoundsType (minlat', minlon') (maxlat', maxlon')) -> (minlat', minlon', maxlat', maxlon')) (xp4Tuple
-                      (xpAttr "minlat" xpickle)
-                      (xpAttr "minlon" xpickle)
-                      (xpAttr "maxlat" xpickle)
-                      (xpAttr "maxlon" xpickle))
-
-instance Minlat BoundsType where
-  minlat (BoundsType (x, _) (_, _)) = x
-  setMinlat a (BoundsType (_, b) (c, d)) = boundsType (a, b) (c, d)
-
-instance Maxlat BoundsType where
-  maxlat (BoundsType (_, _) (x, _)) = x
-  setMaxlat c (BoundsType (a, b) (_, d)) = boundsType (a, b) (c, d)
-
-instance Minlon BoundsType where
-  minlon (BoundsType (_, x) (_, _)) = x
-  setMinlon b (BoundsType (a, _) (c, d)) = boundsType (a, b) (c, d)
-
-instance Maxlon BoundsType where
-  maxlon (BoundsType (_, _) (_, x)) = x
-  setMaxlon d (BoundsType (a, b) (c, _)) = boundsType (a, b) (c, d)
diff --git a/Data/Geo/GPX/CopyrightType.hs b/Data/Geo/GPX/CopyrightType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/CopyrightType.hs
+++ /dev/null
@@ -1,39 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
-
--- | Complex Type: @copyrightType@ <http://www.topografix.com/GPX/1/1/#type_copyrightType>
-module Data.Geo.GPX.CopyrightType(
-                                   CopyrightType,
-                                   copyrightType
-                                 ) where
-
-import Data.Geo.GPX.Accessor.Author
-import Data.Geo.GPX.Accessor.Year
-import Data.Geo.GPX.Accessor.License
-import Text.XML.HXT.Core
-
-data CopyrightType = CopyrightType String (Maybe String) (Maybe String)
-  deriving (Eq, Show)
-
-copyrightType :: String -- ^ The author.
-                 -> Maybe String -- ^ The year.
-                 -> Maybe String -- ^ The license.
-                 -> CopyrightType
-copyrightType = CopyrightType
-
-instance XmlPickler CopyrightType where
-  xpickle = xpWrap (\(author', year', license') -> copyrightType author' year' license', \(CopyrightType author' year' license') -> (author', year', license')) (xpTriple
-              (xpAttr "author" xpText)
-              (xpOption (xpElem "year" xpText))
-              (xpOption (xpElem "license" xpText)))
-
-instance Author CopyrightType String where
-  author (CopyrightType x _ _) = x
-  setAuthor x (CopyrightType _ y z) = copyrightType x y z
-
-instance Year CopyrightType where
-  year (CopyrightType _ x _) = x
-  setYear y (CopyrightType x _ z) = copyrightType x y z
-
-instance License CopyrightType where
-  license (CopyrightType _ _ x) = x
-  setLicense z (CopyrightType x y _) = copyrightType x y z
diff --git a/Data/Geo/GPX/DegreesType.hs b/Data/Geo/GPX/DegreesType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/DegreesType.hs
+++ /dev/null
@@ -1,25 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses #-}
-
--- | Simple Type: @degreesType@ <http://www.topografix.com/GPX/1/1/#type_degreesType>
-module Data.Geo.GPX.DegreesType(
-                                 DegreesType,
-                                 degreesType
-                               ) where
-
-import Data.Geo.GPX.Accessor.Value
-import Data.Fixed
-import Text.XML.HXT.Core
-
-newtype DegreesType = DegreesType Double
-  deriving (Eq, Show)
-
-degreesType :: Double -- ^ The value which will be between 0 and 360 (values out of the range are truncated using a modulus operation).
-               -> DegreesType
-degreesType n = DegreesType (n `mod'` 360)
-
-instance XmlPickler DegreesType where
-  xpickle = xpWrap (degreesType, \(DegreesType n) -> n) xpPrim
-
-instance Value DegreesType Double where
-  value (DegreesType x) = x
-  setValue x (DegreesType _) = degreesType x
diff --git a/Data/Geo/GPX/DgpsStationType.hs b/Data/Geo/GPX/DgpsStationType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/DgpsStationType.hs
+++ /dev/null
@@ -1,29 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses #-}
-
--- | Simple Type: @dgpsStationType@ <http://www.topografix.com/GPX/1/1/#type_dgpsStationType>
-module Data.Geo.GPX.DgpsStationType(
-                                     DgpsStationType,
-                                     dgpsStationType
-                                   ) where
-
-import Text.XML.HXT.Core
-import Data.Geo.GPX.Accessor.Value
-import Data.Ix
-import Data.Maybe
-
-newtype DgpsStationType = DgpsStationType Int
-  deriving Eq
-
-dgpsStationType :: Int -- ^ The value between 0 and 1023.
-                   -> Maybe DgpsStationType
-dgpsStationType n = if inRange (0, 1023) n then Just (DgpsStationType n) else Nothing
-
-instance Show DgpsStationType where
-  show (DgpsStationType n) = show n
-
-instance XmlPickler DgpsStationType where
-  xpickle = xpWrapMaybe (dgpsStationType, \(DgpsStationType n) -> n) xpickle
-
-instance Value DgpsStationType Int where
-  value (DgpsStationType x) = x
-  setValue x (DgpsStationType _) = fromMaybe (error ("DgpsStationType " ++ show x ++ " out of range (0,1023)")) (dgpsStationType x)
diff --git a/Data/Geo/GPX/EmailType.hs b/Data/Geo/GPX/EmailType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/EmailType.hs
+++ /dev/null
@@ -1,29 +0,0 @@
--- | Complex Type: @emailType@ <http://www.topografix.com/GPX/1/1/#type_emailType>
-module Data.Geo.GPX.EmailType(
-                               EmailType,
-                               emailType
-                             ) where
-
-import Text.XML.HXT.Core
-import Data.Geo.GPX.Accessor.Id
-import Data.Geo.GPX.Accessor.Domain
-
-data EmailType = EmailType String String
-  deriving (Eq, Show)
-
-emailType :: String -- ^ The id.
-             -> String -- ^ The domain.
-             -> EmailType
-emailType = EmailType
-
-instance XmlPickler EmailType where
-  xpickle = xpWrap (uncurry emailType, \(EmailType id' domain') -> (id', domain'))
-              (xpPair (xpAttr "id" xpText) (xpAttr "domain" xpText))
-
-instance Id EmailType where
-  id (EmailType x _) = x
-  setId a (EmailType _ b) = emailType a b
-
-instance Domain EmailType where
-  domain (EmailType _ x) = x
-  setDomain b (EmailType a _) = emailType a b
diff --git a/Data/Geo/GPX/ExtensionsType.hs b/Data/Geo/GPX/ExtensionsType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/ExtensionsType.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
-
--- | Complex Type: @extensionsType@ <http://www.topografix.com/GPX/1/1/#type_extensionsType>
-module Data.Geo.GPX.ExtensionsType(
-                                    ExtensionsType,
-                                    extensionsType
-                                  ) where
-
-import Text.XML.HXT.Core
-import Data.Geo.GPX.Accessor.Value
-
-newtype ExtensionsType = ExtensionsType XmlTree
-  deriving (Eq, Show)
-
-instance XmlPickler ExtensionsType where
-  xpickle = xpWrap (ExtensionsType, \(ExtensionsType t) -> t) xpTree
-
-extensionsType :: XmlTree -- ^ The extensions sub-tree.
-                  -> ExtensionsType
-extensionsType = ExtensionsType
-
-instance Value ExtensionsType XmlTree where
-  value (ExtensionsType x) = x
-  setValue x (ExtensionsType _) = extensionsType x
diff --git a/Data/Geo/GPX/FixType.hs b/Data/Geo/GPX/FixType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/FixType.hs
+++ /dev/null
@@ -1,66 +0,0 @@
--- | Simple Type: @fixType@ <http://www.topografix.com/GPX/1/1/#type_fixType>
-module Data.Geo.GPX.FixType(
-                             FixType,
-                             foldFixType,
-                             none,
-                             twod,
-                             threed,
-                             dgps,
-                             pps,
-                             fixType
-                           ) where
-
-import Text.XML.HXT.Core hiding (none)
-
-data FixType = None | Twod | Threed | Dgps | Pps
-  deriving (Eq, Enum)
-
--- | The catamorphism for @FixType@.
-foldFixType :: a -- ^ The value if @none@.
-               -> a -- ^ The value if @twod@.
-               -> a -- ^ The value if @threed@.
-               -> a -- ^ The value if @dgps@.
-               -> a -- ^ The value if @pps@.
-               -> FixType -- ^ The value to fold.
-               -> a
-foldFixType n _ _ _ _ None = n
-foldFixType _ t _ _ _ Twod = t
-foldFixType _ _ t _ _ Threed = t
-foldFixType _ _ _ d _ Dgps = d
-foldFixType _ _ _ _ p Pps = p
-
--- | Construct a @FixType@ with a value of @none@.
-none :: FixType
-none = None
-
--- | Construct a @FixType@ with a value of @2d@.
-twod :: FixType
-twod = Twod
-
--- | Construct a @FixType@ with a value of @3d@.
-threed :: FixType
-threed = Threed
-
--- | Construct a @FixType@ with a value of @dgps@.
-dgps :: FixType
-dgps = Dgps
-
--- | Construct a @FixType@ with a value of @pps@.
-pps :: FixType
-pps = Pps
-
--- | Construct a @FixType@ using a string with a value of @["none", "2d", "3d", "dgps", "pps"]@.
-fixType :: String -- ^ The string value to construct a @FixType@ with.
-           -> Maybe FixType
-fixType "none" = Just none
-fixType "2d"= Just twod
-fixType "3d" = Just threed
-fixType "dgps" = Just dgps
-fixType "pps" = Just pps
-fixType _ = Nothing
-
-instance XmlPickler FixType where
-  xpickle = xpWrapMaybe (fixType, show) xpText
-
-instance Show FixType where
-  show = foldFixType "none" "2d" "3d" "dgps" "pps"
diff --git a/Data/Geo/GPX/Gpx.hs b/Data/Geo/GPX/Gpx.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Gpx.hs
+++ /dev/null
@@ -1,142 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, GeneralizedNewtypeDeriving #-}
-
--- | Element: @gpx@ <http://www.topografix.com/GPX/1/1/#element_gpx>
-module Data.Geo.GPX.Gpx(
-                         Gpx,
-                         gpx,
-                         readGpxFile,
-                         readGpxFiles,
-                         interactGpxIO,
-                         interactsGpxIO,
-                         interactGpxIO',
-                         interactsGpxIO',
-                         interactGpx,
-                         interactsGpx,
-                         interactGpx',
-                         interactsGpx'
-                       ) where
-
-import Text.XML.HXT.Core
-import Control.Monad
-import Data.List
-import Data.Geo.GPX.GpxType
-import Data.Geo.GPX.PersonType
-import Data.Geo.GPX.Accessor.Value
-import Data.Geo.GPX.Accessor.Version
-import Data.Geo.GPX.Accessor.Creator
-import Data.Geo.GPX.Accessor.Metadata
-import Data.Geo.GPX.Accessor.Wpts
-import Data.Geo.GPX.Accessor.Rtes
-import Data.Geo.GPX.Accessor.Trks
-import Data.Geo.GPX.Accessor.Extensions
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Desc
-import Data.Geo.GPX.Accessor.Author
-import Data.Geo.GPX.Accessor.Copyright
-import Data.Geo.GPX.Accessor.Links
-import Data.Geo.GPX.Accessor.Time
-import Data.Geo.GPX.Accessor.Keywords
-import Data.Geo.GPX.Accessor.Bounds
-import Data.Geo.GPX.Accessor.Rtepts
-import Data.Geo.GPX.Accessor.Trkpts
-
-newtype Gpx = Gpx GpxType
-  deriving (Eq, Version, Creator, Metadata, Wpts, Rtes, Trks, Extensions, Name, Desc, Copyright, Links, Time, Keywords, Bounds, Rtepts, Trkpts)
-
-instance Author Gpx (Maybe PersonType) where
-  author = author . value
-  setAuthor = (gpx .) . (. value) . setAuthor
-
-gpx :: GpxType -- ^ The gpx element contents.
-       -> Gpx
-gpx = Gpx
-
-instance Show Gpx where
-  show (Gpx n) = show n
-
-instance XmlPickler Gpx where
-  xpickle = xpWrap (gpx, \(Gpx n) -> n) (xpElem "gpx" xpickle)
-
-instance Value Gpx GpxType where
-  value (Gpx x) = x
-  setValue x (Gpx _) = gpx x
-
--- | Reads a GPX file into a list of @Gpx@ values removing whitespace.
-readGpxFile :: FilePath -> IO [Gpx]
-readGpxFile = runX . xunpickleDocument (xpickle :: PU Gpx) [withRemoveWS yes, withValidate          no]
-
--- | Reads 0 or more GPX files into a list of @Gpx@ values removing whitespace.
-readGpxFiles :: [FilePath] -> IO [Gpx]
-readGpxFiles = fmap join . mapM readGpxFile
-
--- | Reads a GPX file, executes the given function on the XML, then writes the given file.
-interactGpxIO' :: SysConfigList -- ^ The options for reading the GPX file.
-                  -> FilePath -- ^ The GPX file to read.
-                  -> (Gpx -> IO Gpx) -- ^ The function to execute on the XML that is read.
-                  -> SysConfigList -- ^ The options for writing the GPX file.
-                  -> FilePath -- ^ The GPX file to write.
-                  -> IO ()
-interactGpxIO' froma from f toa to = runX (xunpickleDocument (xpickle :: PU Gpx) froma from >>> arrIO f >>> xpickleDocument (xpickle :: PU Gpx) toa to) >> return ()
-
--- | Reads a GPX file, executes the given functions on the XML, then writes the given file.
-interactsGpxIO' :: SysConfigList -- ^ The options for reading the GPX file.
-                   -> FilePath -- ^ The GPX file to read.
-                   -> [Gpx -> IO Gpx] -- ^ The function to execute on the XML that is read.
-                   -> SysConfigList -- ^ The options for writing the GPX file.
-                   -> FilePath -- ^ The GPX file to write.
-                   -> IO ()
-interactsGpxIO' froma from = interactGpxIO' froma from . sumIO'
-
--- | Reads a GPX file removing whitespace, executes the given function on the XML, then writes the given file with indentation.
-interactGpxIO :: FilePath -- ^ The GPX file to read.
-                 -> (Gpx -> IO Gpx) -- ^ The function to execute on the XML that is read.
-                 -> FilePath -- ^ The GPX file to write.
-                 -> IO ()
-interactGpxIO from f = interactGpxIO' [] from f []
-
--- | Reads a GPX file removing whitespace, executes the given functions on the XML, then writes the given file with indentation.
-interactsGpxIO :: FilePath -- ^ The GPX file to read.
-                  -> [Gpx -> IO Gpx] -- ^ The function to execute on the XML that is read.
-                  -> FilePath -- ^ The GPX file to write.
-                  -> IO ()
-interactsGpxIO from = interactGpxIO from . sumIO'
-
--- | Reads a GPX file, executes the given function on the XML, then writes the given file.
-interactGpx' :: SysConfigList -- ^ The options for reading the GPX file.
-                -> FilePath -- ^ The GPX file to read.
-                -> (Gpx -> Gpx) -- ^ The function to execute on the XML that is read.
-                -> SysConfigList -- ^ The options for writing the GPX file.
-                -> FilePath -- ^ The GPX file to write.
-                -> IO ()
-interactGpx' froma from f = interactGpxIO' froma from (return . f)
-
--- | Reads a GPX file, executes the given functions on the XML, then writes the given file.
-interactsGpx' :: SysConfigList -- ^ The options for reading the GPX file.
-                 -> FilePath -- ^ The GPX file to read.
-                 -> [Gpx -> Gpx] -- ^ The functions to execute on the XML that is read.
-                 -> SysConfigList -- ^ The options for writing the GPX file.
-                 -> FilePath -- ^ The GPX file to write.
-                 -> IO ()
-interactsGpx' froma from = interactGpx' froma from . sum'
-
--- | Reads a GPX file removing whitespace, executes the given function on the XML, then writes the given file with indentation.
-interactGpx :: FilePath -- ^ The GPX file to read.
-               -> (Gpx -> Gpx) -- ^ The function to execute on the XML that is read.
-               -> FilePath -- ^ The GPX file to write.
-               -> IO ()
-interactGpx from f = interactGpxIO from (return . f)
-
--- | Reads a GPX file removing whitespace, executes the given functions on the XML, then writes the given file with indentation.
-interactsGpx :: FilePath -- ^ The GPX file to read.
-                -> [Gpx -> Gpx] -- ^ The function to execute on the XML that is read.
-                -> FilePath -- ^ The GPX file to write.
-                -> IO ()
-interactsGpx from = interactGpx from . sum'
-
--- not exported
-
-sum' :: [a -> a] -> a -> a
-sum' = foldl' (.) id
-
-sumIO' :: (Monad m) => [a -> m a] -> a -> m a
-sumIO' = foldl' (>=>) return
diff --git a/Data/Geo/GPX/GpxType.hs b/Data/Geo/GPX/GpxType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/GpxType.hs
+++ /dev/null
@@ -1,126 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances  #-}
-
--- | Complex Type: @gpxType@ <http://www.topografix.com/GPX/1/1/#type_gpxType>
-module Data.Geo.GPX.GpxType(
-                             GpxType,
-                             gpxType
-                           ) where
-
-import Data.Geo.GPX.MetadataType
-import Data.Geo.GPX.WptType
-import Data.Geo.GPX.RteType
-import Data.Geo.GPX.TrkType
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.PersonType
-import Data.Geo.GPX.Accessor.Version
-import Data.Geo.GPX.Accessor.Creator
-import Data.Geo.GPX.Accessor.Metadata
-import Data.Geo.GPX.Accessor.Wpts
-import Data.Geo.GPX.Accessor.Rtes
-import Data.Geo.GPX.Accessor.Trks
-import Data.Geo.GPX.Accessor.Extensions
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Desc
-import Data.Geo.GPX.Accessor.Author
-import Data.Geo.GPX.Accessor.Copyright
-import Data.Geo.GPX.Accessor.Links
-import Data.Geo.GPX.Accessor.Time
-import Data.Geo.GPX.Accessor.Keywords
-import Data.Geo.GPX.Accessor.Bounds
-import Data.Geo.GPX.Accessor.Rtepts
-import Data.Geo.GPX.Accessor.Trkpts
-import Text.XML.HXT.Core
-import Text.XML.HXT.Extras
-import Data.Maybe
-
-data GpxType = GpxType String String (Maybe MetadataType) [WptType] [RteType] [TrkType] (Maybe ExtensionsType)
-  deriving (Eq, Show)
-
-gpxType :: String -- ^ The version.
-           -> String -- ^ The creator.
-           -> Maybe MetadataType -- ^ The metadata.
-           -> [WptType] -- ^ The waypoints (wpt).
-           -> [RteType] -- ^ The routes (rte).
-           -> [TrkType] -- ^ The tracks (trk).
-           -> Maybe ExtensionsType -- ^ The extensions.
-           -> GpxType
-gpxType = GpxType
-
-instance XmlPickler GpxType where
-  xpickle = xpWrap (\(version', creator', metadata', wpt', rte', trk', extensions') -> gpxType version' creator' metadata' wpt' rte' trk' extensions',
-              \(GpxType version' creator' metadata' wpt' rte' trk' extensions') -> (version', creator', metadata', wpt', rte', trk', extensions')) (xp7Tuple
-                (xpAttr "version" xpText)
-                (xpAttr "creator" xpText)
-                (xpOption (xpElem "metadata" xpickle))
-                (xpList (xpElem "wpt" xpickle))
-                (xpList (xpElem "rte" xpickle))
-                (xpList (xpElem "trk" xpickle))
-                (xpOption (xpElem "extensions" xpickle)))
-
-instance Version GpxType where
-  version (GpxType x _ _ _ _ _ _) = x
-  setVersion a (GpxType _ b c d e f g) = gpxType a b c d e f g
-
-instance Creator GpxType where
-  creator (GpxType _ x _ _ _ _ _) = x
-  setCreator b (GpxType a _ c d e f g) = gpxType a b c d e f g
-
-instance Metadata GpxType where
-  metadata (GpxType _ _ x _ _ _ _) = x
-  setMetadata c (GpxType a b _ d e f g) = gpxType a b c d e f g
-
-instance Wpts GpxType where
-  wpts (GpxType _ _ _ x _ _ _) = x
-  setWpts d (GpxType a b c _ e f g) = gpxType a b c d e f g
-
-instance Rtes GpxType where
-  rtes (GpxType _ _ _ _ x _ _) = x
-  setRtes e (GpxType a b c d _ f g) = gpxType a b c d e f g
-
-instance Trks GpxType where
-  trks (GpxType _ _ _ _ _ x _) = x
-  setTrks f (GpxType a b c d e _ g) = gpxType a b c d e f g
-
-instance Extensions GpxType where
-  extensions (GpxType _ _ _ _ _ _ x) = x
-  setExtensions g (GpxType a b c d e f _) = gpxType a b c d e f g
-
-instance Name GpxType where
-  name = (name =<<) . metadata
-  setName x (GpxType a b c d e f g) = gpxType a b (fmap (setName x) c) d e f g
-
-instance Desc GpxType where
-  desc = (desc =<<) . metadata
-  setDesc x (GpxType a b c d e f g) = gpxType a b (fmap (setDesc x) c) d e f g
-
-instance Author GpxType (Maybe PersonType) where
-  author = (author =<<) . metadata
-  setAuthor x (GpxType a b c d e f g) = gpxType a b (fmap (setAuthor x) c) d e f g
-
-instance Copyright GpxType where
-  copyright = (copyright =<<) . metadata
-  setCopyright x (GpxType a b c d e f g) = gpxType a b (fmap (setCopyright x) c) d e f g
-
-instance Links GpxType where
-  links = (links =<<) . maybeToList . metadata
-  setLinks x (GpxType a b c d e f g) = gpxType a b (fmap (setLinks x) c) d e f g
-
-instance Time GpxType where
-  time = (time =<<) . metadata
-  setTime x (GpxType a b c d e f g) = gpxType a b (fmap (setTime x) c) d e f g
-
-instance Keywords GpxType where
-  keywords = (keywords =<<) . metadata
-  setKeywords x (GpxType a b c d e f g) = gpxType a b (fmap (setKeywords x) c) d e f g
-
-instance Bounds GpxType where
-  bounds = (bounds =<<) . metadata
-  setBounds x (GpxType a b c d e f g) = gpxType a b (fmap (setBounds x) c) d e f g
-
-instance Rtepts GpxType where
-  rtepts = (rtepts =<<) . rtes
-  setRtepts x (GpxType a b c d e f g) = gpxType a b c d (fmap (setRtepts x) e) f g
-
-instance Trkpts GpxType where
-  trkpts = (trkpts =<<) . trks
-  setTrkpts x (GpxType a b c d e f g) = gpxType a b c d e (fmap (setTrkpts x) f) g
diff --git a/Data/Geo/GPX/LatitudeType.hs b/Data/Geo/GPX/LatitudeType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/LatitudeType.hs
+++ /dev/null
@@ -1,28 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
-
--- | Simple Type: @latitudeType@ <http://www.topografix.com/GPX/1/1/#type_latitudeType>
-module Data.Geo.GPX.LatitudeType(
-                                  LatitudeType,
-                                  latitudeType
-                                ) where
-
-import Data.Geo.GPX.Accessor.Value
-import Data.Fixed
-import Text.XML.HXT.Core
-
-newtype LatitudeType = LatitudeType Double
-  deriving (Eq, Ord, Enum, Num, Fractional, Floating, Real, RealFrac, RealFloat)
-
-latitudeType :: Double -- ^ The value which will be between -90 and 90 (values out of the range are truncated using a modulus operation).
-                -> LatitudeType
-latitudeType n = LatitudeType ((n + 90) `mod'` 180 - 90)
-
-instance XmlPickler LatitudeType where
-  xpickle = xpWrap (latitudeType, \(LatitudeType n) -> n) xpPrim
-
-instance Show LatitudeType where
-  show (LatitudeType n) = show n
-
-instance Value LatitudeType Double where
-  value (LatitudeType x) = x
-  setValue x (LatitudeType _) = latitudeType x
diff --git a/Data/Geo/GPX/LinkType.hs b/Data/Geo/GPX/LinkType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/LinkType.hs
+++ /dev/null
@@ -1,22 +0,0 @@
--- | Complex Type: @linkType@ <http://www.topografix.com/GPX/1/1/#type_linkType>
-module Data.Geo.GPX.LinkType(
-                              LinkType,
-                              linkType
-                            ) where
-
-import Text.XML.HXT.Core
-
-data LinkType = LinkType String (Maybe String) (Maybe String)
-  deriving (Eq, Show)
-
-linkType :: String -- ^ The href.
-            -> Maybe String -- ^ The text.
-            -> Maybe String -- ^ The type.
-            -> LinkType
-linkType = LinkType
-
-instance XmlPickler LinkType where
-  xpickle = xpWrap (\(href, text, type') -> linkType href text type', \(LinkType href text type') -> (href, text, type')) (xpTriple
-              (xpAttr "href" xpText)
-              (xpOption (xpElem "text" xpText))
-              (xpOption (xpElem "type" xpText)))
diff --git a/Data/Geo/GPX/LongitudeType.hs b/Data/Geo/GPX/LongitudeType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/LongitudeType.hs
+++ /dev/null
@@ -1,28 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
-
--- | Simple Type: @latitudeType@ <http://www.topografix.com/GPX/1/1/#type_latitudeType>
-module Data.Geo.GPX.LongitudeType(
-                                   LongitudeType,
-                                   longitudeType
-                                 ) where
-
-import Data.Geo.GPX.Accessor.Value
-import Data.Fixed
-import Text.XML.HXT.Core
-
-newtype LongitudeType = LongitudeType Double
-  deriving (Eq, Ord, Enum, Num, Fractional, Floating, Real, RealFrac, RealFloat)
-
-longitudeType :: Double -- ^ The value which will be between -180 and 180 (values out of the range are truncated using a modulus operation).
-                 -> LongitudeType
-longitudeType n = LongitudeType ((n + 180) `mod'` 360 - 180)
-
-instance XmlPickler LongitudeType where
-  xpickle = xpWrap (longitudeType, \(LongitudeType n) -> n) xpPrim
-
-instance Show LongitudeType where
-  show (LongitudeType n) = show n
-
-instance Value LongitudeType Double where
-  value (LongitudeType x) = x
-  setValue x (LongitudeType _) = longitudeType x
diff --git a/Data/Geo/GPX/MetadataType.hs b/Data/Geo/GPX/MetadataType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/MetadataType.hs
+++ /dev/null
@@ -1,88 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances  #-}
-
--- | Complex Type: @metadataType@ <http://www.topografix.com/GPX/1/1/#type_metadataType>
-module Data.Geo.GPX.MetadataType(
-                                  MetadataType,
-                                  metadataType
-                                ) where
-
-import Data.Geo.GPX.PersonType
-import Data.Geo.GPX.CopyrightType
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.BoundsType
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Desc
-import Data.Geo.GPX.Accessor.Author
-import Data.Geo.GPX.Accessor.Copyright
-import Data.Geo.GPX.Accessor.Links
-import Data.Geo.GPX.Accessor.Time
-import Data.Geo.GPX.Accessor.Keywords
-import Data.Geo.GPX.Accessor.Bounds
-import Data.Geo.GPX.Accessor.Extensions
-import Text.XML.HXT.Core
-import Text.XML.HXT.Extras
-import Text.XML.XSD.DateTime
-
-data MetadataType = MetadataType (Maybe String) (Maybe String) (Maybe PersonType) (Maybe CopyrightType) [LinkType] (Maybe DateTime) (Maybe String) (Maybe BoundsType) (Maybe ExtensionsType)
-  deriving (Eq, Show)
-
-metadataType :: Maybe String -- ^ The name.
-                -> Maybe String -- ^ The desc.
-                -> Maybe PersonType -- ^ The author.
-                -> Maybe CopyrightType -- ^ The copyright.
-                -> [LinkType] -- ^ The links (link).
-                -> Maybe DateTime -- ^ The time.
-                -> Maybe String -- ^ The keywords.
-                -> Maybe BoundsType -- ^ The bounds.
-                -> Maybe ExtensionsType -- ^ The extensions
-                -> MetadataType
-metadataType = MetadataType
-
-instance XmlPickler MetadataType where
-  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i) -> metadataType a b c d e f g h i, \(MetadataType a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
-              (xpOption (xpElem "name" xpText))
-              (xpOption (xpElem "desc" xpText))
-              (xpOption (xpElem "author" xpickle))
-              (xpOption (xpElem "copyright" xpickle))
-              (xpList (xpElem "link" xpickle))
-              (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText)))
-              (xpOption (xpElem "keywords" xpText))
-              (xpOption (xpElem "bounds" xpickle))
-              (xpOption (xpElem "extensions" xpickle)))
-
-instance Name MetadataType where
-  name (MetadataType x _ _ _ _ _ _ _ _) = x
-  setName a (MetadataType _ b c d e f g h i) = metadataType a b c d e f g h i
-
-instance Desc MetadataType where
-  desc (MetadataType _ x _ _ _ _ _ _ _) = x
-  setDesc b (MetadataType a _ c d e f g h i) = metadataType a b c d e f g h i
-
-instance Author MetadataType (Maybe PersonType) where
-  author (MetadataType _ _ x _ _ _ _ _ _) = x
-  setAuthor c (MetadataType a b _ d e f g h i) = metadataType a b c d e f g h i
-
-instance Copyright MetadataType where
-  copyright (MetadataType _ _ _ x _ _ _ _ _) = x
-  setCopyright d (MetadataType a b c _ e f g h i) = metadataType a b c d e f g h i
-
-instance Links MetadataType where
-  links (MetadataType _ _ _ _ x _ _ _ _) = x
-  setLinks e (MetadataType a b c d _ f g h i) = metadataType a b c d e f g h i
-
-instance Time MetadataType where
-  time (MetadataType _ _ _ _ _ x _ _ _) = x
-  setTime f (MetadataType a b c d e _ g h i) = metadataType a b c d e f g h i
-
-instance Keywords MetadataType where
-  keywords (MetadataType _ _ _ _ _ _ x _ _) = x
-  setKeywords g (MetadataType a b c d e f _ h i) = metadataType a b c d e f g h i
-
-instance Bounds MetadataType where
-  bounds (MetadataType _ _ _ _ _ _ _ x _) = x
-  setBounds h (MetadataType a b c d e f g _ i) = metadataType a b c d e f g h i
-
-instance Extensions MetadataType where
-  extensions (MetadataType _ _ _ _ _ _ _ _ x) = x
-  setExtensions i (MetadataType a b c d e f g h _) = metadataType a b c d e f g h i
diff --git a/Data/Geo/GPX/PersonType.hs b/Data/Geo/GPX/PersonType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/PersonType.hs
+++ /dev/null
@@ -1,39 +0,0 @@
--- | Complex Type: @personType@ <http://www.topografix.com/GPX/1/1/#type_personType>
-module Data.Geo.GPX.PersonType(
-                                PersonType,
-                                personType
-                              ) where
-
-import Data.Geo.GPX.EmailType
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Email
-import Data.Geo.GPX.Accessor.Link
-import Text.XML.HXT.Core
-
-data PersonType = PersonType (Maybe String) (Maybe EmailType) (Maybe LinkType)
-  deriving (Eq, Show)
-
-personType :: Maybe String -- ^ The name.
-              -> Maybe EmailType -- ^ The email.
-              -> Maybe LinkType -- ^ The link.
-              -> PersonType
-personType = PersonType
-
-instance XmlPickler PersonType where
-  xpickle = xpWrap (\(name', email', link') -> personType name' email' link', \(PersonType name' email' link') -> (name', email', link')) (xpTriple
-              (xpOption (xpElem "name" xpText))
-              (xpOption (xpElem "email" xpickle))
-              (xpOption (xpElem "link" xpickle)))
-
-instance Name PersonType where
-  name (PersonType x _ _) = x
-  setName a (PersonType _ b c) = personType a b c
-
-instance Email PersonType where
-  email (PersonType _ x _) = x
-  setEmail b (PersonType a _ c) = personType a b c
-
-instance Link PersonType where
-  link (PersonType _ _ x) = x
-  setLink c (PersonType a b _) = personType a b c
diff --git a/Data/Geo/GPX/PtType.hs b/Data/Geo/GPX/PtType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/PtType.hs
+++ /dev/null
@@ -1,48 +0,0 @@
--- | Complex Type: @ptType@ <http://www.topografix.com/GPX/1/1/#type_ptType>
-module Data.Geo.GPX.PtType(
-                            PtType,
-                            ptType
-                          ) where
-
-import Data.Geo.GPX.LatitudeType
-import Data.Geo.GPX.LongitudeType
-import Data.Geo.GPX.Accessor.Lat
-import Data.Geo.GPX.Accessor.Lon
-import Data.Geo.GPX.Accessor.Ele
-import Data.Geo.GPX.Accessor.Time
-import Text.XML.HXT.Core
-import Text.XML.XSD.DateTime
-
-data PtType = PtType LatitudeType LongitudeType (Maybe Double) (Maybe DateTime)
-  deriving (Eq, Show)
-
-ptType :: LatitudeType -- ^ The lat.
-          -> LongitudeType -- ^ The lon.
-          -> Maybe Double -- ^ The ele.
-          -> Maybe DateTime -- ^ The time.
-          -> PtType
-ptType = PtType
-
-instance XmlPickler PtType where
-  xpickle = xpWrap (\(lat', lon', ele', time') -> ptType lat' lon' ele' time',
-                   \(PtType lat' lon' ele' time') -> (lat', lon', ele', time')) (xp4Tuple
-                     (xpAttr "lat" xpickle)
-                     (xpAttr "lon" xpickle)
-                     (xpOption (xpElem "ele" xpPrim))
-                     (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText))))
-
-instance Lat PtType where
-  lat (PtType x _ _ _) = x
-  setLat a (PtType _ b c d) = ptType a b c d
-
-instance Lon PtType where
-  lon (PtType _ x _ _) = x
-  setLon b (PtType a _ c d) = ptType a b c d
-
-instance Ele PtType where
-  ele (PtType _ _ x _) = x
-  setEle c (PtType a b _ d) = ptType a b c d
-
-instance Time PtType where
-  time (PtType _ _ _ x) = x
-  setTime d (PtType a b c _) = ptType a b c d
diff --git a/Data/Geo/GPX/PtsegType.hs b/Data/Geo/GPX/PtsegType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/PtsegType.hs
+++ /dev/null
@@ -1,23 +0,0 @@
--- | Complex Type: @ptsegType@ <http://www.topografix.com/GPX/1/1/#type_ptsegType>
-module Data.Geo.GPX.PtsegType(
-                               PtsegType,
-                               ptsegType
-                             ) where
-
-import Data.Geo.GPX.PtType
-import Data.Geo.GPX.Accessor.Pts
-import Text.XML.HXT.Core
-
-newtype PtsegType = PtsegType [PtType]
-  deriving (Eq, Show)
-
-ptsegType :: [PtType] -- ^ The points (pt).
-             -> PtsegType
-ptsegType = PtsegType
-
-instance XmlPickler PtsegType where
-  xpickle = xpWrap (ptsegType, \(PtsegType k) -> k) (xpList (xpElem "pt" xpickle))
-
-instance Pts PtsegType where
-  pts (PtsegType x) = x
-  setPts x (PtsegType _) = ptsegType x
diff --git a/Data/Geo/GPX/RteType.hs b/Data/Geo/GPX/RteType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/RteType.hs
+++ /dev/null
@@ -1,83 +0,0 @@
--- | Complex Type: @rteType@ <http://www.topografix.com/GPX/1/1/#type_rteType>
-module Data.Geo.GPX.RteType(
-                             RteType,
-                             rteType
-                           ) where
-
-import Data.Geo.GPX.WptType
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Cmt
-import Data.Geo.GPX.Accessor.Desc
-import Data.Geo.GPX.Accessor.Src
-import Data.Geo.GPX.Accessor.Links
-import Data.Geo.GPX.Accessor.Number
-import Data.Geo.GPX.Accessor.Type
-import Data.Geo.GPX.Accessor.Extensions
-import Data.Geo.GPX.Accessor.Rtepts
-import Text.XML.HXT.Core
-import Text.XML.HXT.Extras
-
-data RteType = RteType (Maybe String) (Maybe String) (Maybe String) (Maybe String) [LinkType] (Maybe Int) (Maybe String) (Maybe ExtensionsType) [WptType]
-  deriving (Eq, Show)
-
-rteType :: Maybe String -- ^ The name.
-           -> Maybe String -- ^ The cmt.
-           -> Maybe String -- ^ The desc.
-           -> Maybe String -- ^ The src.
-           -> [LinkType] -- ^ The links (link).
-           -> Maybe Int -- ^ The number.
-           -> Maybe String -- ^ The type.
-           -> Maybe ExtensionsType -- ^ The extensions.
-           -> [WptType] -- ^ The route points (rtept).
-           -> RteType
-rteType a b c d e f = RteType a b c d e (fmap abs f)
-
-instance XmlPickler RteType where
-  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i) -> rteType a b c d e f g h i, \(RteType a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
-              (xpOption (xpElem "name" xpText))
-              (xpOption (xpElem "cmt" xpText))
-              (xpOption (xpElem "desc" xpText))
-              (xpOption (xpElem "src" xpText))
-              (xpList (xpElem "link" xpickle))
-              (xpOption (xpElem "number" xpPrim))
-              (xpOption (xpElem "type" xpText))
-              (xpOption (xpElem "extensions" xpickle))
-              (xpList (xpElem "rtept" xpickle)))
-
-instance Name RteType where
-  name (RteType x _ _ _ _ _ _ _ _) = x
-  setName a (RteType _ b c d e f g h i) = rteType a b c d e f g h i
-
-instance Cmt RteType where
-  cmt (RteType _ x _ _ _ _ _ _ _) = x
-  setCmt b (RteType a _ c d e f g h i) = rteType a b c d e f g h i
-
-instance Desc RteType where
-  desc (RteType _ _ x _ _ _ _ _ _) = x
-  setDesc c (RteType a b _ d e f g h i) = rteType a b c d e f g h i
-
-instance Src RteType where
-  src (RteType _ _ _ x _ _ _ _ _) = x
-  setSrc d (RteType a b c _ e f g h i) = rteType a b c d e f g h i
-
-instance Links RteType where
-  links (RteType _ _ _ _ x _ _ _ _) = x
-  setLinks e (RteType a b c d _ f g h i) = rteType a b c d e f g h i
-
-instance Number RteType where
-  number (RteType _ _ _ _ _ x _ _ _) = x
-  setNumber f (RteType a b c d e _ g h i) = rteType a b c d e f g h i
-
-instance Type RteType where
-  type' (RteType _ _ _ _ _ _ x _ _) = x
-  setType g (RteType a b c d e f _ h i) = rteType a b c d e f g h i
-
-instance Extensions RteType where
-  extensions (RteType _ _ _ _ _ _ _ x _) = x
-  setExtensions h (RteType a b c d e f g _ i) = rteType a b c d e f g h i
-
-instance Rtepts RteType where
-  rtepts (RteType _ _ _ _ _ _ _ _ x) = x
-  setRtepts i (RteType a b c d e f g h _) = rteType a b c d e f g h i
diff --git a/Data/Geo/GPX/TrkType.hs b/Data/Geo/GPX/TrkType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/TrkType.hs
+++ /dev/null
@@ -1,89 +0,0 @@
--- | Complex Type: @trkType@ <http://www.topografix.com/GPX/1/1/#type_trkType>
-module Data.Geo.GPX.TrkType(
-                             TrkType,
-                             trkType
-                           ) where
-
-import Data.Geo.GPX.TrksegType
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Cmt
-import Data.Geo.GPX.Accessor.Desc
-import Data.Geo.GPX.Accessor.Src
-import Data.Geo.GPX.Accessor.Links
-import Data.Geo.GPX.Accessor.Number
-import Data.Geo.GPX.Accessor.Type
-import Data.Geo.GPX.Accessor.Extensions
-import Data.Geo.GPX.Accessor.Trksegs
-import Data.Geo.GPX.Accessor.Trkpts
-import Text.XML.HXT.Core
-import Text.XML.HXT.Extras
-
-data TrkType = TrkType (Maybe String) (Maybe String) (Maybe String) (Maybe String) [LinkType] (Maybe Int) (Maybe String) (Maybe ExtensionsType) [TrksegType]
-  deriving (Eq, Show)
-
-trkType :: Maybe String -- ^ The name.
-           -> Maybe String -- ^ The cmt.
-           -> Maybe String -- ^ The desc.
-           -> Maybe String -- ^ The src.
-           -> [LinkType] -- ^ The links (link).
-           -> Maybe Int -- ^ The number.
-           -> Maybe String -- ^ The type.
-           -> Maybe ExtensionsType -- ^ The extensions.
-           -> [TrksegType] -- ^ The track segments (trkseg).
-           -> TrkType
-trkType a b c d e f = TrkType a b c d e (fmap abs f)
-
-instance XmlPickler TrkType where
-  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i) -> trkType a b c d e f g h i, \(TrkType a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
-              (xpOption (xpElem "name" xpText))
-              (xpOption (xpElem "cmt" xpText))
-              (xpOption (xpElem "desc" xpText))
-              (xpOption (xpElem "src" xpText))
-              (xpList (xpElem "link" xpickle))
-              (xpOption (xpElem "number" xpPrim))
-              (xpOption (xpElem "type" xpText))
-              (xpOption (xpElem "extensions" xpickle))
-              (xpList (xpElem "trkseg" xpickle)))
-
-instance Name TrkType where
-  name (TrkType x _ _ _ _ _ _ _ _) = x
-  setName a (TrkType _ b c d e f g h i) = trkType a b c d e f g h i
-
-instance Cmt TrkType where
-  cmt (TrkType _ x _ _ _ _ _ _ _) = x
-  setCmt b (TrkType a _ c d e f g h i) = trkType a b c d e f g h i
-
-instance Desc TrkType where
-  desc (TrkType _ _ x _ _ _ _ _ _) = x
-  setDesc c (TrkType a b _ d e f g h i) = trkType a b c d e f g h i
-
-instance Src TrkType where
-  src (TrkType _ _ _ x _ _ _ _ _) = x
-  setSrc d (TrkType a b c _ e f g h i) = trkType a b c d e f g h i
-
-instance Links TrkType where
-  links (TrkType _ _ _ _ x _ _ _ _) = x
-  setLinks e (TrkType a b c d _ f g h i) = trkType a b c d e f g h i
-
-instance Number TrkType where
-  number (TrkType _ _ _ _ _ x _ _ _) = x
-  setNumber f (TrkType a b c d e _ g h i) = trkType a b c d e f g h i
-
-instance Type TrkType where
-  type' (TrkType _ _ _ _ _ _ x _ _) = x
-  setType g (TrkType a b c d e f _ h i) = trkType a b c d e f g h i
-
-instance Extensions TrkType where
-  extensions (TrkType _ _ _ _ _ _ _ x _) = x
-  setExtensions h (TrkType a b c d e f g _ i) = trkType a b c d e f g h i
-
-instance Trksegs TrkType where
-  trksegs (TrkType _ _ _ _ _ _ _ _ x) = x
-  setTrksegs i (TrkType a b c d e f g h _) = trkType a b c d e f g h i
-
-instance Trkpts TrkType where
-  trkpts = (trkpts =<<) . trksegs
-  setTrkpts x (TrkType a b c d e f g h i) = trkType a b c d e f g h (fmap (setTrkpts x) i)
-
diff --git a/Data/Geo/GPX/TrksegType.hs b/Data/Geo/GPX/TrksegType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/TrksegType.hs
+++ /dev/null
@@ -1,32 +0,0 @@
--- | Complex Type: @trksegType@ <http://www.topografix.com/GPX/1/1/#type_trksegType>
-module Data.Geo.GPX.TrksegType(
-                                TrksegType,
-                                trksegType
-                              ) where
-
-import Data.Geo.GPX.WptType
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.Accessor.Trkpts
-import Data.Geo.GPX.Accessor.Extensions
-import Text.XML.HXT.Core
-
-data TrksegType = TrksegType [WptType] (Maybe ExtensionsType)
-  deriving (Eq, Show)
-
-trksegType :: [WptType] -- ^ The track points (trkpt).
-              -> Maybe ExtensionsType -- ^ The extensions.
-              -> TrksegType
-trksegType = TrksegType
-
-instance XmlPickler TrksegType where
-  xpickle = xpWrap (uncurry trksegType, \(TrksegType trkpt' extensions') -> (trkpt', extensions')) (xpPair
-              (xpList (xpElem "trkpt" xpickle))
-              (xpOption (xpElem "extensions" xpickle)))
-
-instance Trkpts TrksegType where
-  trkpts (TrksegType x _) = x
-  setTrkpts a (TrksegType _ b) = trksegType a b
-
-instance Extensions TrksegType where
-  extensions (TrksegType _ x) = x
-  setExtensions b (TrksegType a _) = trksegType a b
diff --git a/Data/Geo/GPX/Util/Remove.hs b/Data/Geo/GPX/Util/Remove.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Util/Remove.hs
+++ /dev/null
@@ -1,44 +0,0 @@
--- | Utility functions for removing elements of GPX files.
-module Data.Geo.GPX.Util.Remove(
-                                 removeWpts,
-                                 removeTrks,
-                                 removeRtes,
-                                 removeMetadata,
-                                 removeExtensions
-                               ) where
-
-import Data.Geo.GPX.Accessor.Wpts
-import Data.Geo.GPX.Accessor.Rtes
-import Data.Geo.GPX.Accessor.Trks
-import Data.Geo.GPX.Accessor.Metadata
-import Data.Geo.GPX.Accessor.Extensions
-
--- | Removes all waypoints (wpt) elements from the given value.
-removeWpts :: (Wpts a) =>
-              a
-              -> a
-removeWpts = usingWpts (const [])
-
--- | Removes all tracks (trk) elements from the given value.
-removeTrks :: (Trks a) =>
-              a
-              -> a
-removeTrks = usingTrks (const [])
-
--- | Removes all routes (rte) elements from the given value.
-removeRtes :: (Rtes a) =>
-              a
-              -> a
-removeRtes = usingRtes (const [])
-
--- | Removes the metadata element from the given value.
-removeMetadata :: (Metadata a) =>
-                  a
-                  -> a
-removeMetadata = usingMetadata (const Nothing)
-
--- | Removes the extensions element from the given value.
-removeExtensions :: (Extensions a) =>
-                    a
-                    -> a
-removeExtensions = usingExtensions (const Nothing)
diff --git a/Data/Geo/GPX/Util/Reverse.hs b/Data/Geo/GPX/Util/Reverse.hs
deleted file mode 100644
--- a/Data/Geo/GPX/Util/Reverse.hs
+++ /dev/null
@@ -1,47 +0,0 @@
--- | Reversing element lists of a GPX files.
-module Data.Geo.GPX.Util.Reverse(
-                                  reverseRtes,
-                                  reverseTrks,
-                                  reverseTrksegs,
-                                  reverseWpts,
-                                  reverseConservingTime
-                                ) where
-
-import Data.Geo.GPX.Accessor.Trks
-import Data.Geo.GPX.Accessor.Trkpts
-import Data.Geo.GPX.Accessor.Trksegs
-import Data.Geo.GPX.Accessor.Wpts
-import Data.Geo.GPX.Accessor.Rtes
-import Data.Geo.GPX.Accessor.Rtepts
-import Data.Geo.GPX.Accessor.Time
-import Control.Applicative
-
--- | Reverses a list of routes (rte).
-reverseRtes :: (Rtes a) =>
-               a
-               -> a
-reverseRtes = usingRtes (map (usingRtepts reverse) . reverse)
-
--- | Reverses a list of tracks (trk).
-reverseTrks :: (Trks a) =>
-               a
-               -> a
-reverseTrks = usingTrks (map reverseTrksegs . reverse)
-
--- | Reverses a list of track segments (trkseg).
-reverseTrksegs :: (Trksegs a) =>
-                  a
-                  -> a
-reverseTrksegs = usingTrksegs (map (usingTrkpts reverse) . reverse)
-
--- | Reverses a list of waypoints (wpt).
-reverseWpts :: (Wpts a) =>
-               a
-               -> a
-reverseWpts = usingWpts reverse
-
--- | Reverses a list of elements with a time, however, the time is not reversed.
-reverseConservingTime :: (Time a) =>
-                         [a]
-                         -> [a]
-reverseConservingTime = zipWith setTime . map time <*> reverse
diff --git a/Data/Geo/GPX/WptType.hs b/Data/Geo/GPX/WptType.hs
deleted file mode 100644
--- a/Data/Geo/GPX/WptType.hs
+++ /dev/null
@@ -1,226 +0,0 @@
--- | Complex Type: @wptType@ <http://www.topografix.com/GPX/1/1/#type_wptType>
-module Data.Geo.GPX.WptType(
-                             WptType,
-                             wptType,
-                             wptType'
-                           ) where
-
-import Data.Geo.GPX.LatitudeType
-import Data.Geo.GPX.LongitudeType
-import Data.Geo.GPX.DegreesType
-import Data.Geo.GPX.LinkType
-import Data.Geo.GPX.FixType
-import Data.Geo.GPX.DgpsStationType
-import Data.Geo.GPX.ExtensionsType
-import Data.Geo.GPX.Accessor.Lat
-import Data.Geo.GPX.Accessor.Lon
-import Data.Geo.GPX.Accessor.Ele
-import Data.Geo.GPX.Accessor.Time
-import Data.Geo.GPX.Accessor.Magvar
-import Data.Geo.GPX.Accessor.Geoidheight
-import Data.Geo.GPX.Accessor.Name
-import Data.Geo.GPX.Accessor.Cmt
-import Data.Geo.GPX.Accessor.Desc
-import Data.Geo.GPX.Accessor.Src
-import Data.Geo.GPX.Accessor.Links
-import Data.Geo.GPX.Accessor.Sym
-import Data.Geo.GPX.Accessor.Type
-import Data.Geo.GPX.Accessor.Fix
-import Data.Geo.GPX.Accessor.Sat
-import Data.Geo.GPX.Accessor.Hdop
-import Data.Geo.GPX.Accessor.Vdop
-import Data.Geo.GPX.Accessor.Pdop
-import Data.Geo.GPX.Accessor.Ageofdgpsdata
-import Data.Geo.GPX.Accessor.Dgpsid
-import Data.Geo.GPX.Accessor.Extensions
-import Data.Geo.GPX.Accessor.Latlon
-import Data.Geo.GPX.Accessor.Value
-import Text.XML.HXT.Core
-import Text.XML.HXT.Extras
-import Text.XML.XSD.DateTime
-
-data WptType = WptType LatitudeType
-                       LongitudeType
-                       (Maybe Double)
-                       (Maybe DateTime)
-                       (Maybe DegreesType)
-                       (Maybe Double)
-                       (Maybe String)
-                       (Maybe String)
-                       (Maybe String)
-                       (Maybe String)
-                       [LinkType]
-                       (Maybe String)
-                       (Maybe String)
-                       (Maybe FixType)
-                       (Maybe Int)
-                       (Maybe Double)
-                       (Maybe Double)
-                       (Maybe Double)
-                       (Maybe Double)
-                       (Maybe DgpsStationType)
-                       (Maybe ExtensionsType)
-  deriving (Eq, Show)
-
-wptType :: LatitudeType -- ^ The lat.
-           -> LongitudeType -- ^ The lon.
-           -> Maybe Double -- ^ The ele.
-           -> Maybe DateTime -- ^ The time.
-           -> Maybe DegreesType -- ^ The magvar.
-           -> Maybe Double -- ^ The geoidheight.
-           -> Maybe String -- ^ The name.
-           -> Maybe String -- ^ The cmt.
-           -> Maybe String -- ^ The desc.
-           -> Maybe String -- ^ The src.
-           -> [LinkType] -- ^ The links (link).
-           -> Maybe String -- ^ The sym.
-           -> Maybe String -- ^ The type.
-           -> Maybe FixType -- ^ The fix.
-           -> Maybe Int -- ^ The sat.
-           -> Maybe Double -- ^ The hdop.
-           -> Maybe Double -- ^ The vdop.
-           -> Maybe Double -- ^ The pdop.
-           -> Maybe Double -- ^ The ageofdgpsdata.
-           -> Maybe DgpsStationType -- ^ The dgpsid.
-           -> Maybe ExtensionsType -- ^ The extensions.
-           -> WptType
-wptType a b c d e f g h i j k l m n o p = WptType a b c d e f g h i j k l m n o (fmap abs p)
-
--- | A waypoint with only a latitude and longitude.
-wptType' :: LatitudeType -- ^ The lat.
-            -> LongitudeType -- ^ The lon.
-            -> WptType
-wptType' lat' lon' = wptType lat'
-                           lon'
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           []
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-                           Nothing
-
-instance XmlPickler WptType where
-  xpickle = xpWrap (\(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> wptType a b c d e f g h i j k l m n o p q r s t u,
-                   \(WptType a b c d e f g h i j k l m n o p q r s t u) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)) (xp21Tuple
-                    (xpAttr "lat" xpickle)
-                    (xpAttr "lon" xpickle)
-                    (xpOption (xpElem "ele" xpPrim))
-                    (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText)))
-                    (xpOption (xpElem "magvar" xpickle))
-                    (xpOption (xpElem "geoidheight" xpPrim))
-                    (xpOption (xpElem "name" xpText))
-                    (xpOption (xpElem "cmt" xpText))
-                    (xpOption (xpElem "desc" xpText))
-                    (xpOption (xpElem "src" xpText))
-                    (xpList (xpElem "link" xpickle))
-                    (xpOption (xpElem "sym" xpText))
-                    (xpOption (xpElem "type" xpText))
-                    (xpOption (xpElem "fix" xpickle))
-                    (xpOption (xpElem "sat" xpPrim))
-                    (xpOption (xpElem "hdop" xpPrim))
-                    (xpOption (xpElem "vdop" xpPrim))
-                    (xpOption (xpElem "pdop" xpPrim))
-                    (xpOption (xpElem "ageofdgpsdata" xpPrim))
-                    (xpOption (xpElem "dgpsid" xpickle))
-                    (xpOption (xpElem "extensions" xpickle)))
-
-instance Lat WptType where
-  lat (WptType x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setLat a (WptType _ b c d e f g h i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Lon WptType where
-  lon (WptType _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setLon b (WptType a _ c d e f g h i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Ele WptType where
-  ele (WptType _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setEle c (WptType a b _ d e f g h i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Time WptType where
-  time (WptType _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setTime d (WptType a b c _ e f g h i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Magvar WptType where
-  magvar (WptType _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setMagvar e (WptType a b c d _ f g h i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Geoidheight WptType where
-  geoidheight (WptType _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setGeoidheight f (WptType a b c d e _ g h i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Name WptType where
-  name (WptType _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setName g (WptType a b c d e f _ h i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Cmt WptType where
-  cmt (WptType _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setCmt h (WptType a b c d e f g _ i j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Desc WptType where
-  desc (WptType _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _) = x
-  setDesc i (WptType a b c d e f g h _ j k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Src WptType where
-  src (WptType _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _) = x
-  setSrc j (WptType a b c d e f g h i _ k l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Links WptType where
-  links (WptType _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _) = x
-  setLinks k (WptType a b c d e f g h i j _ l m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Sym WptType where
-  sym (WptType _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _) = x
-  setSym l (WptType a b c d e f g h i j k _ m n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Type WptType where
-  type' (WptType _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _) = x
-  setType m (WptType a b c d e f g h i j k l _ n o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Fix WptType where
-  fix (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _) = x
-  setFix n (WptType a b c d e f g h i j k l m _ o p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Sat WptType where
-  sat (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _) = x
-  setSat o (WptType a b c d e f g h i j k l m n _ p q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Hdop WptType where
-  hdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _) = x
-  setHdop p (WptType a b c d e f g h i j k l m n o _ q r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Vdop WptType where
-  vdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _) = x
-  setVdop q (WptType a b c d e f g h i j k l m n o p _ r s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Pdop WptType where
-  pdop (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _) = x
-  setPdop r (WptType a b c d e f g h i j k l m n o p q _ s t u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Ageofdgpsdata WptType where
-  ageofdgpsdata (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _ _) = x
-  setAgeofdgpsdata s (WptType a b c d e f g h i j k l m n o p q r _ t u) = wptType a b c d e f g h i j k l m n o p q r s t u
---
-instance Dgpsid WptType where
-  dgpsid (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x _) = x
-  setDgpsid t (WptType a b c d e f g h i j k l m n o p q r s _ u) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Extensions WptType where
-  extensions (WptType _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ x) = x
-  setExtensions u (WptType a b c d e f g h i j k l m n o p q r s t _) = wptType a b c d e f g h i j k l m n o p q r s t u
-
-instance Latlon WptType where
-  latlon e = (value (lat e), value (lon e))
-  setLatlon (a, b) (WptType _ _ c d e f g h i j k l m n o p q r s t u) = wptType (latitudeType a) (longitudeType b) c d e f g h i j k l m n o p q r s t u
diff --git a/GPX.cabal b/GPX.cabal
--- a/GPX.cabal
+++ b/GPX.cabal
@@ -1,98 +1,107 @@
 Name:                GPX
-Version:             0.5
+Version:             0.8.0
 License:             BSD3
 License-File:        LICENSE
 Synopsis:            Parse GPX files
 Description:         Parse GPS Exchange (GPX) files using HXT into data structures.
-Homepage:            http://code.google.com/p/geo-gpx/
+Homepage:            https://github.com/tonymorris/geo-gpx
 Category:            Utils
-Author:              Tony Morris
-Maintainer:          code@tmorris.net
-Copyright:           2009, 2010 Tony Morris
-build-type:          Simple
-cabal-version:       >= 1.2
+Author:              Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>, Thomas DuBuisson
+Maintainer:          Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>, Thomas DuBuisson
+Copyright:           2009 -- 2012 Tony Morris, Thomas DuBuisson
+Build-Type:          Simple
+Cabal-Version:       >= 1.6
+Source-Repository    head
+  Type:              git
+  Location:          git@github.com:tonymorris/geo-gpx.git
 
-Flag small_base
-  Description:     Choose the new, split-up base package.
 
+Flag                 small_base
+  Description:       Choose the new, split-up base package.
+
 Library
-  if flag(small_base)
-    Build-Depends: base < 5 && >= 3, hxt >= 9.1, hxt-extras >= 0.4.1, containers, xsd
-  else
-    Build-Depends: base < 5 && >= 3, hxt, hxt-extras, containers, xsd
+  Build-Depends:     base < 5 && >= 3
+                     , hxt >= 9
+                     , containers
+                     , comonad-transformers
+                     , comonad >= 4.0
+                     , data-lens
+                     , xsd >= 0.3 && < 0.4
+                     , newtype
 
-  GHC-Options:    -Wall
-  Exposed-Modules: Data.Geo.GPX
-                   Data.Geo.GPX.DgpsStationType
-                   Data.Geo.GPX.FixType
-                   Data.Geo.GPX.DegreesType
-                   Data.Geo.GPX.LongitudeType
-                   Data.Geo.GPX.LatitudeType
-                   Data.Geo.GPX.BoundsType
-                   Data.Geo.GPX.ExtensionsType
-                   Data.Geo.GPX.PtType
-                   Data.Geo.GPX.PtsegType
-                   Data.Geo.GPX.EmailType
-                   Data.Geo.GPX.LinkType
-                   Data.Geo.GPX.PersonType
-                   Data.Geo.GPX.CopyrightType
-                   Data.Geo.GPX.WptType
-                   Data.Geo.GPX.TrksegType
-                   Data.Geo.GPX.TrkType
-                   Data.Geo.GPX.RteType
-                   Data.Geo.GPX.MetadataType
-                   Data.Geo.GPX.GpxType
-                   Data.Geo.GPX.Gpx
-                   Data.Geo.GPX.Accessor.Accessor
-                   Data.Geo.GPX.Accessor.Minlat
-                   Data.Geo.GPX.Accessor.Maxlat
-                   Data.Geo.GPX.Accessor.Minlon
-                   Data.Geo.GPX.Accessor.Maxlon
-                   Data.Geo.GPX.Accessor.Author
-                   Data.Geo.GPX.Accessor.Year
-                   Data.Geo.GPX.Accessor.License
-                   Data.Geo.GPX.Accessor.Value
-                   Data.Geo.GPX.Accessor.Id
-                   Data.Geo.GPX.Accessor.Domain
-                   Data.Geo.GPX.Accessor.Version
-                   Data.Geo.GPX.Accessor.Creator
-                   Data.Geo.GPX.Accessor.Metadata
-                   Data.Geo.GPX.Accessor.Wpts
-                   Data.Geo.GPX.Accessor.Rtes
-                   Data.Geo.GPX.Accessor.Trks
-                   Data.Geo.GPX.Accessor.Extensions
-                   Data.Geo.GPX.Accessor.Href
-                   Data.Geo.GPX.Accessor.Text
-                   Data.Geo.GPX.Accessor.Type
-                   Data.Geo.GPX.Accessor.Name
-                   Data.Geo.GPX.Accessor.Desc
-                   Data.Geo.GPX.Accessor.Copyright
-                   Data.Geo.GPX.Accessor.Links
-                   Data.Geo.GPX.Accessor.Time
-                   Data.Geo.GPX.Accessor.Keywords
-                   Data.Geo.GPX.Accessor.Bounds
-                   Data.Geo.GPX.Accessor.Lat
-                   Data.Geo.GPX.Accessor.Lon
-                   Data.Geo.GPX.Accessor.Ele
-                   Data.Geo.GPX.Accessor.Magvar
-                   Data.Geo.GPX.Accessor.Geoidheight
-                   Data.Geo.GPX.Accessor.Cmt
-                   Data.Geo.GPX.Accessor.Src
-                   Data.Geo.GPX.Accessor.Sym
-                   Data.Geo.GPX.Accessor.Fix
-                   Data.Geo.GPX.Accessor.Sat
-                   Data.Geo.GPX.Accessor.Hdop
-                   Data.Geo.GPX.Accessor.Vdop
-                   Data.Geo.GPX.Accessor.Pdop
-                   Data.Geo.GPX.Accessor.Ageofdgpsdata
-                   Data.Geo.GPX.Accessor.Dgpsid
-                   Data.Geo.GPX.Accessor.Email
-                   Data.Geo.GPX.Accessor.Link
-                   Data.Geo.GPX.Accessor.Pts
-                   Data.Geo.GPX.Accessor.Number
-                   Data.Geo.GPX.Accessor.Rtepts
-                   Data.Geo.GPX.Accessor.Trkpts
-                   Data.Geo.GPX.Accessor.Trksegs
-                   Data.Geo.GPX.Accessor.Latlon
-                   Data.Geo.GPX.Util.Remove
-                   Data.Geo.GPX.Util.Reverse
+  GHC-Options:      -Wall
+                    -fno-warn-name-shadowing
+
+  Hs-Source-Dirs:   src
+
+  Exposed-Modules:   Data.Geo.GPX
+                     Data.Geo.GPX.Type
+                     Data.Geo.GPX.Type.DgpsStation
+                     Data.Geo.GPX.Type.Fix
+                     Data.Geo.GPX.Type.Degrees
+                     Data.Geo.GPX.Type.Longitude
+                     Data.Geo.GPX.Type.Latitude
+                     Data.Geo.GPX.Type.Bounds
+                     Data.Geo.GPX.Type.Extensions
+                     Data.Geo.GPX.Type.Pt
+                     Data.Geo.GPX.Type.Ptseg
+                     Data.Geo.GPX.Type.Email
+                     Data.Geo.GPX.Type.Link
+                     Data.Geo.GPX.Type.Person
+                     Data.Geo.GPX.Type.Copyright
+                     Data.Geo.GPX.Type.Wpt
+                     Data.Geo.GPX.Type.Trkseg
+                     Data.Geo.GPX.Type.Trk
+                     Data.Geo.GPX.Type.Rte
+                     Data.Geo.GPX.Type.Metadata
+                     Data.Geo.GPX.Type.Gpx
+                     Data.Geo.GPX.Lens
+                     Data.Geo.GPX.Lens.MinlatL
+                     Data.Geo.GPX.Lens.MaxlatL
+                     Data.Geo.GPX.Lens.MinlonL
+                     Data.Geo.GPX.Lens.MaxlonL
+                     Data.Geo.GPX.Lens.AuthorL
+                     Data.Geo.GPX.Lens.YearL
+                     Data.Geo.GPX.Lens.LicenseL
+                     Data.Geo.GPX.Lens.IdL
+                     Data.Geo.GPX.Lens.DomainL
+                     Data.Geo.GPX.Lens.VersionL
+                     Data.Geo.GPX.Lens.CreatorL
+                     Data.Geo.GPX.Lens.MetadataL
+                     Data.Geo.GPX.Lens.WptsL
+                     Data.Geo.GPX.Lens.RtesL
+                     Data.Geo.GPX.Lens.TrksL
+                     Data.Geo.GPX.Lens.ExtensionsL
+                     Data.Geo.GPX.Lens.HrefL
+                     Data.Geo.GPX.Lens.TextL
+                     Data.Geo.GPX.Lens.TypeL
+                     Data.Geo.GPX.Lens.NameL
+                     Data.Geo.GPX.Lens.DescL
+                     Data.Geo.GPX.Lens.CopyrightL
+                     Data.Geo.GPX.Lens.LinksL
+                     Data.Geo.GPX.Lens.TimeL
+                     Data.Geo.GPX.Lens.KeywordsL
+                     Data.Geo.GPX.Lens.BoundsL
+                     Data.Geo.GPX.Lens.LatL
+                     Data.Geo.GPX.Lens.LonL
+                     Data.Geo.GPX.Lens.EleL
+                     Data.Geo.GPX.Lens.MagvarL
+                     Data.Geo.GPX.Lens.GeoidheightL
+                     Data.Geo.GPX.Lens.CmtL
+                     Data.Geo.GPX.Lens.SrcL
+                     Data.Geo.GPX.Lens.SymL
+                     Data.Geo.GPX.Lens.FixL
+                     Data.Geo.GPX.Lens.SatL
+                     Data.Geo.GPX.Lens.HdopL
+                     Data.Geo.GPX.Lens.VdopL
+                     Data.Geo.GPX.Lens.PdopL
+                     Data.Geo.GPX.Lens.AgeofdgpsdataL
+                     Data.Geo.GPX.Lens.DgpsidL
+                     Data.Geo.GPX.Lens.EmailL
+                     Data.Geo.GPX.Lens.LinkL
+                     Data.Geo.GPX.Lens.PtsL
+                     Data.Geo.GPX.Lens.NumberL
+                     Data.Geo.GPX.Lens.RteptsL
+                     Data.Geo.GPX.Lens.TrkptsL
+                     Data.Geo.GPX.Lens.TrksegsL
+
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2009 Tony Morris
+Copyright 2009-2013 Tony Morris
 
 All rights reserved.
 
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,3 @@
+import Distribution.Simple
+main = defaultMain
+
diff --git a/Setup.lhs b/Setup.lhs
deleted file mode 100644
--- a/Setup.lhs
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env runhaskell
-> import Distribution.Simple
-> main = defaultMain
diff --git a/src/Data/Geo/GPX.hs b/src/Data/Geo/GPX.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX.hs
@@ -0,0 +1,69 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+-- | GPX 1.1 Schema <http://www.topografix.com/GPX/1/1/>
+module Data.Geo.GPX(
+  module Data.Geo.GPX.Type
+, module Data.Geo.GPX.Lens
+, module Control.Arrow
+, GPX
+) where
+
+import Data.Geo.GPX.Type
+import Data.Geo.GPX.Lens
+import Control.Arrow
+import Text.XML.HXT.Arrow.Pickle
+import Control.Newtype
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+
+-- | Top-level GPX data type with the root XML element applied.
+newtype GPX = GPX Gpx
+  deriving Eq
+
+instance XmlPickler GPX where
+  xpickle = xpWrap (GPX, \(GPX g) -> g) (xpElem "gpx" xpickle)
+
+instance GpxP GPX where
+  gpx v c m w r t e =
+    GPX (gpx v c m w r t e)
+    
+instance Newtype GPX Gpx where
+  pack = 
+    GPX
+  unpack (GPX x) =
+    x
+
+instance VersionL GPX where
+  versionL =
+    newtypeLens >>> versionL
+
+instance CreatorL GPX where
+  creatorL =
+    newtypeLens >>> creatorL
+
+instance MetadataL GPX where
+  metadataL =
+    newtypeLens >>> metadataL
+
+instance WptsL GPX where
+  wptsL =
+    newtypeLens >>> wptsL
+
+instance RtesL GPX where
+  rtesL =
+    newtypeLens >>> rtesL
+
+instance TrksL GPX where
+  trksL =
+    newtypeLens >>> trksL
+
+instance ExtensionsL GPX where
+  extensionsL =
+    newtypeLens >>> extensionsL
+
+-- not exported (belongs in data-lens)
+newtypeLens ::
+  Lens GPX Gpx
+newtypeLens =
+  Lens (store pack . unpack)
+
diff --git a/src/Data/Geo/GPX/Lens.hs b/src/Data/Geo/GPX/Lens.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens.hs
@@ -0,0 +1,101 @@
+module Data.Geo.GPX.Lens(
+  module Data.Geo.GPX.Lens.AgeofdgpsdataL
+, module Data.Geo.GPX.Lens.AuthorL
+, module Data.Geo.GPX.Lens.BoundsL
+, module Data.Geo.GPX.Lens.CmtL
+, module Data.Geo.GPX.Lens.CopyrightL
+, module Data.Geo.GPX.Lens.CreatorL
+, module Data.Geo.GPX.Lens.DescL
+, module Data.Geo.GPX.Lens.DgpsidL
+, module Data.Geo.GPX.Lens.DomainL
+, module Data.Geo.GPX.Lens.EleL
+, module Data.Geo.GPX.Lens.EmailL
+, module Data.Geo.GPX.Lens.ExtensionsL
+, module Data.Geo.GPX.Lens.FixL
+, module Data.Geo.GPX.Lens.GeoidheightL
+, module Data.Geo.GPX.Lens.HdopL
+, module Data.Geo.GPX.Lens.HrefL
+, module Data.Geo.GPX.Lens.IdL
+, module Data.Geo.GPX.Lens.KeywordsL
+, module Data.Geo.GPX.Lens.LatL
+, module Data.Geo.GPX.Lens.LicenseL
+, module Data.Geo.GPX.Lens.LinkL
+, module Data.Geo.GPX.Lens.LinksL
+, module Data.Geo.GPX.Lens.LonL
+, module Data.Geo.GPX.Lens.MagvarL
+, module Data.Geo.GPX.Lens.MaxlatL
+, module Data.Geo.GPX.Lens.MaxlonL
+, module Data.Geo.GPX.Lens.MetadataL
+, module Data.Geo.GPX.Lens.MinlatL
+, module Data.Geo.GPX.Lens.MinlonL
+, module Data.Geo.GPX.Lens.NameL
+, module Data.Geo.GPX.Lens.NumberL
+, module Data.Geo.GPX.Lens.PdopL
+, module Data.Geo.GPX.Lens.PtsL
+, module Data.Geo.GPX.Lens.RteptsL
+, module Data.Geo.GPX.Lens.RtesL
+, module Data.Geo.GPX.Lens.SatL
+, module Data.Geo.GPX.Lens.SrcL
+, module Data.Geo.GPX.Lens.SymL
+, module Data.Geo.GPX.Lens.TextL
+, module Data.Geo.GPX.Lens.TimeL
+, module Data.Geo.GPX.Lens.TrkptsL
+, module Data.Geo.GPX.Lens.TrksegsL
+, module Data.Geo.GPX.Lens.TrksL
+, module Data.Geo.GPX.Lens.TypeL
+, module Data.Geo.GPX.Lens.VdopL
+, module Data.Geo.GPX.Lens.VersionL
+, module Data.Geo.GPX.Lens.WptsL
+, module Data.Geo.GPX.Lens.YearL
+) where
+
+import Data.Geo.GPX.Lens.AgeofdgpsdataL
+import Data.Geo.GPX.Lens.AuthorL
+import Data.Geo.GPX.Lens.BoundsL
+import Data.Geo.GPX.Lens.CmtL
+import Data.Geo.GPX.Lens.CopyrightL
+import Data.Geo.GPX.Lens.CreatorL
+import Data.Geo.GPX.Lens.DescL
+import Data.Geo.GPX.Lens.DgpsidL
+import Data.Geo.GPX.Lens.DomainL
+import Data.Geo.GPX.Lens.EleL
+import Data.Geo.GPX.Lens.EmailL
+import Data.Geo.GPX.Lens.ExtensionsL
+import Data.Geo.GPX.Lens.FixL
+import Data.Geo.GPX.Lens.GeoidheightL
+import Data.Geo.GPX.Lens.HdopL
+import Data.Geo.GPX.Lens.HrefL
+import Data.Geo.GPX.Lens.IdL
+import Data.Geo.GPX.Lens.KeywordsL
+import Data.Geo.GPX.Lens.LatL
+import Data.Geo.GPX.Lens.LicenseL
+import Data.Geo.GPX.Lens.LinkL
+import Data.Geo.GPX.Lens.LinksL
+import Data.Geo.GPX.Lens.LonL
+import Data.Geo.GPX.Lens.MagvarL
+import Data.Geo.GPX.Lens.MaxlatL
+import Data.Geo.GPX.Lens.MaxlonL
+import Data.Geo.GPX.Lens.MetadataL
+import Data.Geo.GPX.Lens.MinlatL
+import Data.Geo.GPX.Lens.MinlonL
+import Data.Geo.GPX.Lens.NameL
+import Data.Geo.GPX.Lens.NumberL
+import Data.Geo.GPX.Lens.PdopL
+import Data.Geo.GPX.Lens.PtsL
+import Data.Geo.GPX.Lens.RteptsL
+import Data.Geo.GPX.Lens.RtesL
+import Data.Geo.GPX.Lens.SatL
+import Data.Geo.GPX.Lens.SrcL
+import Data.Geo.GPX.Lens.SymL
+import Data.Geo.GPX.Lens.TextL
+import Data.Geo.GPX.Lens.TimeL
+import Data.Geo.GPX.Lens.TrkptsL
+import Data.Geo.GPX.Lens.TrksegsL
+import Data.Geo.GPX.Lens.TrksL
+import Data.Geo.GPX.Lens.TypeL
+import Data.Geo.GPX.Lens.VdopL
+import Data.Geo.GPX.Lens.VersionL
+import Data.Geo.GPX.Lens.WptsL
+import Data.Geo.GPX.Lens.YearL
+
+
diff --git a/src/Data/Geo/GPX/Lens/AgeofdgpsdataL.hs b/src/Data/Geo/GPX/Lens/AgeofdgpsdataL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/AgeofdgpsdataL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.AgeofdgpsdataL where
+
+import Data.Lens.Common
+
+class AgeofdgpsdataL a where
+  ageofdgpsdataL :: Lens a (Maybe Double)
+
diff --git a/src/Data/Geo/GPX/Lens/AuthorL.hs b/src/Data/Geo/GPX/Lens/AuthorL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/AuthorL.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
+
+module Data.Geo.GPX.Lens.AuthorL where
+
+import Data.Lens.Common
+
+class AuthorL a b | a -> b where
+  authorL :: Lens a b
+
diff --git a/src/Data/Geo/GPX/Lens/BoundsL.hs b/src/Data/Geo/GPX/Lens/BoundsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/BoundsL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.BoundsL where
+
+import Data.Geo.GPX.Type.Bounds
+import Data.Lens.Common
+
+class BoundsL a where
+  boundsL :: Lens a (Maybe Bounds)
+
diff --git a/src/Data/Geo/GPX/Lens/CmtL.hs b/src/Data/Geo/GPX/Lens/CmtL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/CmtL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.CmtL where
+
+import Data.Lens.Common
+
+class CmtL a where
+  cmtL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/CopyrightL.hs b/src/Data/Geo/GPX/Lens/CopyrightL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/CopyrightL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.CopyrightL where
+
+import Data.Geo.GPX.Type.Copyright
+import Data.Lens.Common
+
+class CopyrightL a where
+  copyrightL :: Lens a (Maybe Copyright)
+
diff --git a/src/Data/Geo/GPX/Lens/CreatorL.hs b/src/Data/Geo/GPX/Lens/CreatorL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/CreatorL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.CreatorL where
+
+import Data.Lens.Common
+
+class CreatorL a where
+  creatorL :: Lens a String
+
diff --git a/src/Data/Geo/GPX/Lens/DescL.hs b/src/Data/Geo/GPX/Lens/DescL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/DescL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.DescL where
+
+import Data.Lens.Common
+
+class DescL a where
+  descL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/DgpsidL.hs b/src/Data/Geo/GPX/Lens/DgpsidL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/DgpsidL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.DgpsidL where
+
+import Data.Geo.GPX.Type.DgpsStation
+import Data.Lens.Common
+
+class DgpsidL a where
+  dgpsidL :: Lens a (Maybe DgpsStation)
+
diff --git a/src/Data/Geo/GPX/Lens/DomainL.hs b/src/Data/Geo/GPX/Lens/DomainL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/DomainL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.DomainL where
+
+import Data.Lens.Common
+
+class DomainL a where
+  domainL :: Lens a String
+
diff --git a/src/Data/Geo/GPX/Lens/EleL.hs b/src/Data/Geo/GPX/Lens/EleL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/EleL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.EleL where
+
+import Data.Lens.Common
+
+class EleL a where
+  eleL :: Lens a (Maybe Double)
+
diff --git a/src/Data/Geo/GPX/Lens/EmailL.hs b/src/Data/Geo/GPX/Lens/EmailL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/EmailL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.EmailL where
+
+import Data.Geo.GPX.Type.Email
+import Data.Lens.Common
+
+class EmailL a where
+  emailL :: Lens a (Maybe Email)
+
diff --git a/src/Data/Geo/GPX/Lens/ExtensionsL.hs b/src/Data/Geo/GPX/Lens/ExtensionsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/ExtensionsL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.ExtensionsL where
+
+import Data.Geo.GPX.Type.Extensions
+import Data.Lens.Common
+
+class ExtensionsL a where
+  extensionsL :: Lens a (Maybe Extensions)
+
diff --git a/src/Data/Geo/GPX/Lens/FixL.hs b/src/Data/Geo/GPX/Lens/FixL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/FixL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.FixL where
+
+import Data.Geo.GPX.Type.Fix
+import Data.Lens.Common
+
+class FixL a where
+  fixL :: Lens a (Maybe Fix)
+
diff --git a/src/Data/Geo/GPX/Lens/GeoidheightL.hs b/src/Data/Geo/GPX/Lens/GeoidheightL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/GeoidheightL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.GeoidheightL where
+
+import Data.Lens.Common
+
+class GeoidheightL a where
+  geoidheightL :: Lens a (Maybe Double)
+
diff --git a/src/Data/Geo/GPX/Lens/HdopL.hs b/src/Data/Geo/GPX/Lens/HdopL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/HdopL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.HdopL where
+
+import Data.Lens.Common
+
+class HdopL a where
+  hdopL :: Lens a (Maybe Double)
+
diff --git a/src/Data/Geo/GPX/Lens/HrefL.hs b/src/Data/Geo/GPX/Lens/HrefL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/HrefL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.HrefL where
+
+import Data.Lens.Common
+
+class HrefL a where
+  hrefL :: Lens a String
+
diff --git a/src/Data/Geo/GPX/Lens/IdL.hs b/src/Data/Geo/GPX/Lens/IdL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/IdL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.IdL where
+
+import Data.Lens.Common
+import Prelude hiding (id)
+
+class IdL a where
+  idL :: Lens a String
+
diff --git a/src/Data/Geo/GPX/Lens/KeywordsL.hs b/src/Data/Geo/GPX/Lens/KeywordsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/KeywordsL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.KeywordsL where
+
+import Data.Lens.Common
+
+class KeywordsL a where
+  keywordsL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/LatL.hs b/src/Data/Geo/GPX/Lens/LatL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/LatL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.LatL where
+
+import Data.Geo.GPX.Type.Latitude
+import Data.Lens.Common
+
+class LatL a where
+  latL :: Lens a Latitude
+
diff --git a/src/Data/Geo/GPX/Lens/LicenseL.hs b/src/Data/Geo/GPX/Lens/LicenseL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/LicenseL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.LicenseL where
+
+import Data.Lens.Common
+
+class LicenseL a where
+  licenseL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/LinkL.hs b/src/Data/Geo/GPX/Lens/LinkL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/LinkL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.LinkL where
+
+import Data.Geo.GPX.Type.Link
+import Data.Lens.Common
+
+class LinkL a where
+  linkL :: Lens a (Maybe Link)
+
diff --git a/src/Data/Geo/GPX/Lens/LinksL.hs b/src/Data/Geo/GPX/Lens/LinksL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/LinksL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.LinksL where
+
+import Data.Geo.GPX.Type.Link
+import Data.Lens.Common
+
+class LinksL a where
+  linksL :: Lens a [Link]
+
diff --git a/src/Data/Geo/GPX/Lens/LonL.hs b/src/Data/Geo/GPX/Lens/LonL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/LonL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.LonL where
+
+import Data.Geo.GPX.Type.Longitude
+import Data.Lens.Common
+
+class LonL a where
+  lonL :: Lens a Longitude
+
diff --git a/src/Data/Geo/GPX/Lens/MagvarL.hs b/src/Data/Geo/GPX/Lens/MagvarL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/MagvarL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.MagvarL where
+
+import Data.Geo.GPX.Type.Degrees
+import Data.Lens.Common
+
+class MagvarL a where
+  magvarL :: Lens a (Maybe Degrees)
+
diff --git a/src/Data/Geo/GPX/Lens/MaxlatL.hs b/src/Data/Geo/GPX/Lens/MaxlatL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/MaxlatL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.MaxlatL where
+
+import Data.Geo.GPX.Type.Latitude
+import Data.Lens.Common
+
+class MaxlatL a where
+  maxlatL :: Lens a Latitude
+
diff --git a/src/Data/Geo/GPX/Lens/MaxlonL.hs b/src/Data/Geo/GPX/Lens/MaxlonL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/MaxlonL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.MaxlonL where
+
+import Data.Geo.GPX.Type.Longitude
+import Data.Lens.Common
+
+class MaxlonL a where
+  maxlonL :: Lens a Longitude
+
diff --git a/src/Data/Geo/GPX/Lens/MetadataL.hs b/src/Data/Geo/GPX/Lens/MetadataL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/MetadataL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.MetadataL where
+
+import Data.Geo.GPX.Type.Metadata
+import Data.Lens.Common
+
+class MetadataL a where
+  metadataL :: Lens a (Maybe Metadata)
+
diff --git a/src/Data/Geo/GPX/Lens/MinlatL.hs b/src/Data/Geo/GPX/Lens/MinlatL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/MinlatL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.MinlatL where
+
+import Data.Geo.GPX.Type.Latitude
+import Data.Lens.Common
+
+class MinlatL a where
+  minlatL :: Lens a Latitude
+
diff --git a/src/Data/Geo/GPX/Lens/MinlonL.hs b/src/Data/Geo/GPX/Lens/MinlonL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/MinlonL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.MinlonL where
+
+import Data.Geo.GPX.Type.Longitude
+import Data.Lens.Common
+
+class MinlonL a where
+  minlonL :: Lens a Longitude
+
diff --git a/src/Data/Geo/GPX/Lens/NameL.hs b/src/Data/Geo/GPX/Lens/NameL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/NameL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.NameL where
+
+import Data.Lens.Common
+
+class NameL a where
+  nameL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/NumberL.hs b/src/Data/Geo/GPX/Lens/NumberL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/NumberL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.NumberL where
+
+import Data.Lens.Common
+
+class NumberL a where
+  numberL :: Lens a (Maybe Int)
+
diff --git a/src/Data/Geo/GPX/Lens/PdopL.hs b/src/Data/Geo/GPX/Lens/PdopL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/PdopL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.PdopL where
+
+import Data.Lens.Common
+
+class PdopL a where
+  pdopL :: Lens a (Maybe Double)
+
diff --git a/src/Data/Geo/GPX/Lens/PtsL.hs b/src/Data/Geo/GPX/Lens/PtsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/PtsL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.PtsL where
+
+import Data.Geo.GPX.Type.Pt
+import Data.Lens.Common
+
+class PtsL a where
+  ptsL :: Lens a [Pt]
+
diff --git a/src/Data/Geo/GPX/Lens/RteptsL.hs b/src/Data/Geo/GPX/Lens/RteptsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/RteptsL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.RteptsL where
+
+import Data.Geo.GPX.Type.Wpt
+import Data.Lens.Common
+
+class RteptsL a where
+  rteptsL :: Lens a [Wpt]
+
diff --git a/src/Data/Geo/GPX/Lens/RtesL.hs b/src/Data/Geo/GPX/Lens/RtesL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/RtesL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.RtesL where
+
+import Data.Geo.GPX.Type.Rte
+import Data.Lens.Common
+
+class RtesL a where
+  rtesL :: Lens a [Rte]
+
diff --git a/src/Data/Geo/GPX/Lens/SatL.hs b/src/Data/Geo/GPX/Lens/SatL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/SatL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.SatL where
+
+import Data.Lens.Common
+
+class SatL a where
+  satL :: Lens a (Maybe Int)
+
diff --git a/src/Data/Geo/GPX/Lens/SrcL.hs b/src/Data/Geo/GPX/Lens/SrcL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/SrcL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.SrcL where
+
+import Data.Lens.Common
+
+class SrcL a where
+  srcL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/SymL.hs b/src/Data/Geo/GPX/Lens/SymL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/SymL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.SymL where
+
+import Data.Lens.Common
+
+class SymL a where
+  symL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/TextL.hs b/src/Data/Geo/GPX/Lens/TextL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/TextL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.TextL where
+
+import Data.Lens.Common
+
+class TextL a where
+  textL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/TimeL.hs b/src/Data/Geo/GPX/Lens/TimeL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/TimeL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.TimeL where
+
+import Text.XML.XSD.DateTime
+import Data.Lens.Common
+
+class TimeL a where
+  timeL :: Lens a (Maybe DateTime)
+
diff --git a/src/Data/Geo/GPX/Lens/TrkptsL.hs b/src/Data/Geo/GPX/Lens/TrkptsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/TrkptsL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.TrkptsL where
+
+import Data.Geo.GPX.Type.Wpt
+import Data.Lens.Common
+
+class TrkptsL a where
+  trkptsL :: Lens a [Wpt]
+
diff --git a/src/Data/Geo/GPX/Lens/TrksL.hs b/src/Data/Geo/GPX/Lens/TrksL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/TrksL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.TrksL where
+
+import Data.Geo.GPX.Type.Trk
+import Data.Lens.Common
+
+class TrksL a where
+  trksL :: Lens a [Trk]
+
diff --git a/src/Data/Geo/GPX/Lens/TrksegsL.hs b/src/Data/Geo/GPX/Lens/TrksegsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/TrksegsL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.TrksegsL where
+
+import Data.Geo.GPX.Type.Trkseg
+import Data.Lens.Common
+
+class TrksegsL a where
+  trksegsL :: Lens a [Trkseg]
+
diff --git a/src/Data/Geo/GPX/Lens/TypeL.hs b/src/Data/Geo/GPX/Lens/TypeL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/TypeL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.TypeL where
+
+import Data.Lens.Common
+
+class TypeL a where
+  typeL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Lens/VdopL.hs b/src/Data/Geo/GPX/Lens/VdopL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/VdopL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.VdopL where
+
+import Data.Lens.Common
+
+class VdopL a where
+  vdopL :: Lens a (Maybe Double)
+
diff --git a/src/Data/Geo/GPX/Lens/VersionL.hs b/src/Data/Geo/GPX/Lens/VersionL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/VersionL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.VersionL where
+
+import Data.Lens.Common
+
+class VersionL a where
+  versionL :: Lens a String
+
diff --git a/src/Data/Geo/GPX/Lens/WptsL.hs b/src/Data/Geo/GPX/Lens/WptsL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/WptsL.hs
@@ -0,0 +1,8 @@
+module Data.Geo.GPX.Lens.WptsL where
+
+import Data.Geo.GPX.Type.Wpt
+import Data.Lens.Common
+
+class WptsL a where
+  wptsL :: Lens a [Wpt]
+
diff --git a/src/Data/Geo/GPX/Lens/YearL.hs b/src/Data/Geo/GPX/Lens/YearL.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Lens/YearL.hs
@@ -0,0 +1,7 @@
+module Data.Geo.GPX.Lens.YearL where
+
+import Data.Lens.Common
+
+class YearL a where
+  yearL :: Lens a (Maybe String)
+
diff --git a/src/Data/Geo/GPX/Type.hs b/src/Data/Geo/GPX/Type.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type.hs
@@ -0,0 +1,43 @@
+-- | GPX 1.1 Schema <http://www.topografix.com/GPX/1/1/>
+module Data.Geo.GPX.Type(
+  module Data.Geo.GPX.Type.DgpsStation
+, module Data.Geo.GPX.Type.Fix
+, module Data.Geo.GPX.Type.Degrees
+, module Data.Geo.GPX.Type.Longitude
+, module Data.Geo.GPX.Type.Latitude
+, module Data.Geo.GPX.Type.Bounds
+, module Data.Geo.GPX.Type.Extensions
+, module Data.Geo.GPX.Type.Pt
+, module Data.Geo.GPX.Type.Ptseg
+, module Data.Geo.GPX.Type.Email
+, module Data.Geo.GPX.Type.Link
+, module Data.Geo.GPX.Type.Person
+, module Data.Geo.GPX.Type.Copyright
+, module Data.Geo.GPX.Type.Wpt
+, module Data.Geo.GPX.Type.Trkseg
+, module Data.Geo.GPX.Type.Trk
+, module Data.Geo.GPX.Type.Rte
+, module Data.Geo.GPX.Type.Metadata
+, module Data.Geo.GPX.Type.Gpx
+) where
+
+import Data.Geo.GPX.Type.DgpsStation
+import Data.Geo.GPX.Type.Fix
+import Data.Geo.GPX.Type.Degrees
+import Data.Geo.GPX.Type.Longitude
+import Data.Geo.GPX.Type.Latitude
+import Data.Geo.GPX.Type.Bounds
+import Data.Geo.GPX.Type.Extensions
+import Data.Geo.GPX.Type.Pt
+import Data.Geo.GPX.Type.Ptseg
+import Data.Geo.GPX.Type.Email
+import Data.Geo.GPX.Type.Link
+import Data.Geo.GPX.Type.Person
+import Data.Geo.GPX.Type.Copyright
+import Data.Geo.GPX.Type.Wpt
+import Data.Geo.GPX.Type.Trkseg
+import Data.Geo.GPX.Type.Trk
+import Data.Geo.GPX.Type.Rte
+import Data.Geo.GPX.Type.Metadata
+import Data.Geo.GPX.Type.Gpx
+
diff --git a/src/Data/Geo/GPX/Type/Bounds.hs b/src/Data/Geo/GPX/Type/Bounds.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Bounds.hs
@@ -0,0 +1,51 @@
+-- | Complex Type: @boundsType@ <http://www.topografix.com/GPX/1/1/#type_boundsType>
+module Data.Geo.GPX.Type.Bounds(
+  Bounds
+, bounds
+) where
+
+import Data.Geo.GPX.Type.Latitude
+import Data.Geo.GPX.Type.Longitude
+import Data.Geo.GPX.Lens.MinlatL
+import Data.Geo.GPX.Lens.MaxlatL
+import Data.Geo.GPX.Lens.MinlonL
+import Data.Geo.GPX.Lens.MaxlonL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Bounds = Bounds (Latitude, Longitude) (Latitude, Longitude)
+  deriving (Eq, Ord)
+
+bounds :: 
+  (Latitude, Longitude) -- ^ The minimum latitude and longitude.
+  -> (Latitude, Longitude) -- ^ The maximum latitude and longitude.
+  -> Bounds
+bounds =
+  Bounds
+
+instance MinlatL Bounds where
+  minlatL =
+    Lens $ \(Bounds (minlat, minlon) (maxlat, maxlon)) -> store (\minlat -> Bounds (minlat, minlon) (maxlat, maxlon)) minlat
+
+instance MinlonL Bounds where
+  minlonL =
+    Lens $ \(Bounds (minlat, minlon) (maxlat, maxlon)) -> store (\minlon -> Bounds (minlat, minlon) (maxlat, maxlon)) minlon
+
+instance MaxlatL Bounds where
+  maxlatL =
+    Lens $ \(Bounds (minlat, minlon) (maxlat, maxlon)) -> store (\maxlat -> Bounds (minlat, minlon) (maxlat, maxlon)) maxlat
+
+instance MaxlonL Bounds where
+  maxlonL =
+    Lens $ \(Bounds (minlat, minlon) (maxlat, maxlon)) -> store (\maxlon -> Bounds (minlat, minlon) (maxlat, maxlon)) maxlon
+
+instance XmlPickler Bounds where
+  xpickle =
+    xpWrap (\(minlat', minlon', maxlat', maxlon') -> bounds (minlat', minlon') (maxlat', maxlon'),
+            \(Bounds (minlat', minlon') (maxlat', maxlon')) -> (minlat', minlon', maxlat', maxlon')) (xp4Tuple
+              (xpAttr "minlat" xpickle)
+              (xpAttr "minlon" xpickle)
+              (xpAttr "maxlat" xpickle)
+              (xpAttr "maxlon" xpickle))
+
diff --git a/src/Data/Geo/GPX/Type/Copyright.hs b/src/Data/Geo/GPX/Type/Copyright.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Copyright.hs
@@ -0,0 +1,44 @@
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
+
+-- | Complex Type: @copyrightType@ <http://www.topografix.com/GPX/1/1/#type_copyrightType>
+module Data.Geo.GPX.Type.Copyright(
+  Copyright
+, copyright
+) where
+
+import Data.Geo.GPX.Lens.AuthorL
+import Data.Geo.GPX.Lens.YearL
+import Data.Geo.GPX.Lens.LicenseL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Copyright = Copyright String (Maybe String) (Maybe String)
+  deriving (Eq, Ord)
+
+copyright
+  :: String -- ^ The author.
+  -> Maybe String -- ^ The year.
+  -> Maybe String -- ^ The license.
+  -> Copyright
+copyright =
+  Copyright
+
+instance AuthorL Copyright String where
+  authorL =
+    Lens $ \(Copyright author year license) -> store (\author -> Copyright author year license) author
+
+instance YearL Copyright where
+  yearL =
+    Lens $ \(Copyright author year license) -> store (\year -> Copyright author year license) year
+
+instance LicenseL Copyright where
+  licenseL =
+    Lens $ \(Copyright author year license) -> store (\license -> Copyright author year license) license
+
+instance XmlPickler Copyright where
+  xpickle =
+    xpWrap (\(author', year', license') -> copyright author' year' license', \(Copyright author' year' license') -> (author', year', license')) (xpTriple
+           (xpAttr "author" xpText)
+           (xpOption (xpElem "year" xpText))
+           (xpOption (xpElem "license" xpText)))
diff --git a/src/Data/Geo/GPX/Type/Degrees.hs b/src/Data/Geo/GPX/Type/Degrees.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Degrees.hs
@@ -0,0 +1,39 @@
+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
+
+-- | Simple Type: @degreesType@ <http://www.topografix.com/GPX/1/1/#type_degreesType>
+module Data.Geo.GPX.Type.Degrees(
+  Degrees
+, degrees
+, runDegrees
+) where
+
+
+import Data.Fixed
+import Text.XML.HXT.Arrow.Pickle
+import Control.Newtype
+
+newtype Degrees = Degrees Double
+  deriving (Eq, Ord, Show)
+
+degrees ::
+  Double -- ^ The value which will be between 0 and 360 (values out of the range are truncated using a modulus operation).
+  -> Degrees
+degrees n =
+  Degrees (n `mod'` 360)
+
+runDegrees ::
+  Degrees
+  -> Double
+runDegrees (Degrees d) =
+  d
+
+instance XmlPickler Degrees where
+  xpickle =
+    xpWrap (degrees, \(Degrees n) -> n) xpPrim
+
+instance Newtype Degrees Double where
+  pack = 
+    degrees
+  unpack (Degrees x) =
+    x
+
diff --git a/src/Data/Geo/GPX/Type/DgpsStation.hs b/src/Data/Geo/GPX/Type/DgpsStation.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/DgpsStation.hs
@@ -0,0 +1,33 @@
+-- | Simple Type: @dgpsStationType@ <http://www.topografix.com/GPX/1/1/#type_dgpsStationType>
+module Data.Geo.GPX.Type.DgpsStation(
+  DgpsStation
+, dgpsStation
+, runDgpsStation
+) where
+
+import Data.Ix
+import Text.XML.HXT.Arrow.Pickle
+
+newtype DgpsStation = DgpsStation Int
+  deriving (Eq, Ord)
+
+dgpsStation ::
+  Int -- ^ The value between 0 and 1023.
+  -> Maybe DgpsStation
+dgpsStation n =
+  if inRange (0, 1023) n
+    then
+      Just (DgpsStation n)
+    else
+      Nothing
+
+runDgpsStation ::
+  DgpsStation
+  -> Int
+runDgpsStation (DgpsStation i) =
+  i
+
+instance XmlPickler DgpsStation where
+  xpickle =
+    xpWrapMaybe (dgpsStation, \(DgpsStation n) -> n) xpickle
+
diff --git a/src/Data/Geo/GPX/Type/Email.hs b/src/Data/Geo/GPX/Type/Email.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Email.hs
@@ -0,0 +1,36 @@
+-- | Complex Type: @emailType@ <http://www.topografix.com/GPX/1/1/#type_emailType>
+module Data.Geo.GPX.Type.Email(
+  Email
+, email
+) where
+
+import Data.Geo.GPX.Lens.IdL
+import Data.Geo.GPX.Lens.DomainL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Email = Email String String
+  deriving (Eq, Ord)
+
+email ::
+  String -- ^ The id.
+  -> String -- ^ The domain.
+  -> Email
+email =
+  Email
+
+instance IdL Email where
+  idL =
+    Lens $ \(Email id domain) -> store (\id -> Email id domain) id
+
+instance DomainL Email where
+  domainL =
+    Lens $ \(Email id domain) -> store (\domain -> Email id domain) domain
+
+instance XmlPickler Email where
+  xpickle =
+    xpWrap (uncurry email, \(Email id' domain') -> (id', domain'))
+           (xpPair (xpAttr "id" xpText) (xpAttr "domain" xpText))
+
+
diff --git a/src/Data/Geo/GPX/Type/Extensions.hs b/src/Data/Geo/GPX/Type/Extensions.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Extensions.hs
@@ -0,0 +1,38 @@
+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances #-}
+
+-- | Complex Type: @extensionsType@ <http://www.topografix.com/GPX/1/1/#type_extensionsType>
+module Data.Geo.GPX.Type.Extensions(
+  Extensions
+, extensions
+, runExtensions
+) where
+
+import Text.XML.HXT.Arrow.Pickle
+import Text.XML.HXT.DOM.TypeDefs
+import Control.Newtype
+
+newtype Extensions = Extensions XmlTrees
+  deriving (Eq, Show)
+
+extensions :: 
+  XmlTrees
+  -> Extensions
+extensions =
+  Extensions
+
+runExtensions ::
+  Extensions
+  -> XmlTrees
+runExtensions (Extensions t) =
+  t
+
+instance XmlPickler Extensions where
+  xpickle =
+    xpWrap (Extensions, \(Extensions t) -> t) xpTrees
+
+instance Newtype Extensions XmlTrees where
+  pack = 
+    Extensions
+  unpack (Extensions x) =
+    x
+
diff --git a/src/Data/Geo/GPX/Type/Fix.hs b/src/Data/Geo/GPX/Type/Fix.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Fix.hs
@@ -0,0 +1,76 @@
+-- | Simple Type: @fixType@ <http://www.topografix.com/GPX/1/1/#type_fixType>
+module Data.Geo.GPX.Type.Fix(
+  Fix
+, foldFix
+, none
+, twod
+, threed
+, dgps
+, pps
+, fix
+) where
+
+import Text.XML.HXT.Arrow.Pickle
+
+data Fix = None | Twod | Threed | Dgps | Pps
+  deriving (Eq, Ord, Show, Enum)
+
+-- | The catamorphism for @Fix@.
+foldFix ::
+  a -- ^ The value if @none@.
+  -> a -- ^ The value if @twod@.
+  -> a -- ^ The value if @threed@.
+  -> a -- ^ The value if @dgps@.
+  -> a -- ^ The value if @pps@.
+  -> Fix -- ^ The value to fold.
+  -> a
+foldFix n _ _ _ _ None = n
+foldFix _ t _ _ _ Twod = t
+foldFix _ _ t _ _ Threed = t
+foldFix _ _ _ d _ Dgps = d
+foldFix _ _ _ _ p Pps = p
+
+-- | Construct a @Fix@ with a value of @none@.
+none ::
+  Fix
+none =
+  None
+
+-- | Construct a @Fix@ with a value of @2d@.
+twod :: Fix
+twod = Twod
+
+-- | Construct a @Fix@ with a value of @3d@.
+threed ::
+  Fix
+threed =
+  Threed
+
+-- | Construct a @Fix@ with a value of @dgps@.
+dgps ::
+  Fix
+dgps =
+  Dgps
+
+-- | Construct a @Fix@ with a value of @pps@.
+pps ::
+  Fix
+pps =
+  Pps
+
+-- | Construct a @Fix@ using a string with a value of @["none", "2d", "3d", "dgps", "pps"]@.
+fix ::
+  String -- ^ The string value to construct a @Fix@ with.
+  -> Maybe Fix
+fix "none" = Just none
+fix "2d"= Just twod
+fix "3d" = Just threed
+fix "dgps" = Just dgps
+fix "pps" = Just pps
+fix _ = Nothing
+
+instance XmlPickler Fix where
+  xpickle =
+    xpWrapMaybe (fix, show) xpText
+
+
diff --git a/src/Data/Geo/GPX/Type/Gpx.hs b/src/Data/Geo/GPX/Type/Gpx.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Gpx.hs
@@ -0,0 +1,82 @@
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
+
+-- | Complex Type: @gpxType@ <http://www.topografix.com/GPX/1/1/#type_gpxType>
+module Data.Geo.GPX.Type.Gpx(
+  Gpx
+, GpxP(..)
+) where
+
+import Data.Geo.GPX.Type.Metadata
+import Data.Geo.GPX.Type.Wpt
+import Data.Geo.GPX.Type.Rte
+import Data.Geo.GPX.Type.Trk
+import Data.Geo.GPX.Type.Extensions
+import Data.Geo.GPX.Lens.VersionL
+import Data.Geo.GPX.Lens.CreatorL
+import Data.Geo.GPX.Lens.MetadataL
+import Data.Geo.GPX.Lens.WptsL
+import Data.Geo.GPX.Lens.RtesL
+import Data.Geo.GPX.Lens.TrksL
+import Data.Geo.GPX.Lens.ExtensionsL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Gpx = Gpx String String (Maybe Metadata) [Wpt] [Rte] [Trk] (Maybe Extensions)
+  deriving Eq
+
+class GpxP g where
+  gpx ::
+    String -- ^ The version.
+    -> String -- ^ The creator.
+    -> Maybe Metadata -- ^ The metadata.
+    -> [Wpt] -- ^ The waypoints (wpt).
+    -> [Rte] -- ^ The routes (rte).
+    -> [Trk] -- ^ The tracks (trk).
+    -> Maybe Extensions -- ^ The extensions.
+    -> g
+
+instance GpxP Gpx where
+  gpx =
+    Gpx
+
+instance VersionL Gpx where
+  versionL =
+    Lens $ \(Gpx version creator metadata wpts rtes trks extensions) -> store (\version -> Gpx version creator metadata wpts rtes trks extensions) version
+
+instance CreatorL Gpx where
+  creatorL =
+    Lens $ \(Gpx version creator metadata wpts rtes trks extensions) -> store (\creator -> Gpx version creator metadata wpts rtes trks extensions) creator
+
+instance MetadataL Gpx where
+  metadataL =
+    Lens $ \(Gpx version creator metadata wpts rtes trks extensions) -> store (\metadata -> Gpx version creator metadata wpts rtes trks extensions) metadata
+
+instance WptsL Gpx where
+  wptsL =
+    Lens $ \(Gpx version creator metadata wpts rtes trks extensions) -> store (\wpts -> Gpx version creator metadata wpts rtes trks extensions) wpts
+
+instance RtesL Gpx where
+  rtesL =
+    Lens $ \(Gpx version creator metadata wpts rtes trks extensions) -> store (\rtes -> Gpx version creator metadata wpts rtes trks extensions) rtes
+
+instance TrksL Gpx where
+  trksL =
+    Lens $ \(Gpx version creator metadata wpts rtes trks extensions) -> store (\trks -> Gpx version creator metadata wpts rtes trks extensions) trks
+
+instance ExtensionsL Gpx where
+  extensionsL =
+    Lens $ \(Gpx version creator metadata wpts rtes trks extensions) -> store (\extensions -> Gpx version creator metadata wpts rtes trks extensions) extensions
+
+instance XmlPickler Gpx where
+  xpickle =
+    xpWrap (\(version', creator', metadata', wpt', rte', trk', extensions') -> gpx version' creator' metadata' wpt' rte' trk' extensions',
+              \(Gpx version' creator' metadata' wpt' rte' trk' extensions') -> (version', creator', metadata', wpt', rte', trk', extensions')) (xp7Tuple
+                (xpAttr "version" xpText)
+                (xpAttr "creator" xpText)
+                (xpOption (xpElem "metadata" xpickle))
+                (xpList (xpElem "wpt" xpickle))
+                (xpList (xpElem "rte" xpickle))
+                (xpList (xpElem "trk" xpickle))
+                (xpOption (xpElem "extensions" xpickle)))
+
diff --git a/src/Data/Geo/GPX/Type/Latitude.hs b/src/Data/Geo/GPX/Type/Latitude.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Latitude.hs
@@ -0,0 +1,40 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses #-}
+
+-- | Simple Type: @latitudeType@ <http://www.topografix.com/GPX/1/1/#type_latitudeType>
+module Data.Geo.GPX.Type.Latitude(
+  Latitude
+, latitude
+, runLatitude
+) where
+
+import Data.Fixed
+import Text.XML.HXT.Arrow.Pickle
+import Control.Newtype
+
+newtype Latitude = Latitude Double
+  deriving (Eq, Ord, Enum, Num, Fractional, Floating, Real, RealFrac, RealFloat)
+
+latitude ::
+  Double -- ^ The value which will be between -90 and 90 (values out of the range are truncated using a modulus operation).
+  -> Latitude
+latitude n =
+  Latitude ((n + 90) `mod'` 180 - 90)
+
+runLatitude ::
+  Latitude
+  -> Double
+runLatitude (Latitude d) =
+  d
+
+instance Show Latitude where
+  show (Latitude n) = show n
+
+instance XmlPickler Latitude where
+  xpickle = xpWrap (latitude, \(Latitude n) -> n) xpPrim
+
+instance Newtype Latitude Double where
+  pack = 
+    latitude
+  unpack (Latitude x) =
+    x
+
diff --git a/src/Data/Geo/GPX/Type/Link.hs b/src/Data/Geo/GPX/Type/Link.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Link.hs
@@ -0,0 +1,43 @@
+-- | Complex Type: @linkType@ <http://www.topografix.com/GPX/1/1/#type_linkType>
+module Data.Geo.GPX.Type.Link(
+  Link
+, link
+) where
+
+import Data.Geo.GPX.Lens.HrefL
+import Data.Geo.GPX.Lens.TextL
+import Data.Geo.GPX.Lens.TypeL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Link = Link String (Maybe String) (Maybe String)
+  deriving (Eq, Ord)
+
+link ::
+  String -- ^ The href.
+  -> Maybe String -- ^ The text.
+  -> Maybe String -- ^ The type.
+  -> Link
+link =
+  Link
+
+instance HrefL Link where
+  hrefL =
+    Lens $ \(Link href text typ) -> store (\href -> Link href text typ) href
+
+instance TextL Link where
+  textL =
+    Lens $ \(Link href text typ) -> store (\text -> Link href text typ) text
+
+instance TypeL Link where
+  typeL =
+    Lens $ \(Link href text typ) -> store (\typ -> Link href text typ) typ
+
+instance XmlPickler Link where
+  xpickle =
+    xpWrap (\(href, text, type') -> link href text type', \(Link href text type') -> (href, text, type')) (xpTriple
+           (xpAttr "href" xpText)
+           (xpOption (xpElem "text" xpText))
+           (xpOption (xpElem "type" xpText)))
+
diff --git a/src/Data/Geo/GPX/Type/Longitude.hs b/src/Data/Geo/GPX/Type/Longitude.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Longitude.hs
@@ -0,0 +1,40 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses #-}
+
+-- | Simple Type: @latitudeType@ <http://www.topografix.com/GPX/1/1/#type_latitudeType>
+module Data.Geo.GPX.Type.Longitude(
+  Longitude
+, longitude
+, runLongitude
+) where
+
+import Data.Fixed
+import Text.XML.HXT.Arrow.Pickle
+import Control.Newtype
+
+newtype Longitude = Longitude Double
+  deriving (Eq, Ord, Enum, Num, Fractional, Floating, Real, RealFrac, RealFloat)
+
+longitude ::
+  Double -- ^ The value which will be between -180 and 180 (values out of the range are truncated using a modulus operation).
+  -> Longitude
+longitude n =
+  Longitude ((n + 180) `mod'` 360 - 180)
+
+runLongitude ::
+  Longitude
+  -> Double
+runLongitude (Longitude d) =
+  d
+
+instance Show Longitude where
+  show (Longitude n) = show n
+
+instance XmlPickler Longitude where
+  xpickle = xpWrap (longitude, \(Longitude n) -> n) xpPrim
+
+instance Newtype Longitude Double where
+  pack = 
+    longitude
+  unpack (Longitude x) =
+    x
+
diff --git a/src/Data/Geo/GPX/Type/Metadata.hs b/src/Data/Geo/GPX/Type/Metadata.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Metadata.hs
@@ -0,0 +1,94 @@
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
+
+-- | Complex Type: @metadataType@ <http://www.topografix.com/GPX/1/1/#type_metadataType>
+module Data.Geo.GPX.Type.Metadata(
+  Metadata
+, metadata
+) where
+
+import Data.Geo.GPX.Type.Person
+import Data.Geo.GPX.Type.Copyright
+import Data.Geo.GPX.Type.Link
+import Data.Geo.GPX.Type.Bounds
+import Data.Geo.GPX.Type.Extensions
+import Data.Geo.GPX.Lens.NameL
+import Data.Geo.GPX.Lens.DescL
+import Data.Geo.GPX.Lens.AuthorL
+import Data.Geo.GPX.Lens.CopyrightL
+import Data.Geo.GPX.Lens.LinksL
+import Data.Geo.GPX.Lens.TimeL
+import Data.Geo.GPX.Lens.KeywordsL
+import Data.Geo.GPX.Lens.BoundsL
+import Data.Geo.GPX.Lens.ExtensionsL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+import Text.XML.XSD.DateTime
+
+data Metadata = Metadata (Maybe String) (Maybe String) (Maybe Person) (Maybe Copyright) [Link] (Maybe DateTime) (Maybe String) (Maybe Bounds) (Maybe Extensions)
+  deriving Eq
+
+metadata ::
+  Maybe String -- ^ The name.
+  -> Maybe String -- ^ The desc.
+  -> Maybe Person -- ^ The author.
+  -> Maybe Copyright -- ^ The copyright.
+  -> [Link] -- ^ The links (link).
+  -> Maybe DateTime -- ^ The time.
+  -> Maybe String -- ^ The keywords.
+  -> Maybe Bounds -- ^ The bounds.
+  -> Maybe Extensions -- ^ The extensions
+  -> Metadata
+metadata =
+  Metadata
+
+instance NameL Metadata where
+  nameL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\name -> Metadata name desc author copyright links time keywords bounds extensions) name
+
+instance DescL Metadata where
+  descL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\desc -> Metadata name desc author copyright links time keywords bounds extensions) desc
+
+instance AuthorL Metadata (Maybe Person) where
+  authorL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\author -> Metadata name desc author copyright links time keywords bounds extensions) author
+
+instance CopyrightL Metadata where
+  copyrightL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\copyright -> Metadata name desc author copyright links time keywords bounds extensions) copyright
+
+instance LinksL Metadata where
+  linksL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\links -> Metadata name desc author copyright links time keywords bounds extensions) links
+
+instance TimeL Metadata where
+  timeL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\time -> Metadata name desc author copyright links time keywords bounds extensions) time
+
+instance KeywordsL Metadata where
+  keywordsL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\keywords -> Metadata name desc author copyright links time keywords bounds extensions) keywords
+
+instance BoundsL Metadata where
+  boundsL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\bounds -> Metadata name desc author copyright links time keywords bounds extensions) bounds
+
+instance ExtensionsL Metadata where
+  extensionsL =
+    Lens $ \(Metadata name desc author copyright links time keywords bounds extensions) -> store (\extensions -> Metadata name desc author copyright links time keywords bounds extensions) extensions
+
+instance XmlPickler Metadata where
+  xpickle =
+    xpWrap (\(a, b, c, d, e, f, g, h, i) -> metadata a b c d e f g h i, \(Metadata a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
+           (xpOption (xpElem "name" xpText))
+           (xpOption (xpElem "desc" xpText))
+           (xpOption (xpElem "author" xpickle))
+           (xpOption (xpElem "copyright" xpickle))
+           (xpList (xpElem "link" xpickle))
+           (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText)))
+           (xpOption (xpElem "keywords" xpText))
+           (xpOption (xpElem "bounds" xpickle))
+           (xpOption (xpElem "extensions" xpickle)))
+
+
diff --git a/src/Data/Geo/GPX/Type/Person.hs b/src/Data/Geo/GPX/Type/Person.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Person.hs
@@ -0,0 +1,45 @@
+-- | Complex Type: @personType@ <http://www.topografix.com/GPX/1/1/#type_personType>
+module Data.Geo.GPX.Type.Person(
+  Person
+, person
+) where
+
+import Data.Geo.GPX.Type.Email
+import Data.Geo.GPX.Type.Link
+import Data.Geo.GPX.Lens.NameL
+import Data.Geo.GPX.Lens.EmailL
+import Data.Geo.GPX.Lens.LinkL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Person = Person (Maybe String) (Maybe Email) (Maybe Link)
+  deriving (Eq, Ord)
+
+person ::
+  Maybe String -- ^ The name.
+  -> Maybe Email -- ^ The email.
+  -> Maybe Link -- ^ The link.
+  -> Person
+person =
+  Person
+
+instance NameL Person where
+  nameL =
+    Lens $ \(Person name email link) -> store (\name -> Person name email link) name
+
+instance EmailL Person where
+  emailL =
+    Lens $ \(Person name email link) -> store (\email -> Person name email link) email
+
+instance LinkL Person where
+  linkL =
+    Lens $ \(Person name email link) -> store (\link -> Person name email link) link
+
+instance XmlPickler Person where
+  xpickle =
+    xpWrap (\(name', email', link') -> person name' email' link', \(Person name' email' link') -> (name', email', link')) (xpTriple
+           (xpOption (xpElem "name" xpText))
+           (xpOption (xpElem "email" xpickle))
+           (xpOption (xpElem "link" xpickle)))
+
diff --git a/src/Data/Geo/GPX/Type/Pt.hs b/src/Data/Geo/GPX/Type/Pt.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Pt.hs
@@ -0,0 +1,54 @@
+-- | Complex Type: @ptType@ <http://www.topografix.com/GPX/1/1/#type_ptType>
+module Data.Geo.GPX.Type.Pt(
+  Pt
+, pt
+) where
+
+import Data.Geo.GPX.Type.Latitude
+import Data.Geo.GPX.Type.Longitude
+import Data.Geo.GPX.Lens.LatL
+import Data.Geo.GPX.Lens.LonL
+import Data.Geo.GPX.Lens.EleL
+import Data.Geo.GPX.Lens.TimeL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+import Text.XML.XSD.DateTime
+
+data Pt = Pt Latitude Longitude (Maybe Double) (Maybe DateTime)
+  deriving (Eq, Ord)
+
+pt ::
+  Latitude -- ^ The lat.
+  -> Longitude -- ^ The lon.
+  -> Maybe Double -- ^ The ele.
+  -> Maybe DateTime -- ^ The time.
+  -> Pt
+pt =
+  Pt
+
+instance LatL Pt where
+  latL =
+    Lens $ \(Pt lat lon ele time) -> store (\lat -> Pt lat lon ele time) lat
+
+instance LonL Pt where
+  lonL =
+    Lens $ \(Pt lat lon ele time) -> store (\lon -> Pt lat lon ele time) lon
+
+instance EleL Pt where
+  eleL =
+    Lens $ \(Pt lat lon ele time) -> store (\ele -> Pt lat lon ele time) ele
+
+instance TimeL Pt where
+  timeL =
+    Lens $ \(Pt lat lon ele time) -> store (\time -> Pt lat lon ele time) time
+
+instance XmlPickler Pt where
+  xpickle =
+    xpWrap (\(lat', lon', ele', time') -> pt lat' lon' ele' time',
+           \(Pt lat' lon' ele' time') -> (lat', lon', ele', time')) (xp4Tuple
+             (xpAttr "lat" xpickle)
+             (xpAttr "lon" xpickle)
+             (xpOption (xpElem "ele" xpPrim))
+             (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText))))
+
diff --git a/src/Data/Geo/GPX/Type/Ptseg.hs b/src/Data/Geo/GPX/Type/Ptseg.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Ptseg.hs
@@ -0,0 +1,38 @@
+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
+
+-- | Complex Type: @ptsegType@ <http://www.topografix.com/GPX/1/1/#type_ptsegType>
+module Data.Geo.GPX.Type.Ptseg(
+  Ptseg
+, ptseg
+, runPtseg
+) where
+
+import Data.Geo.GPX.Type.Pt
+import Text.XML.HXT.Arrow.Pickle
+import Control.Newtype
+
+newtype Ptseg = Ptseg [Pt]
+  deriving (Eq, Ord)
+
+ptseg ::
+  [Pt] -- ^ The points (pt).
+  -> Ptseg
+ptseg =
+  Ptseg
+
+runPtseg ::
+  Ptseg
+  -> [Pt]
+runPtseg (Ptseg p) =
+  p
+
+instance XmlPickler Ptseg where
+  xpickle =
+    xpWrap (ptseg, \(Ptseg k) -> k) (xpList (xpElem "pt" xpickle))
+
+instance Newtype Ptseg [Pt] where
+  pack = 
+    Ptseg
+  unpack (Ptseg x) =
+    x
+
diff --git a/src/Data/Geo/GPX/Type/Rte.hs b/src/Data/Geo/GPX/Type/Rte.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Rte.hs
@@ -0,0 +1,88 @@
+-- | Complex Type: @rteType@ <http://www.topografix.com/GPX/1/1/#type_rteType>
+module Data.Geo.GPX.Type.Rte(
+  Rte
+, rte
+) where
+
+import Data.Geo.GPX.Type.Wpt
+import Data.Geo.GPX.Type.Extensions
+import Data.Geo.GPX.Type.Link
+import Data.Geo.GPX.Lens.NameL
+import Data.Geo.GPX.Lens.CmtL
+import Data.Geo.GPX.Lens.DescL
+import Data.Geo.GPX.Lens.SrcL
+import Data.Geo.GPX.Lens.LinksL
+import Data.Geo.GPX.Lens.NumberL
+import Data.Geo.GPX.Lens.TypeL
+import Data.Geo.GPX.Lens.ExtensionsL
+import Data.Geo.GPX.Lens.RteptsL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Rte = Rte (Maybe String) (Maybe String) (Maybe String) (Maybe String) [Link] (Maybe Int) (Maybe String) (Maybe Extensions) [Wpt]
+  deriving Eq
+
+rte ::
+  Maybe String -- ^ The name.
+  -> Maybe String -- ^ The cmt.
+  -> Maybe String -- ^ The desc.
+  -> Maybe String -- ^ The src.
+  -> [Link] -- ^ The links (link).
+  -> Maybe Int -- ^ The number.
+  -> Maybe String -- ^ The type.
+  -> Maybe Extensions -- ^ The extensions.
+  -> [Wpt] -- ^ The route points (rtept).
+  -> Rte
+rte a b c d e f =
+  Rte a b c d e (fmap abs f)
+
+instance NameL Rte where
+  nameL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\name -> Rte name cmt desc src links number typ extensions rtepts) name
+
+instance CmtL Rte where
+  cmtL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\cmt -> Rte name cmt desc src links number typ extensions rtepts) cmt
+
+instance DescL Rte where
+  descL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\desc -> Rte name cmt desc src links number typ extensions rtepts) desc
+
+instance SrcL Rte where
+  srcL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\src -> Rte name cmt desc src links number typ extensions rtepts) src
+
+instance LinksL Rte where
+  linksL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\links -> Rte name cmt desc src links number typ extensions rtepts) links
+
+instance NumberL Rte where
+  numberL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\number -> Rte name cmt desc src links number typ extensions rtepts) number
+
+instance TypeL Rte where
+  typeL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\typ -> Rte name cmt desc src links number typ extensions rtepts) typ
+
+instance ExtensionsL Rte where
+  extensionsL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\extensions -> Rte name cmt desc src links number typ extensions rtepts) extensions
+
+instance RteptsL Rte where
+  rteptsL =
+    Lens $ \(Rte name cmt desc src links number typ extensions rtepts) -> store (\rtepts -> Rte name cmt desc src links number typ extensions rtepts) rtepts
+
+instance XmlPickler Rte where
+  xpickle =
+    xpWrap (\(a, b, c, d, e, f, g, h, i) -> rte a b c d e f g h i, \(Rte a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
+           (xpOption (xpElem "name" xpText))
+           (xpOption (xpElem "cmt" xpText))
+           (xpOption (xpElem "desc" xpText))
+           (xpOption (xpElem "src" xpText))
+           (xpList (xpElem "link" xpickle))
+           (xpOption (xpElem "number" xpPrim))
+           (xpOption (xpElem "type" xpText))
+           (xpOption (xpElem "extensions" xpickle))
+           (xpList (xpElem "rtept" xpickle)))
+
diff --git a/src/Data/Geo/GPX/Type/Trk.hs b/src/Data/Geo/GPX/Type/Trk.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Trk.hs
@@ -0,0 +1,88 @@
+-- | Complex Type: @trkType@ <http://www.topografix.com/GPX/1/1/#type_trkType>
+module Data.Geo.GPX.Type.Trk(
+  Trk
+, trk
+) where
+
+import Data.Geo.GPX.Type.Trkseg
+import Data.Geo.GPX.Type.Extensions
+import Data.Geo.GPX.Type.Link
+import Data.Geo.GPX.Lens.NameL
+import Data.Geo.GPX.Lens.CmtL
+import Data.Geo.GPX.Lens.DescL
+import Data.Geo.GPX.Lens.SrcL
+import Data.Geo.GPX.Lens.LinksL
+import Data.Geo.GPX.Lens.NumberL
+import Data.Geo.GPX.Lens.TypeL
+import Data.Geo.GPX.Lens.ExtensionsL
+import Data.Geo.GPX.Lens.TrksegsL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Trk = Trk (Maybe String) (Maybe String) (Maybe String) (Maybe String) [Link] (Maybe Int) (Maybe String) (Maybe Extensions) [Trkseg]
+  deriving Eq
+
+trk ::
+  Maybe String -- ^ The name.
+  -> Maybe String -- ^ The cmt.
+  -> Maybe String -- ^ The desc.
+  -> Maybe String -- ^ The src.
+  -> [Link] -- ^ The links (link).
+  -> Maybe Int -- ^ The number.
+  -> Maybe String -- ^ The type.
+  -> Maybe Extensions -- ^ The extensions.
+  -> [Trkseg] -- ^ The track segments (trkseg).
+  -> Trk
+trk a b c d e f =
+  Trk a b c d e (fmap abs f)
+
+instance NameL Trk where
+  nameL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\name -> Trk name cmt desc src links number typ extensions trksegs) name
+
+instance CmtL Trk where
+  cmtL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\cmt -> Trk name cmt desc src links number typ extensions trksegs) cmt
+
+instance DescL Trk where
+  descL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\desc -> Trk name cmt desc src links number typ extensions trksegs) desc
+
+instance SrcL Trk where
+  srcL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\src -> Trk name cmt desc src links number typ extensions trksegs) src
+
+instance LinksL Trk where
+  linksL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\links -> Trk name cmt desc src links number typ extensions trksegs) links
+
+instance NumberL Trk where
+  numberL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\number -> Trk name cmt desc src links number typ extensions trksegs) number
+
+instance TypeL Trk where
+  typeL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\typ -> Trk name cmt desc src links number typ extensions trksegs) typ
+
+instance ExtensionsL Trk where
+  extensionsL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\extensions -> Trk name cmt desc src links number typ extensions trksegs) extensions
+
+instance TrksegsL Trk where
+  trksegsL =
+    Lens $ \(Trk name cmt desc src links number typ extensions trksegs) -> store (\trksegs -> Trk name cmt desc src links number typ extensions trksegs) trksegs
+
+instance XmlPickler Trk where
+  xpickle =
+    xpWrap (\(a, b, c, d, e, f, g, h, i) -> trk a b c d e f g h i, \(Trk a b c d e f g h i) -> (a, b, c, d, e, f, g, h, i)) (xp9Tuple
+      (xpOption (xpElem "name" xpText))
+      (xpOption (xpElem "cmt" xpText))
+      (xpOption (xpElem "desc" xpText))
+      (xpOption (xpElem "src" xpText))
+      (xpList (xpElem "link" xpickle))
+      (xpOption (xpElem "number" xpPrim))
+      (xpOption (xpElem "type" xpText))
+      (xpOption (xpElem "extensions" xpickle))
+      (xpList (xpElem "trkseg" xpickle)))
+
diff --git a/src/Data/Geo/GPX/Type/Trkseg.hs b/src/Data/Geo/GPX/Type/Trkseg.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Trkseg.hs
@@ -0,0 +1,38 @@
+-- | Complex Type: @trksegType@ <http://www.topografix.com/GPX/1/1/#type_trksegType>
+module Data.Geo.GPX.Type.Trkseg(
+  Trkseg,
+  trkseg
+) where
+
+import Data.Geo.GPX.Type.Wpt
+import Data.Geo.GPX.Type.Extensions
+import Data.Geo.GPX.Lens.TrkptsL
+import Data.Geo.GPX.Lens.ExtensionsL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+
+data Trkseg = Trkseg [Wpt] (Maybe Extensions)
+  deriving Eq
+
+trkseg ::
+  [Wpt] -- ^ The track points (trkpt).
+  -> Maybe Extensions -- ^ The extensions.
+  -> Trkseg
+trkseg =
+  Trkseg
+
+instance TrkptsL Trkseg where
+  trkptsL =
+    Lens $ \(Trkseg trkpts extensions) -> store (\trkpts -> Trkseg trkpts extensions) trkpts
+
+instance ExtensionsL Trkseg where
+  extensionsL =
+    Lens $ \(Trkseg trkpts extensions) -> store (\extensions -> Trkseg trkpts extensions) extensions
+
+instance XmlPickler Trkseg where
+  xpickle =
+    xpWrap (uncurry trkseg, \(Trkseg trkpt' extensions') -> (trkpt', extensions')) (xpPair
+      (xpList (xpElem "trkpt" xpickle))
+      (xpOption (xpElem "extensions" xpickle)))
+
diff --git a/src/Data/Geo/GPX/Type/Wpt.hs b/src/Data/Geo/GPX/Type/Wpt.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Geo/GPX/Type/Wpt.hs
@@ -0,0 +1,230 @@
+-- | Complex Type: @wptType@ <http://www.topografix.com/GPX/1/1/#type_wptType>
+module Data.Geo.GPX.Type.Wpt(
+  Wpt
+, wpt
+, wpt'
+) where
+
+import Data.Geo.GPX.Type.Latitude
+import Data.Geo.GPX.Type.Longitude
+import Data.Geo.GPX.Type.Degrees
+import Data.Geo.GPX.Type.Link
+import Data.Geo.GPX.Type.Fix
+import Data.Geo.GPX.Type.DgpsStation
+import Data.Geo.GPX.Type.Extensions
+import Data.Geo.GPX.Lens.LatL
+import Data.Geo.GPX.Lens.LonL
+import Data.Geo.GPX.Lens.EleL
+import Data.Geo.GPX.Lens.TimeL
+import Data.Geo.GPX.Lens.MagvarL
+import Data.Geo.GPX.Lens.GeoidheightL
+import Data.Geo.GPX.Lens.NameL
+import Data.Geo.GPX.Lens.CmtL
+import Data.Geo.GPX.Lens.DescL
+import Data.Geo.GPX.Lens.SrcL
+import Data.Geo.GPX.Lens.LinksL
+import Data.Geo.GPX.Lens.SymL
+import Data.Geo.GPX.Lens.TypeL
+import Data.Geo.GPX.Lens.FixL
+import Data.Geo.GPX.Lens.SatL
+import Data.Geo.GPX.Lens.HdopL
+import Data.Geo.GPX.Lens.VdopL
+import Data.Geo.GPX.Lens.PdopL
+import Data.Geo.GPX.Lens.AgeofdgpsdataL
+import Data.Geo.GPX.Lens.DgpsidL
+import Data.Geo.GPX.Lens.ExtensionsL
+import Data.Lens.Common
+import Control.Comonad.Trans.Store
+import Text.XML.HXT.Arrow.Pickle
+import Text.XML.XSD.DateTime
+
+data Wpt =
+  Wpt
+    Latitude
+    Longitude
+    (Maybe Double)
+    (Maybe DateTime)
+    (Maybe Degrees)
+    (Maybe Double)
+    (Maybe String)
+    (Maybe String)
+    (Maybe String)
+    (Maybe String)
+    [Link]
+    (Maybe String)
+    (Maybe String)
+    (Maybe Fix)
+    (Maybe Int)
+    (Maybe Double)
+    (Maybe Double)
+    (Maybe Double)
+    (Maybe Double)
+    (Maybe DgpsStation)
+    (Maybe Extensions)
+  deriving Eq
+
+wpt ::
+  Latitude -- ^ The lat.
+  -> Longitude -- ^ The lon.
+  -> Maybe Double -- ^ The ele.
+  -> Maybe DateTime -- ^ The time.
+  -> Maybe Degrees -- ^ The magvar.
+  -> Maybe Double -- ^ The geoidheight.
+  -> Maybe String -- ^ The name.
+  -> Maybe String -- ^ The cmt.
+  -> Maybe String -- ^ The desc.
+  -> Maybe String -- ^ The src.
+  -> [Link] -- ^ The links (link).
+  -> Maybe String -- ^ The sym.
+  -> Maybe String -- ^ The type.
+  -> Maybe Fix -- ^ The fix.
+  -> Maybe Int -- ^ The sat.
+  -> Maybe Double -- ^ The hdop.
+  -> Maybe Double -- ^ The vdop.
+  -> Maybe Double -- ^ The pdop.
+  -> Maybe Double -- ^ The ageofdgpsdata.
+  -> Maybe DgpsStation -- ^ The dgpsid.
+  -> Maybe Extensions -- ^ The extensions.
+  -> Wpt
+wpt a b c d e f g h i j k l m n o p =
+  Wpt a b c d e f g h i j k l m n o (fmap abs p)
+
+-- | A waypoint with only a latitude and longitude.
+wpt' ::
+  Latitude -- ^ The lat.
+  -> Longitude -- ^ The lon.
+  -> Wpt
+wpt' lat' lon' =
+  wpt
+    lat'
+    lon'
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    []
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+    Nothing
+
+instance LatL Wpt where
+  latL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\lat -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) lat
+
+instance LonL Wpt where
+  lonL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\lon -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) lon
+
+instance EleL Wpt where
+  eleL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\ele -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) ele
+
+instance TimeL Wpt where
+  timeL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\time -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) time
+
+instance MagvarL Wpt where
+  magvarL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\magvar -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) magvar
+
+instance GeoidheightL Wpt where
+  geoidheightL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\geoidheight -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) geoidheight
+
+instance NameL Wpt where
+  nameL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\name -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) name
+
+instance CmtL Wpt where
+  cmtL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\cmt -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) cmt
+
+instance DescL Wpt where
+  descL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\desc -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) desc
+
+instance SrcL Wpt where
+  srcL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\src -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) src
+
+instance LinksL Wpt where
+  linksL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\links -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) links
+
+instance SymL Wpt where
+  symL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\sym -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) sym
+
+instance TypeL Wpt where
+  typeL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\typ -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) typ
+
+instance FixL Wpt where
+  fixL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\fix -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) fix
+
+instance SatL Wpt where
+  satL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\sat -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) sat
+
+instance HdopL Wpt where
+  hdopL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\hdop -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) hdop
+
+instance VdopL Wpt where
+  vdopL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\vdop -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) vdop
+
+instance PdopL Wpt where
+  pdopL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\pdop -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) pdop
+
+instance AgeofdgpsdataL Wpt where
+  ageofdgpsdataL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\ageofdgpsdata -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) ageofdgpsdata
+
+instance DgpsidL Wpt where
+  dgpsidL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\dgpsid -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) dgpsid
+
+instance ExtensionsL Wpt where
+  extensionsL =
+    Lens $ \(Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) -> store (\extensions -> Wpt lat lon ele time magvar geoidheight name cmt desc src links sym typ fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions) extensions
+
+instance XmlPickler Wpt where
+  xpickle =
+    xpWrap (\(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> wpt a b c d e f g h i j k l m n o p q r s t u,
+           \(Wpt a b c d e f g h i j k l m n o p q r s t u) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)) (xp21Tuple
+              (xpAttr "lat" xpickle)
+              (xpAttr "lon" xpickle)
+              (xpOption (xpElem "ele" xpPrim))
+              (xpOption (xpElem "time" (xpWrapMaybe (dateTime, show) xpText)))
+              (xpOption (xpElem "magvar" xpickle))
+              (xpOption (xpElem "geoidheight" xpPrim))
+              (xpOption (xpElem "name" xpText))
+              (xpOption (xpElem "cmt" xpText))
+              (xpOption (xpElem "desc" xpText))
+              (xpOption (xpElem "src" xpText))
+              (xpList (xpElem "link" xpickle))
+              (xpOption (xpElem "sym" xpText))
+              (xpOption (xpElem "type" xpText))
+              (xpOption (xpElem "fix" xpickle))
+              (xpOption (xpElem "sat" xpPrim))
+              (xpOption (xpElem "hdop" xpPrim))
+              (xpOption (xpElem "vdop" xpPrim))
+              (xpOption (xpElem "pdop" xpPrim))
+              (xpOption (xpElem "ageofdgpsdata" xpPrim))
+              (xpOption (xpElem "dgpsid" xpickle))
+              (xpOption (xpElem "extensions" xpickle)))
+
