diff --git a/src/Text/XML/Light/Extractors/Extra.hs b/src/Text/XML/Light/Extractors/Extra.hs
--- a/src/Text/XML/Light/Extractors/Extra.hs
+++ b/src/Text/XML/Light/Extractors/Extra.hs
@@ -1,15 +1,15 @@
 module Text.XML.Light.Extractors.Extra where
 
-import Safe (readMay)
+import Text.Read (readMaybe)
 
 
 -- | Reads a floating point value or return @'Left' "float"@ if
 -- the read fails.
 float :: (Floating a, Read a) => String -> Either String a
-float = maybe (Left "float") return . readMay
+float = maybe (Left "float") return . readMaybe
 
 
 -- | Reads an integer value or return @'Left' "integer"@ if the read
 -- fails.
 integer :: (Integral a, Read a) => String -> Either String a
-integer = maybe (Left "integer") return . readMay
+integer = maybe (Left "integer") return . readMaybe
diff --git a/src/Text/XML/Light/Extractors/Internal.hs b/src/Text/XML/Light/Extractors/Internal.hs
--- a/src/Text/XML/Light/Extractors/Internal.hs
+++ b/src/Text/XML/Light/Extractors/Internal.hs
@@ -4,7 +4,7 @@
   ( Path
   , Err(..)
   , ExtractionErr(..)
-    
+
   -- * Element extraction
   , ElementExtractor
   , runElementExtractor
@@ -12,7 +12,7 @@
   , attribAs
   , children
   , contents
-  
+
   -- * Contents extraction
   , ContentsExtractor
   , runContentsExtractor
@@ -21,7 +21,7 @@
   , textAs
   , anyContent
   , eoc
-  ) 
+  )
 where
 
 import Control.Monad.Identity
@@ -37,7 +37,7 @@
 --------------------------------------------------------------------------------
 
 elemName :: Element -> String
-elemName = qName . elName
+elemName = XML.qName . XML.elName
 
 --------------------------------------------------------------------------------
 
@@ -70,7 +70,7 @@
            { expectedContent :: String
            , foundContent    :: XML.Content
            } -- ^ Some expected content is missing
-         | ErrExpectAttrib 
+         | ErrExpectAttrib
            { expectedAttrib :: String       -- ^ name of expected attribute
            , atElement      :: XML.Element  -- ^ element with missing attribute
            } -- ^ An expected attribute is missing
@@ -79,7 +79,7 @@
            , foundValue     :: String       -- ^ the value found
            , atElement      :: XML.Element  -- ^ element with bad attribute
            } -- ^ An attribute value was bad
-         | ErrEnd 
+         | ErrEnd
            { foundContent   :: XML.Content
            } -- ^ Expected end of contents
          | ErrNull
@@ -120,7 +120,7 @@
 attribAs name f = do
   (path,x) <- ask
   let path' = pushAttrib name path
-  case XML.lookupAttr (XML.unqual name) (elAttribs x) of
+  case XML.lookupAttr (XML.unqual name) (XML.elAttribs x) of
     Nothing -> throwError $ ExtractionErr (ErrExpectAttrib name x) path
     Just s  ->
       case f s of
@@ -131,7 +131,7 @@
 contents :: ContentsExtractor a -> ElementExtractor a
 contents p = do
   (path,x) <- ask
-  let r = runContentsExtractor p (elContent x) 1 path
+  let r = runContentsExtractor p (XML.elContent x) 1 path
   makeElementExtractor $ fmap fst r
 
 
@@ -149,7 +149,7 @@
 --   case f s of
 --     Left e   -> throwError (ExtractionErr e path)
 --     Right a  -> return a
-  
+
 --------------------------------------------------------------------------------
 
 type Ctx = (Path, Int, [XML.Content])
@@ -157,7 +157,7 @@
 type ContentsExtractor a = StateT Ctx (ResultT ExtractionErr Identity) a
 
 runContentsExtractor :: ContentsExtractor a -> [Content] -> Int -> Path -> Result ExtractionErr (a, Ctx)
-runContentsExtractor p contents i path = 
+runContentsExtractor p contents i path =
   runIdentity $ runResultT $ runStateT p (path, i, contents)
 
 
@@ -186,7 +186,7 @@
 
 
 textAs :: (String -> Either Err a) -> ContentsExtractor a
-textAs f = first "text" go 
+textAs f = first "text" go
   where
     go (Text x) path =
       case f (cdData x) of
diff --git a/xml-extractors.cabal b/xml-extractors.cabal
--- a/xml-extractors.cabal
+++ b/xml-extractors.cabal
@@ -1,5 +1,5 @@
 name:                xml-extractors
-version:             0.4.0.1
+version:             0.4.0.2
 synopsis:            Extension to the xml package to extract data from parsed xml
 description:
   This library provides functions to simplify extraction of data from
@@ -12,33 +12,29 @@
     * Only handles unqualified names. (This is by design to simplify usage.)
   .
     * No column number and sometimes no line number reference in error values.
- 
+
 homepage:            https://github.com/holmisen/xml-extractors
 license:             BSD3
 license-file:        LICENSE
 author:              Johan Holmquist
 maintainer:          holmisen@gmail.com
--- copyright:           
 category:            XML
-tested-with:         GHC == 7.8.3, GHC == 7.8.4, GHC == 7.10.2
 build-type:          Simple
 extra-source-files:  README.md, changelog.md
 cabal-version:       >=1.10
 
 library
-  exposed-modules:     Text.XML.Light.Extractors, 
+  exposed-modules:     Text.XML.Light.Extractors,
                        Text.XML.Light.Extractors.Internal,
                        Text.XML.Light.Extractors.Internal.Result,
                        Text.XML.Light.Extractors.Extra,
                        Text.XML.Light.Extractors.ShowErr
   -- other-modules:
   other-extensions:    NoMonomorphismRestriction
-  build-depends:       base >=4.6 && <4.9,
+  build-depends:       base >=4.6 && <5,
                        xml >=1.3 && <1.4,
                        mtl >=2.1 && <2.3,
-                       transformers >=0.3 && <0.5,
-                       safe >=0.3 && <0.4
+                       transformers >=0.3 && <0.6
   hs-source-dirs:      src
   default-language:    Haskell2010
   ghc-options:         -fno-warn-warnings-deprecations
-  
