diff --git a/Setup.lhs b/Setup.lhs
--- a/Setup.lhs
+++ b/Setup.lhs
@@ -1,31 +1,3 @@
 #!/usr/bin/env runhaskell
 > import Distribution.Simple
-> import Distribution.PackageDescription
-> import Distribution.Simple.Setup ( defaultBuildFlags )
-> import Distribution.Simple.LocalBuildInfo ( buildDir )
-> import Distribution.Simple.Utils ( rawSystemExit )
-> import Distribution.Verbosity ( normal )
-> import System.FilePath ( (</>) )
-> import Control.Monad ( forM_, when )
-> import Data.Char ( toLower )
-
-> main = defaultMainWithHooks $ handleTestExes simpleUserHooks
-
-> handleTestExes hooks = hooks { instHook = dropTestExes instHook
->                              , copyHook = dropTestExes copyHook
->                              , runTests = runTestExes
->                              }
->     where
->       dropTestExes hook pkg =
->           let nonTest = filter (not . isTestExe) (executables pkg)
->           in hook hooks $ pkg { executables = nonTest }
->
->       runTestExes args _unknown pkg lbi = do
->         buildHook hooks pkg lbi hooks defaultBuildFlags
->         forM_ (executables pkg) $ \exe ->
->             let testPath = buildDir lbi </> exeName exe </> exeName exe
->             in when (isTestExe exe) $ rawSystemExit normal testPath args
-
-> isTestExe exe =
->     let fields = customFieldsBI (buildInfo exe)
->     in ["true"] == [ map toLower val | ("x-test-executable", val) <- fields ]
+> main = defaultMain
diff --git a/src/Data/URLEncoded.hs b/src/Data/URLEncoded.hs
--- a/src/Data/URLEncoded.hs
+++ b/src/Data/URLEncoded.hs
@@ -14,6 +14,7 @@
     , empty
     , importString
     , importList
+    , importURI
     , (%=)
     , (%=?)
     , (%&)
@@ -176,6 +177,12 @@
                                      )
                 unknown -> error $ "impossible: " ++ show unknown
           unesc = unEscapeString . intercalate "%20" . unintercalate "+"
+
+importURI :: MonadError e m => URI -> m URLEncoded
+importURI u = case uriQuery u of
+                ('?':s) -> importString s
+                [] -> return empty
+                q -> fail $ "Unexpected query for URI: " ++ show q
 
 -- |Return the /first/ value for the given key, or throw an error if the
 -- key is not present in the URLEncoded data.
diff --git a/urlencoded.cabal b/urlencoded.cabal
--- a/urlencoded.cabal
+++ b/urlencoded.cabal
@@ -1,6 +1,6 @@
 name:                urlencoded
 Cabal-Version:       >= 1.6
-version:             0.2.0.0
+version:             0.3.0.0
 synopsis:            Generate or process x-www-urlencoded data
 
 description:         Generate or process x-www-urlencoded data as it
@@ -15,8 +15,13 @@
 author:              Josh Hoyt
 maintainer:          joshhoyt@gmail.com
 build-type:          Custom
+
+Flag Test
+  Description: Build the test executable
+  Default: False
+
 Library
-  build-depends:       base == 4.*, network == 2.2.*, mtl, split == 0.1.*
+  build-depends:       base == 4.*, network == 2.2.*, mtl == 1.1.*, split == 0.1.*
   ghc-options:         -Wall
   hs-source-dirs:      src
   exposed-modules:     Data.URLEncoded
@@ -24,12 +29,14 @@
 -- This executable is not installed by the (custom) Setup program. It is
 -- used by the test hook (cabal test)
 Executable test
-  build-depends:
-    base == 4.*,
-    network == 2.2.*,
-    mtl,
-    QuickCheck >= 1.2 && < 1.3,
-    split == 0.1.*
+  if flag(test)
+    Buildable: True
+    build-depends:
+      QuickCheck >= 1.2 && < 1.3
+
+  else
+    Buildable: False
+
   GHC-Options: -Wall
   Main-is: TestDriver.hs
   HS-Source-Dirs: src, test
