diff --git a/Data/Streaming/Blaze.hs b/Data/Streaming/Blaze.hs
--- a/Data/Streaming/Blaze.hs
+++ b/Data/Streaming/Blaze.hs
@@ -38,8 +38,6 @@
     ) where
 
 import Data.IORef
-import Control.Monad (unless, liftM)
-import Control.Monad.Trans.Class (lift, MonadTrans)
 
 import qualified Data.ByteString                   as S
 
diff --git a/Data/Streaming/Network.hs b/Data/Streaming/Network.hs
--- a/Data/Streaming/Network.hs
+++ b/Data/Streaming/Network.hs
@@ -71,7 +71,7 @@
     , safeRecv
     , runTCPServer
     , runTCPClient
-    , ConnectionHandle (..)
+    , ConnectionHandle()
     , runTCPServerWithHandle
       -- ** UDP
     , bindPortUDP
@@ -102,7 +102,7 @@
 import Control.Concurrent (forkIO)
 import Control.Monad (forever)
 import Data.IORef (IORef, newIORef, atomicModifyIORef)
-import Data.Array.Unboxed ((!), UArray, bounds, listArray)
+import Data.Array.Unboxed ((!), UArray, listArray)
 import System.IO.Unsafe (unsafePerformIO)
 import System.Random (randomRIO)
 #if WINDOWS
@@ -188,7 +188,7 @@
 -- Since 0.1.1
 bindRandomPortGen :: SocketType -> HostPreference -> IO (Int, Socket)
 bindRandomPortGen sockettype s =
-    loop 30
+    loop (30 :: Int)
   where
     loop cnt = do
         port <- getUnassignedPort
@@ -465,12 +465,6 @@
 
 setPort :: HasPort a => Int -> a -> a
 setPort p = runIdentity . portLens (const (Identity p))
-
-setHostPref :: HostPreference -> ServerSettings -> ServerSettings
-setHostPref hp ss = ss { serverHost = hp }
-
-getHostPref :: ServerSettings -> HostPreference
-getHostPref = serverHost
 
 setHost :: ByteString -> ClientSettings -> ClientSettings
 setHost hp ss = ss { clientHost = hp }
diff --git a/Data/Streaming/Network/Internal.hs b/Data/Streaming/Network/Internal.hs
--- a/Data/Streaming/Network/Internal.hs
+++ b/Data/Streaming/Network/Internal.hs
@@ -59,26 +59,11 @@
     deriving (Eq, Ord, Show, Read)
 
 instance IsString HostPreference where
-    -- The funny code coming up is to get around some irritating warnings from
-    -- GHC. I should be able to just write:
-    {-
     fromString "*" = HostAny
     fromString "*4" = HostIPv4
     fromString "!4" = HostIPv4Only
     fromString "*6" = HostIPv6
     fromString "!6" = HostIPv6Only
-    -}
-    fromString s'@('*':s) =
-        case s of
-            [] -> HostAny
-            ['4'] -> HostIPv4
-            ['6'] -> HostIPv6
-            _ -> Host s'
-    fromString s'@('!':s) =
-        case s of
-            ['4'] -> HostIPv4Only
-            ['6'] -> HostIPv6Only
-            _ -> Host s'
     fromString s = Host s
 
 #if !WINDOWS
diff --git a/Data/Streaming/Text.hs b/Data/Streaming/Text.hs
--- a/Data/Streaming/Text.hs
+++ b/Data/Streaming/Text.hs
@@ -55,7 +55,7 @@
 import           Data.Text                         (Text)
 import qualified Data.Text                         as T
 import qualified Data.Text.Array                   as A
-import           Data.Text.Internal                (textP)
+import           Data.Text.Internal                (text)
 import qualified Data.Text.Internal.Encoding.Utf16 as U16
 import qualified Data.Text.Internal.Encoding.Utf32 as U32
 import qualified Data.Text.Internal.Encoding.Utf8  as U8
@@ -92,7 +92,7 @@
 getText :: Int -> A.MArray s -> ST s Text
 getText j marr = do
     arr <- A.unsafeFreeze marr
-    return $! textP arr 0 j
+    return $! text arr 0 j
 {-# INLINE getText #-}
 
 #include "text_cbits.h"
@@ -105,7 +105,7 @@
 newtype CodePoint = CodePoint Word32 deriving (Eq, Show, Num, Storable)
 newtype DecoderState = DecoderState Word32 deriving (Eq, Show, Num, Storable)
 
--- | /O(n)/ Convert a lazy 'ByteString' into a 'Stream Char', using
+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using
 -- UTF-8 encoding.
 decodeUtf8 :: B.ByteString -> DecodeResult
 decodeUtf8 = decodeChunk B.empty 0 0
@@ -138,7 +138,7 @@
               n <- peek destOffPtr
               chunkText <- unsafeSTToIO $ do
                   arr <- A.unsafeFreeze dest
-                  return $! textP arr 0 (fromIntegral n)
+                  return $! text arr 0 (fromIntegral n)
               lastPtr <- peek curPtrPtr
               let left = lastPtr `minusPtr` curPtr
                   -- The logic here is: if any text was generated, then the
@@ -159,7 +159,7 @@
                          $! decodeChunkCheck unused codepoint state
         in loop (ptr `plusPtr` off)
 
--- | /O(n)/ Convert a lazy 'ByteString' into a 'Stream Char', using
+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using
 -- UTF-8 encoding.
 decodeUtf8Pure :: B.ByteString -> DecodeResult
 decodeUtf8Pure =
diff --git a/Data/Streaming/Zlib.hs b/Data/Streaming/Zlib.hs
--- a/Data/Streaming/Zlib.hs
+++ b/Data/Streaming/Zlib.hs
@@ -49,7 +49,6 @@
 import Codec.Compression.Zlib (WindowBits(WindowBits), defaultWindowBits)
 import qualified Data.ByteString as S
 import Data.ByteString.Lazy.Internal (defaultChunkSize)
-import Control.Monad (when)
 import Data.Typeable (Typeable)
 import Control.Exception (Exception)
 
diff --git a/streaming-commons.cabal b/streaming-commons.cabal
--- a/streaming-commons.cabal
+++ b/streaming-commons.cabal
@@ -1,5 +1,5 @@
 name:                streaming-commons
-version:             0.1.7.2
+version:             0.1.7.3
 synopsis:            Common lower-level functions needed by various streaming data libraries
 description:         Provides low-dependency functionality commonly needed by various streaming data libraries, such as conduit and pipes.
 homepage:            https://github.com/fpco/streaming-commons
