diff --git a/Network/UrlDisp.hs b/Network/UrlDisp.hs
--- a/Network/UrlDisp.hs
+++ b/Network/UrlDisp.hs
@@ -35,7 +35,7 @@
            => String      -- ^ path (hierarchical part of the URL)
            -> UrlDisp m a
            -> m (Maybe a)
-runUrlDisp p hndl = runMaybeT (evalStateT hndl (UrlS {pPath = pinfo}))
+runUrlDisp p (UrlDisp hn) = runMaybeT $ evalStateT hn (UrlS {pPath = pinfo})
     where pinfo = (filter (not . null) . splitPath) p
           splitPath :: String -> [String]
           splitPath xs = let (zs, ys) = break (=='/') xs
@@ -48,19 +48,4 @@
 evalUrlDisp :: (MonadCGI m, MonadIO m) => UrlDisp m CGIResult -> m CGIResult
 evalUrlDisp handler = pathInfo >>= \s -> runUrlDisp s handler >>=
     maybe (outputNotFound s) return
-
-{-
--- 1) we can't rely on existance of MaybeT MPlus instance
---    in the Control.Monad.Maybe
--- 2) uncommenting this gives compilation failure (duplicate instance decls)
---    because Control.Monad.Maybe in fact does have the instance declared,
---    contrary to the docs
-instance Monad m => MonadPlus (MaybeT m) where
-    mzero = MaybeT $ return Nothing
-    mplus x y = MaybeT $ do
-        x' <- runMaybeT x
-        case x' of
-            Just _ -> return x'
-            Nothing -> runMaybeT y
--}
 
diff --git a/Network/UrlDisp/Types.hs b/Network/UrlDisp/Types.hs
--- a/Network/UrlDisp/Types.hs
+++ b/Network/UrlDisp/Types.hs
@@ -1,8 +1,7 @@
 {-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving #-}
-module Network.UrlDisp.Types (UrlS(..), UrlDisp) where
+module Network.UrlDisp.Types (UrlS(..), UrlDisp(..)) where
 
 import Control.Applicative (Alternative(..), Applicative(..))
--- import Control.Monad.Reader
 import Control.Monad.Maybe
 import Control.Monad.State.Strict
 
@@ -10,10 +9,26 @@
 
 data UrlS = UrlS { pPath :: [String] }
 
--- just a shorthand
-type UrlDisp m a = StateT UrlS (MaybeT m) a
+newtype UrlDisp m a = UrlDisp (StateT UrlS (MaybeT m) a)
+    deriving (Functor, Monad, MonadState UrlS, MonadCGI, MonadIO,
+              Applicative, Alternative)
 
--- boilerplate, lots of it
+instance MonadTrans UrlDisp where
+    lift m = UrlDisp $ (lift . lift) m
+
+instance MonadCGI m => Applicative (StateT UrlS (MaybeT m)) where
+    pure = return
+    (<*>) = ap
+
+instance (MonadCGI m) => Alternative (StateT UrlS (MaybeT m)) where
+    empty = lift . MaybeT $ return Nothing
+    a <|> b = StateT $ \s -> MaybeT (runMaybeT (runStateT a s) >>=
+                             \v -> case v of
+                                      Nothing -> runMaybeT (runStateT b s)
+                                      Just _ -> return v)
+
+-- FIXME: orphan instances, but apparently
+-- there's no other way...
 instance (MonadCGI m) => MonadCGI (StateT s m) where
     cgiAddHeader n v = lift $ cgiAddHeader n v
     cgiGet = lift . cgiGet
@@ -21,12 +36,4 @@
 instance (MonadCGI m) => MonadCGI (MaybeT m) where
     cgiAddHeader n v = lift $ cgiAddHeader n v
     cgiGet = lift . cgiGet
-
-instance (Monad m) => Applicative (StateT UrlS (MaybeT (CGIT m))) where
-    pure = return
-    (<*>) = ap
-
-instance (Monad m) => Alternative (StateT UrlS (MaybeT (CGIT m))) where
-    empty = lift mzero
-    a <|> b = StateT $ \s -> mplus (runStateT a s) (runStateT b s)
 
diff --git a/UrlDisp.cabal b/UrlDisp.cabal
--- a/UrlDisp.cabal
+++ b/UrlDisp.cabal
@@ -1,8 +1,9 @@
 name: UrlDisp
-version: 0.1.3
+version: 0.1.7
 author: Artyom Shalkhakov, Sterling Clover
 copyright: Artyom Shalkhakov, Sterling Clover
 maintainer: Artyom Shalkhakov <artyom.shalkhakov@gmail.com>
+homepage: http://www.haskell.org/haskellwiki/UrlDisp
 
 license: BSD3
 license-File: LICENSE
@@ -12,11 +13,12 @@
 category: Network, Web
 
 build-type: Simple
-cabal-version: >= 1.2
+cabal-version: >= 1.6
 tested-with: GHC == 6.10.1
 
 library
-    build-depends: base >= 4, cgi >= 3001.1.0, mtl, MaybeT
+    build-depends: base ==4.*, cgi ==3001.1.*, mtl ==1.*, MaybeT ==0.1.*
     exposed-modules: Network.UrlDisp
     other-modules: Network.UrlDisp.Types, Network.UrlDisp.Controller
     ghc-options: -Wall
+
