diff --git a/hsini.cabal b/hsini.cabal
--- a/hsini.cabal
+++ b/hsini.cabal
@@ -1,43 +1,51 @@
-name          : hsini
-version       : 0.4.2
-license       : BSD3
-license-file  : LICENSE
-author        : Magnus Therning
-maintainer    : magnus@therning.org
-copyright     : Magnus Therning, 2010-2014
-synopsis      : Package for user configuration files (INI)
-description   : None yet
-build-type    : Custom
-category      : Network
-cabal-version : >= 1.10
+name: hsini
+version: 0.5.0
+license: BSD3
+license-file: LICENSE
+author: Magnus Therning
+maintainer: magnus@therning.org
+copyright: Magnus Therning, 2010-2014
+synopsis: Package for user configuration files (INI)
+description: None yet
+build-type: Custom
+category: Configuration, Data
+cabal-version: >= 1.10
 
 source-repository head
-    type     : git
-    location : https://github.com/magthe/hsini.git
+    type: git
+    location: https://github.com/magthe/hsini.git
 
 library
-    hs-source-dirs  : src
-    default-language : Haskell2010
-    build-depends   : base ==4.8.*, bytestring ==0.10.*,
-        containers ==0.5.*, mtl ==2.2.*, parsec ==3.1.*
-    exposed-modules : Data.Ini Data.Ini.Types Data.Ini.Reader
-    other-modules   : Data.Ini.Reader.Internals
+    hs-source-dirs: src
+    default-language: Haskell2010
+    build-depends: base >=4.7 && <4.10,
+                   bytestring ==0.10.*,
+                   containers ==0.5.*,
+                   mtl ==2.2.*,
+                   parsec ==3.1.*
+    exposed-modules: Data.Ini
+                     Data.Ini.Types
+                     Data.Ini.Reader
+    other-modules: Data.Ini.Reader.Internals
 
 test-suite hsini-tests
     type: exitcode-stdio-1.0
     hs-source-dirs: tst, src
     main-is: Main.hs
-    other-modules: Ini, ReaderI
-    default-language : Haskell2010
-    build-depends:
-        base,
-        containers,
-        bytestring,
-        parsec,
-        mtl,
-        HUnit,
-        tasty,
-        tasty-hunit,
-        tasty-quickcheck,
-        tasty-th,
-        QuickCheck
+    other-modules: Data.Ini
+                   Data.Ini.Reader.Internals
+                   Data.Ini.Types
+                   Ini
+                   ReaderI
+    default-language: Haskell2010
+    build-depends: base,
+                   containers,
+                   bytestring,
+                   parsec,
+                   mtl,
+                   HUnit,
+                   tasty,
+                   tasty-hunit,
+                   tasty-quickcheck,
+                   tasty-th,
+                   QuickCheck
diff --git a/src/Data/Ini.hs b/src/Data/Ini.hs
--- a/src/Data/Ini.hs
+++ b/src/Data/Ini.hs
@@ -54,19 +54,19 @@
 
 -- | Sets the value of the option, adding it if it doesn't exist.
 setOption :: SectionName -> OptionName -> OptionValue -> Config -> Config
-setOption sn on ov cfg = let
+setOption sn on ov cfg = maybe (M.insert sn new_s cfg) (\ sec -> M.insert sn (M.insert on ov sec) cfg) s
+    where
         s = getSection sn cfg
         new_s = M.insert on ov M.empty
-    in maybe (M.insert sn new_s cfg) (\ sec -> M.insert sn (M.insert on ov sec) cfg) s
 
 -- | Removes the option if it exists.  Empty sections are pruned.
 delOption :: SectionName -> OptionName -> Config -> Config
-delOption sn on cfg = let
-        s = getSection sn cfg
-        sEmptyAfterDelete = maybe True (\ sec -> M.empty == M.delete on sec) s
-    in if sEmptyAfterDelete
+delOption sn on cfg = if sEmptyAfterDelete
         then M.delete sn cfg
         else maybe cfg (\ sec -> M.insert sn (M.delete on sec) cfg) s
+    where
+        s = getSection sn cfg
+        sEmptyAfterDelete = maybe True (\ sec -> M.empty == M.delete on sec) s
 
 -- | Returns all options and their values of a section.
 allItems :: SectionName -> Config -> [(OptionName, OptionValue)]
diff --git a/src/Data/Ini/Reader.hs b/src/Data/Ini/Reader.hs
--- a/src/Data/Ini/Reader.hs
+++ b/src/Data/Ini/Reader.hs
@@ -10,7 +10,7 @@
     , IniParseResult
     ) where
 
-import Control.Monad.Error
+import Control.Monad.Except
 import qualified Text.ParserCombinators.Parsec as P
 
 import Data.Ini.Types
diff --git a/src/Data/Ini/Reader/Internals.hs b/src/Data/Ini/Reader/Internals.hs
--- a/src/Data/Ini/Reader/Internals.hs
+++ b/src/Data/Ini/Reader/Internals.hs
@@ -7,9 +7,8 @@
 -- Internal functions used in 'Data.Ini.Reader'.
 module Data.Ini.Reader.Internals where
 
-import Control.Monad.Error
+import Control.Monad.Except
 import Control.Monad.State
--- import Text.ParserCombinators.Parsec as P
 import qualified Data.ByteString as BS
 import Text.Parsec as P
 import Text.Parsec.String
@@ -22,10 +21,6 @@
     | IniSyntaxError String
     | IniOtherError String
     deriving (Eq, Show)
-
-instance Error IniReaderError where
-    noMsg = IniOtherError "Unknown error"
-    strMsg s = IniOtherError s
 
 type IniParseResult = Either IniReaderError
 
