diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,8 @@
 Changelog for Hoogle
 
+5.0.3
+    #181, use the proper network constrains
+    Avoid deprecated Aeson modules
 5.0.2
     Move to haskell-src-exts-1.18
 5.0.1
diff --git a/hoogle.cabal b/hoogle.cabal
--- a/hoogle.cabal
+++ b/hoogle.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.10
 build-type:         Simple
 name:               hoogle
-version:            5.0.2
+version:            5.0.3
 license:            BSD3
 license-file:       LICENSE
 category:           Development
@@ -37,10 +37,19 @@
     type:     git
     location: https://github.com/ndmitchell/hoogle.git
 
+flag network-uri
+    description: Get Network.URI from the network-uri package
+    default: True
+
 library
     hs-source-dirs:     src
     default-language:   Haskell98
 
+    if flag(network-uri)
+        build-depends: network-uri >= 2.6, network >= 2.6
+    else
+        build-depends: network-uri < 2.6, network < 2.6
+
     build-depends:
         QuickCheck,
         aeson,
@@ -62,8 +71,6 @@
         js-flot,
         js-jquery,
         mmap,
-        network,
-        network-uri,
         old-locale,
         process,
         resourcet,
diff --git a/src/Action/Server.hs b/src/Action/Server.hs
--- a/src/Action/Server.hs
+++ b/src/Action/Server.hs
@@ -37,7 +37,7 @@
 import Control.Applicative
 import Prelude
 
-import qualified Data.Aeson.Encode as JSON
+import qualified Data.Aeson as JSON
 
 
 actionServer :: CmdLine -> IO ()
diff --git a/src/General/Str.hs b/src/General/Str.hs
--- a/src/General/Str.hs
+++ b/src/General/Str.hs
@@ -2,8 +2,8 @@
 
 -- | ByteString wrappers which don't require special imports and are all UTF8 safe
 module General.Str(
-    Str, strPack, strUnpack, strReadFile, strSplitInfix, strNull, strConcat, strStripPrefix, strStripSuffix, strLines, strTrimStart, strUnlines, strUnwords,
-    LStr, lstrPack, lstrUnpack, lstrLines, lstrToChunks, lstrFromChunks, lstrToStr,
+    Str, strPack, strUnpack, strReadFile, strSplitInfix, strNull, strStripPrefix, strTrimStart,
+    LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks,
     Str0, join0, split0
     ) where
 
@@ -39,39 +39,16 @@
 strNull :: Str -> Bool
 strNull = BS.null
 
-strConcat :: [Str] -> Str
-strConcat = BS.concat
-
 strStripPrefix :: Str -> Str -> Maybe Str
 strStripPrefix needle x
     | BS.isPrefixOf needle x = Just $ BS.drop (BS.length needle) x
     | otherwise = Nothing
 
-strStripSuffix :: Str -> Str -> Maybe Str
-strStripSuffix needle x
-    | BS.isSuffixOf needle x = Just $ BS.take (BS.length x - BS.length needle) x
-    | otherwise = Nothing
-
 strTrimStart :: Str -> Str
 strTrimStart = BS.dropWhile isSpace
 
-strUnlines :: [Str] -> Str
-strUnlines = BS.unlines
-
-strLines :: Str -> [Str]
-strLines = BS.lines
-
-strUnwords :: [Str] -> Str
-strUnwords = BS.unwords
-
-lstrLines :: LStr -> [LStr]
-lstrLines = LBS.lines
-
 lstrToChunks :: LStr -> [Str]
 lstrToChunks = LBS.toChunks
-
-lstrToStr :: LStr -> Str
-lstrToStr = LBS.toStrict
 
 lstrFromChunks :: [Str] -> LStr
 lstrFromChunks = LBS.fromChunks
