diff --git a/hexpat-streamparser.cabal b/hexpat-streamparser.cabal
--- a/hexpat-streamparser.cabal
+++ b/hexpat-streamparser.cabal
@@ -1,7 +1,7 @@
 cabal-version: 1.12
 name: hexpat-streamparser
 description: streaming xml parser combinators using hexpat
-version: 0.1.1
+version: 0.1.2
 maintainer: kristof@resonata.be
 copyright: Kristof Bastiaensen 2020
 license: BSD3
@@ -27,7 +27,8 @@
         text >= 1.2 && < 1.3 ,
         parser-combinators >= 1.2 && < 1.3,
         transformers >= 0.5 && < 0.6,
-        bytestring >= 0.10 && < 0.11
+        bytestring >= 0.10 && < 0.11,
+        cps-except >= 0.0.1.0
    default-extensions: OverloadedStrings
 
 test-suite test
@@ -39,7 +40,7 @@
     test.hs
   build-depends:
     hexpat >= 0.20 && < 0.21,     
-    hexpat-streamparser == 0.1.1,
+    hexpat-streamparser == 0.1.2,
     base >= 4 && < 5,
     hspec
   default-extensions: OverloadedStrings
diff --git a/src/Text/XML/Expat/StreamParser.hs b/src/Text/XML/Expat/StreamParser.hs
--- a/src/Text/XML/Expat/StreamParser.hs
+++ b/src/Text/XML/Expat/StreamParser.hs
@@ -89,6 +89,7 @@
 import Control.Applicative hiding (many)
 import Control.Monad.Combinators as C
 import Control.Monad.Error.Class
+import Control.Monad.CPSExcept
 import Control.Monad.Fail
 import Control.Monad.State hiding (fail, lift)
 import Control.Monad.Trans (lift)
@@ -103,46 +104,6 @@
 import Data.Text (Text)
 import Text.XML.Expat.SAX as Expat
 import Data.List (nub)
-
-newtype CPSExceptT e m a =
-  CPSExceptT { getCPSExceptT :: forall r. ((e -> m r) -> (a -> m r) -> m r) }
-
-runCPSExceptT :: Applicative m => CPSExceptT e m a -> m (Either e a)
-runCPSExceptT (CPSExceptT f) = f (pure . Left)  (pure . Right)
-{-# INLINE runCPSExceptT #-}
-
-instance Functor (CPSExceptT e m) where
-  fmap f (CPSExceptT g) = CPSExceptT $ \failC successC ->
-    g failC (successC . f)
-  {-# INLINE fmap #-}
-
-instance Monad m => Applicative (CPSExceptT e m) where
-  pure x = CPSExceptT $ \_failC successC -> successC x
-  {-# INLINE pure #-}
-  (<*>) = ap
-  {-# INLINE (<*>) #-}
-
-instance Monad m => Monad (CPSExceptT e m) where
-  CPSExceptT f >>= g = CPSExceptT $ \failC successC ->
-    f failC (\a -> getCPSExceptT (g a) failC successC)
-  {-# INLINE (>>=) #-}
-
-instance Monad m => MonadError e (CPSExceptT e m) where
-  throwError e = CPSExceptT $ \failC _successC -> failC e
-  {-# INLINE throwError #-}
-  catchError (CPSExceptT f) handler =
-    CPSExceptT $ \failC successC ->
-    f (\e -> getCPSExceptT (handler e) failC successC)
-    successC
-  {-# INLINE catchError #-}
-
-instance MonadTrans (CPSExceptT e) where
-  lift m = CPSExceptT $ \_failC successC -> m >>= successC
-  {-# INLINE lift #-}
-
-instance MonadState s m => MonadState s (CPSExceptT e m) where
-  state f = lift $ state f
-  {-# INLINE state #-}
 
 type EventLoc = (SAXEvent Text Text, XMLParseLocation)
 
