diff --git a/antisplice.cabal b/antisplice.cabal
--- a/antisplice.cabal
+++ b/antisplice.cabal
@@ -10,7 +10,7 @@
 -- PVP summary:      +-+------- breaking API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:             0.16.0.1
+version:             0.17.0.0
 
 -- A short (one-line) description of the package.
 synopsis:            An engine for text-based dungeons.
@@ -48,7 +48,7 @@
 
 library
   -- Modules exported by the library.
-  exposed-modules:     Game.Antisplice.Prototypes, Game.Antisplice.Templates, Game.Antisplice.Lang, Game.Antisplice.Monad, Game.Antisplice.Rooms, Game.Antisplice.Errors, Game.Antisplice.Utils.TST, Game.Antisplice.Utils.AVL, Game.Antisplice.Utils.Run, Game.Antisplice.Utils.BST, Game.Antisplice.Utils.Graph, Game.Antisplice.Utils.Counter, Game.Antisplice.Utils.Fail, Game.Antisplice.Monad.Dungeon, Game.Antisplice.Terminal.Repl, Game.Antisplice.Events, Game.Antisplice.Monad.Vocab, Game.Antisplice.Utils.Atoms, Game.Antisplice.Stats, Game.Antisplice.Utils.None, Game.Antisplice.Utils.Focus, Game.Antisplice.SingleUser, Game.Antisplice, Game.Antisplice.Skills, Game.Antisplice.Stereos, Game.Antisplice.Paths, Game.Antisplice.Action, Game.Antisplice.Utils.ListBuilder, Game.Antisplice.Call, Game.Antisplice.MaskedSkills, Game.Antisplice.Utils.Hetero
+  exposed-modules:     Game.Antisplice.Prototypes, Game.Antisplice.Templates, Game.Antisplice.Lang, Game.Antisplice.Monad, Game.Antisplice.Rooms, Game.Antisplice.Errors, Game.Antisplice.Monad.Dungeon, Game.Antisplice.Terminal.Repl, Game.Antisplice.Events, Game.Antisplice.Monad.Vocab, Game.Antisplice.Stats, Game.Antisplice.SingleUser, Game.Antisplice, Game.Antisplice.Skills, Game.Antisplice.Stereos, Game.Antisplice.Paths, Game.Antisplice.Action, Game.Antisplice.Call, Game.Antisplice.MaskedSkills
   
   -- Modules included in this library but not exported.
   -- other-modules:       
@@ -57,7 +57,7 @@
   other-extensions:    TemplateHaskell, QuasiQuotes, FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances, FlexibleContexts, UndecidableInstances, RankNTypes, TypeFamilies, FunctionalDependencies, LambdaCase, ScopedTypeVariables, ExistentialQuantification, TupleSections, RecordWildCards, DeriveDataTypeable
   
   -- Other library packages from which modules are imported.
-  build-depends:       base >=4.6 && <4.7, chatty >=0.5.4 && <0.6, text >=0.11 && <0.12, template-haskell >=2.8 && <2.9, mtl >=2.1 && <2.2, transformers >=0.3 && <0.4, haskeline >= 0.7 && < 0.8, time >= 1.4 && < 1.5
+  build-depends:       base >=4.6 && <4.7, chatty >=0.6 && <0.7, chatty-utils >= 0.6 && <0.7, text >=0.11 && <0.12, template-haskell >=2.8 && <2.9, mtl >=2.1 && <2.2, transformers >=0.3 && <0.4, haskeline >= 0.7 && < 0.8, time >= 1.4 && < 1.5
   
   -- Directories containing source files.
   hs-source-dirs:      src
diff --git a/src/Game/Antisplice.hs b/src/Game/Antisplice.hs
--- a/src/Game/Antisplice.hs
+++ b/src/Game/Antisplice.hs
@@ -29,11 +29,11 @@
   module Game.Antisplice.Call,
   module Game.Antisplice.Monad.Dungeon,
   module Game.Antisplice.Monad.Vocab,
-  module Game.Antisplice.Utils.Fail,
-  module Game.Antisplice.Utils.Atoms,
-  module Game.Antisplice.Utils.None,
-  module Game.Antisplice.Utils.BST,
-  module Game.Antisplice.Utils.Counter,
+  module Data.Chatty.Fail,
+  module Data.Chatty.Atoms,
+  module Data.Chatty.None,
+  module Data.Chatty.BST,
+  module Data.Chatty.Counter,
   module Game.Antisplice.Rooms,
   module Game.Antisplice.Stats,
   module Game.Antisplice.Stereos,
@@ -45,7 +45,7 @@
   module Game.Antisplice.Events,
   module Game.Antisplice.Paths,
   module Game.Antisplice.Action,
-  module Game.Antisplice.Utils.Hetero,
+  module Data.Chatty.Hetero,
   -- * Type abbreviations
   Constructor) where
 
@@ -58,12 +58,12 @@
 import Game.Antisplice.Monad
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad.Vocab
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.Counter
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.Fail
+import Data.Chatty.Atoms
+import Data.Chatty.None
+import Data.Chatty.BST
+import Data.Chatty.Counter
+import Data.Chatty.Hetero
 import Game.Antisplice.Rooms
 import Game.Antisplice.Stats
 import Game.Antisplice.Stereos
@@ -79,4 +79,4 @@
 import Control.Monad.Error.Class
 
 -- | A dungeon constructor function
-type Constructor a = forall m.(Functor m,ExtendedPrinter m,MonadExpand m,ExpanderEnv m,MonadAtoms m,MonadClock m,MonadVocab m,MonadError SplErr m,MonadDungeon m) => m a
+type Constructor a = forall m.(Functor m,ChExtendedPrinter m,ChExpand m,ChExpanderEnv m,ChAtoms m,ChClock m,MonadVocab m,MonadError SplErr m,MonadDungeon m) => m a
diff --git a/src/Game/Antisplice/Action.hs b/src/Game/Antisplice/Action.hs
--- a/src/Game/Antisplice/Action.hs
+++ b/src/Game/Antisplice/Action.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RankNTypes, FlexibleContexts, LambdaCase, FlexibleInstances #-}
+{-# LANGUAGE RankNTypes, FlexibleContexts, LambdaCase, FlexibleInstances, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -31,10 +31,10 @@
 import Game.Antisplice.Rooms
 import Game.Antisplice.Errors
 import Game.Antisplice.Stats
-import Game.Antisplice.Utils.Counter
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.BST
+import Data.Chatty.Counter
+import Data.Chatty.None
+import Data.Chatty.AVL
+import Data.Chatty.BST
 
 -- | A typeclass for all action types carrying an execution condition.
 class IsAction a where
@@ -210,7 +210,7 @@
 dealDamageA m = Action (return Nothing) (dealDamage =<< m)
 
 -- | Use for actions that require a cooldown time.
-implyCooldownA :: MonadCounter m => Integer -> m Action
+implyCooldownA :: ChCounter m => Integer -> m Action
 implyCooldownA ms = do
   cid <- liftM CooldownId countOn
   return (Action
diff --git a/src/Game/Antisplice/Call.hs b/src/Game/Antisplice/Call.hs
--- a/src/Game/Antisplice/Call.hs
+++ b/src/Game/Antisplice/Call.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, RankNTypes, FlexibleContexts, LambdaCase, ScopedTypeVariables #-}
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, RankNTypes, FlexibleContexts, LambdaCase, ScopedTypeVariables, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -54,9 +54,9 @@
 import Game.Antisplice.Errors
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad.Vocab
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.AVL
+import Data.Chatty.BST
+import Data.Chatty.Hetero
 
 unint :: Monad m => String -> m (Either ReError a)
 unint = return . Left . Unint 0
diff --git a/src/Game/Antisplice/Errors.hs b/src/Game/Antisplice/Errors.hs
--- a/src/Game/Antisplice/Errors.hs
+++ b/src/Game/Antisplice/Errors.hs
@@ -22,7 +22,7 @@
 -- | Provides the error datatype for Antisplice
 module Game.Antisplice.Errors where
 
-import Game.Antisplice.Utils.Fail
+import Data.Chatty.Fail
 
 -- | Antisplice errors
 data SplErr = UnknownError
diff --git a/src/Game/Antisplice/Events.hs b/src/Game/Antisplice/Events.hs
--- a/src/Game/Antisplice/Events.hs
+++ b/src/Game/Antisplice/Events.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RankNTypes, FlexibleContexts #-}
+{-# LANGUAGE RankNTypes, FlexibleContexts, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
diff --git a/src/Game/Antisplice/Lang.hs b/src/Game/Antisplice/Lang.hs
--- a/src/Game/Antisplice/Lang.hs
+++ b/src/Game/Antisplice/Lang.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleContexts, RankNTypes, LambdaCase #-}
+{-# LANGUAGE FlexibleContexts, RankNTypes, LambdaCase, ConstraintKinds	 #-}
 
 {-
   This module is part of Antisplice.
@@ -32,13 +32,13 @@
 import Game.Antisplice.Monad
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad.Vocab
-import Game.Antisplice.Utils.Graph
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.TST
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.ListBuilder
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.Graph
+import Data.Chatty.AVL
+import Data.Chatty.BST
+import Data.Chatty.TST
+import Data.Chatty.None
+import Data.Chatty.ListBuilder
+import Data.Chatty.Hetero
 import Game.Antisplice.Rooms
 import Game.Antisplice.Stats
 import Game.Antisplice.Skills
diff --git a/src/Game/Antisplice/MaskedSkills.hs b/src/Game/Antisplice/MaskedSkills.hs
--- a/src/Game/Antisplice/MaskedSkills.hs
+++ b/src/Game/Antisplice/MaskedSkills.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ExistentialQuantification, RankNTypes, FlexibleContexts, ScopedTypeVariables #-}
+{-# LANGUAGE ExistentialQuantification, RankNTypes, FlexibleContexts, ScopedTypeVariables, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -27,8 +27,8 @@
 import Data.Monoid
 import Game.Antisplice.Call
 import Game.Antisplice.Monad.Dungeon
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.None
+import Data.Chatty.Hetero
 
 -- | A special consumer whose conditions and actions rely on evaluation result masks
 data MaskedConsumer r = MasCon [PredMaskCond r] [PostMaskHandler r]
diff --git a/src/Game/Antisplice/Monad.hs b/src/Game/Antisplice/Monad.hs
--- a/src/Game/Antisplice/Monad.hs
+++ b/src/Game/Antisplice/Monad.hs
@@ -25,14 +25,14 @@
 module Game.Antisplice.Monad where
 
 import Game.Antisplice.Templates
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Utils.Counter
+import Data.Chatty.AVL
+import Data.Chatty.None
+import Data.Chatty.Fail
+import Data.Chatty.Counter
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad.Vocab
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.BST
+import Data.Chatty.Atoms
+import Data.Chatty.BST
 import Game.Antisplice.Errors
 import Control.Monad
 import Control.Monad.Trans.Class
@@ -61,7 +61,7 @@
 liftM concat $ forM [''AnsiPrinterT,''HtmlPrinterT,''ExpanderT,''NullExpanderT,''RecorderT] $ \s ->
   mkInteractor s (mkChannelPrinter ''PlayerId) mkDungeon mkPlayer mkRoom (mkFail ''SplErr)
 
-instance ChannelPrinter PlayerId m => Broadcaster PlayerId (DungeonT m) where
+instance ChChannelPrinter PlayerId m => ChBroadcaster PlayerId (DungeonT m) where
   bprint c str = do
     s <- getDungeonState
     forM_ (anyBstInorder $ playersOf s) $ \p -> do
diff --git a/src/Game/Antisplice/Monad/Dungeon.hs b/src/Game/Antisplice/Monad/Dungeon.hs
--- a/src/Game/Antisplice/Monad/Dungeon.hs
+++ b/src/Game/Antisplice/Monad/Dungeon.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, RankNTypes, FlexibleContexts, TypeFamilies, DeriveDataTypeable #-}
+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, RankNTypes, FlexibleContexts, TypeFamilies, DeriveDataTypeable, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -86,16 +86,16 @@
 import Text.Chatty.Extended.Printer
 import Text.Chatty.Channel.Printer
 import Text.Chatty.Channel.Broadcast
-import Game.Antisplice.Utils.Graph
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.Atoms
+import Data.Chatty.Graph
+import Data.Chatty.BST
+import Data.Chatty.AVL
+import Data.Chatty.Atoms
 import Game.Antisplice.Errors
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Utils.Counter
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.Focus
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.Fail
+import Data.Chatty.Counter
+import Data.Chatty.None
+import Data.Chatty.Focus
+import Data.Chatty.Hetero
 import Game.Antisplice.Monad.Vocab
 import Control.Arrow
 import Control.Monad.Error
@@ -106,10 +106,14 @@
 import Data.Typeable
 import Debug.Trace
 
--- | Matches any 'MonadDungeon' context
-type DungeonM a = forall m.(MonadDungeon m,MonadError SplErr m,MonadVocab m) => m a
--- | Matches any 'MonadDungeon' context that also implements most of the Chatty classes and some of our utility classes.
-type ChattyDungeonM a = forall m.(Functor m,ExtendedPrinter m,MonadExpand m,ExpanderEnv m,MonadDungeon m,MonadError SplErr m,MonadAtoms m,MonadClock m,MonadVocab m,MonadRandom m,Broadcaster PlayerId m) => m a
+-- | Matches any 'SomeDungeon' context
+type DungeonM a = forall m.SomeDungeon m => m a
+-- | Wrap up 'MonadDungeon', 'MonadError' 'SplErr' and 'MonadVocab' to a single constraint.
+type SomeDungeon m = (MonadDungeon m,MonadError SplErr m,MonadVocab m)
+-- | Matches any 'SomeChattyDungeon' context
+type ChattyDungeonM a = forall m.SomeChattyDungeon m => m a
+-- | Wrap up 'SomeDungeon', most Chatty classes and some utility classes to a single sonstraint.
+type SomeChattyDungeon m = (Functor m,ChExtendedPrinter m,ChExpand m,ChExpanderEnv m,ChAtoms m,ChClock m,SomeDungeon m,ChRandom m,ChBroadcaster PlayerId m)
 -- | The common type of all event handlers.
 type Handler = ChattyDungeonM ()
 -- | A boxed 'Handler' to avoid ImpredicativeTypes
@@ -152,8 +156,6 @@
   tuplify = id
 
 instance Indexable EquipKey EquipKey EquipKey where
-  type ValueOf EquipKey = EquipKey
-  type IndexOf EquipKey = EquipKey
   indexOf = id
   valueOf = id
 
@@ -250,8 +252,6 @@
   tuplify = id
 
 instance Indexable Feature Feature Feature where
-  type IndexOf Feature = Feature
-  type ValueOf Feature = Feature
   indexOf = id
   valueOf = id
 
@@ -320,8 +320,6 @@
   tuplify = id
 
 instance Indexable ObjectState ObjectId ObjectState where
-  type IndexOf ObjectState = ObjectId
-  type ValueOf ObjectState = ObjectState
   indexOf = objectIdOf
   valueOf = id
 
@@ -419,20 +417,14 @@
   }
 
 instance Indexable PlayerState PlayerId PlayerState where
-  type IndexOf PlayerState = PlayerId
-  type ValueOf PlayerState = PlayerState
   indexOf = playerIdOf
   valueOf = id
 
 instance Indexable CooldownId CooldownId CooldownId where
-  type IndexOf CooldownId = CooldownId
-  type ValueOf CooldownId = CooldownId
   indexOf = id
   valueOf = id
 
 instance Indexable Currency CurrencyId Currency where
-  type IndexOf Currency = CurrencyId
-  type ValueOf Currency = Currency
   indexOf = currencyIdOf
   valueOf = id
 
diff --git a/src/Game/Antisplice/Monad/Vocab.hs b/src/Game/Antisplice/Monad/Vocab.hs
--- a/src/Game/Antisplice/Monad/Vocab.hs
+++ b/src/Game/Antisplice/Monad/Vocab.hs
@@ -29,8 +29,8 @@
 import Control.Monad
 import Control.Monad.IO.Class
 import Control.Monad.Trans.Class
-import Game.Antisplice.Utils.TST
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.TST
+import Data.Chatty.Hetero
 
 -- | Algebraic type for primitive and complex tokens.
 data Token = Unintellegible String
diff --git a/src/Game/Antisplice/Paths.hs b/src/Game/Antisplice/Paths.hs
--- a/src/Game/Antisplice/Paths.hs
+++ b/src/Game/Antisplice/Paths.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RankNTypes, FlexibleContexts #-}
+{-# LANGUAGE RankNTypes, FlexibleContexts, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -30,8 +30,8 @@
 import Game.Antisplice.Action
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Rooms
-import Game.Antisplice.Utils.Graph
-import Game.Antisplice.Utils.None
+import Data.Chatty.Graph
+import Data.Chatty.None
 
 -- | A one-way path from 'f' to 't'.
 unipath :: MonadDungeon m => NodeId -> NodeId -> Direction -> m ()
diff --git a/src/Game/Antisplice/Prototypes.hs b/src/Game/Antisplice/Prototypes.hs
--- a/src/Game/Antisplice/Prototypes.hs
+++ b/src/Game/Antisplice/Prototypes.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TupleSections, FlexibleContexts #-}
+{-# LANGUAGE TupleSections, FlexibleContexts, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -29,13 +29,13 @@
 import Text.Chatty.Extended.Printer
 import Control.Monad
 import Control.Monad.Error.Class
+import Data.Chatty.Atoms
+import Data.Chatty.Fail
+import Data.Chatty.AVL
+import Data.Chatty.Graph
 import Game.Antisplice.Monad
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad.Vocab
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.Graph
 import Game.Antisplice.Rooms
 import Game.Antisplice.Events
 import Game.Antisplice.Errors
@@ -45,7 +45,7 @@
 import Data.List
 
 -- | Construct a simple room from a title and a description.
-ctorRoom :: MonadAtoms m => String -> String -> RoomT m ()
+ctorRoom :: ChAtoms m => String -> String -> RoomT m ()
 ctorRoom t d = do
   setRoomTitle t
   addRoomDesc d
@@ -56,7 +56,7 @@
     sequence_ $ avlInorder $ flip fmap (roomObjectsOf rs) $ \os -> objectTriggerOnAnnounceOf os
 
 -- | Construct a sign from a text and some attributes.
-ctorSign :: (MonadAtoms m,MonadVocab m,MonadError SplErr m) => String -> [String] -> ObjectT m ()
+ctorSign :: (ChAtoms m,MonadVocab m,MonadError SplErr m) => String -> [String] -> ObjectT m ()
 ctorSign t as = do
   onRead $ enomaskLn (Vivid White) =<< expand =<< drunken t
   lookCountA <- newAtom
@@ -139,5 +139,5 @@
   setObjectIsAcquirable True
 
 -- | Add a room descriptor object to the current room
-addRoomDesc :: MonadAtoms m => String -> RoomT m ObjectId
+addRoomDesc :: ChAtoms m => String -> RoomT m ObjectId
 addRoomDesc = addRoomObject . addDescSeg
diff --git a/src/Game/Antisplice/Rooms.hs b/src/Game/Antisplice/Rooms.hs
--- a/src/Game/Antisplice/Rooms.hs
+++ b/src/Game/Antisplice/Rooms.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RankNTypes, FlexibleContexts #-}
+{-# LANGUAGE RankNTypes, FlexibleContexts, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -110,12 +110,12 @@
 import System.Chatty.Misc
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad
-import Game.Antisplice.Utils.Graph
-import Game.Antisplice.Utils.Counter
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.None
+import Data.Chatty.Graph
+import Data.Chatty.Counter
+import Data.Chatty.BST
+import Data.Chatty.AVL
+import Data.Chatty.Atoms
+import Data.Chatty.None
 import Game.Antisplice.Errors
 import Control.Arrow
 import Control.Monad
@@ -135,7 +135,7 @@
   putRoomState (f s)
 
 -- | Get the current room's description
-getRoomDesc :: (MonadRoom m,MonadAtoms m) => m String
+getRoomDesc :: (MonadRoom m,ChAtoms m) => m String
 getRoomDesc = do
   s <- getRoomState
   --return (fromText $ roomDescOf s)
@@ -244,7 +244,7 @@
                 Nothing -> throwError CantWalkThereError
 
 -- | Add a new object to the current room. It is contructed using the object monad.
-addRoomObject :: (MonadCounter m,MonadRoom m) => ObjectT m a -> m ObjectId
+addRoomObject :: (ChCounter m,MonadRoom m) => ObjectT m a -> m ObjectId
 addRoomObject m = do
   i <- liftM ObjectId countOn
   k <- liftM KindId countOn
@@ -347,7 +347,7 @@
 addObjectAttr t = modifyObjectState $ \s -> s{objectAttributesOf=t:objectAttributesOf s}
 
 -- | Create a new player using the player monad
-subscribePlayer :: (MonadDungeon m,MonadCounter m) => PlayerT m a -> m ()
+subscribePlayer :: (MonadDungeon m,ChCounter m) => PlayerT m a -> m ()
 subscribePlayer m = do
   s <- getDungeonState
   i <- liftM PlayerId countOn
@@ -374,7 +374,7 @@
 setObjectKind k = modifyObjectState $ \o -> o{objectKindOf=k}
 
 -- | Register an object kind.
-registerKind :: MonadCounter m => m KindId
+registerKind :: ChCounter m => m KindId
 registerKind = liftM KindId countOn
 
 -- | Check if the current object is acquirable.
@@ -388,7 +388,7 @@
         a False = avlRemove Acquirable
 
 -- | Schedule an event for a given time offset (in milliseconds).
-schedule :: (MonadDungeon m,MonadClock m) => Integer -> Handler -> m ()
+schedule :: (MonadDungeon m,ChClock m) => Integer -> Handler -> m ()
 schedule ms t = do
   now <- mgetstamp
   let t' = now + (realToFrac ms / 1000)
@@ -491,14 +491,14 @@
 addFeature f = modifyObjectState $ \s -> s{objectFeaturesOf=avlInsert f $ objectFeaturesOf s}
 
 -- | Add a room description segment to the current object
-addDescSeg :: (MonadObject m,MonadAtoms m) => String -> m ()
+addDescSeg :: (MonadObject m,ChAtoms m) => String -> m ()
 addDescSeg s = do
   a <- newAtom
   putAtom a s
   addFeature $ Described a
 
 -- | Register an object form and return its atom
-registerForm :: (MonadAtoms m) => ObjectT m () -> m (Atom ObjectState)
+registerForm :: (ChAtoms m) => ObjectT m () -> m (Atom ObjectState)
 registerForm m = do
   a <- newAtom
   k <- liftM KindId countOn
@@ -507,7 +507,7 @@
   return a
 
 -- | Instanciate a registered form
-instanciateForm :: (MonadAtoms m,MonadRoom m,MonadCounter m) => Atom ObjectState -> m ObjectId
+instanciateForm :: (ChAtoms m,MonadRoom m) => Atom ObjectState -> m ObjectId
 instanciateForm a = do
   i <- countOn
   o <- getAtom a
@@ -566,7 +566,7 @@
   in p{playerCurrenciesOf=avlInsert (c,f c1) $ playerCurrenciesOf p}
 
 -- | Register a currency
-registerCurrency :: (MonadCounter m,MonadDungeon m) => String -> String -> m CurrencyId
+registerCurrency :: (ChCounter m,MonadDungeon m) => String -> String -> m CurrencyId
 registerCurrency n d = do
   s <- getDungeonState
   i <- liftM CurrencyId countOn
@@ -634,10 +634,10 @@
   o <- liftM playerOpponentOf getPlayerState
   damage (TargetObject o) r
   
-instance (Functor m,MonadExpand m) => MonadExpand (DungeonT m) where
+instance (Functor m,ChExpand m) => ChExpand (DungeonT m) where
   expand = lift . expand <=< liftM (replay.snd) . runRecorderT . expandDun
 
-expandDun :: (MonadPrinter m,MonadDungeon m) => String -> m ()
+expandDun :: (ChPrinter m,MonadDungeon m) => String -> m ()
 expandDun [] = return ()
 expandDun ('\\':'#':ss) = do
   mprint "#"
@@ -675,7 +675,7 @@
       strfun (Just "capital") (s:ss) = toUpper s : ss
       strfun Nothing s = s
       strfun _ _ = ""
-      replace :: (MonadPrinter m,MonadDungeon m) => String -> Maybe Int -> Maybe Int -> Maybe String -> m ()
+      replace :: (ChPrinter m,MonadDungeon m) => String -> Maybe Int -> Maybe Int -> Maybe String -> m ()
       replace "health" d m f = liftM (prnum d m . numfun f . joinMaybe . avlLookup Health . playerCurrenciesOf) getPlayerState >>= mprint
       replace "ohealth" d m f = do
         i <- liftM playerOpponentOf getPlayerState
@@ -711,7 +711,7 @@
   expandDun ss
 
 -- | Consider the player's alcohol rate and mask the string with random underscores.
-drunken :: (MonadRandom m,MonadPlayer m) => String -> m String
+drunken :: (ChRandom m,MonadPlayer m) => String -> m String
 drunken [] = return []
 drunken ('}':cs) = do
   cx <- drunken cs
@@ -730,7 +730,7 @@
   return $ if r < p then '_' : cx else c : cx
 
 -- | Consume alcohol.
-consumeAlcohol :: (MonadPrinter m,MonadRandom m,MonadPlayer m,MonadDungeon m,MonadClock m) => Int -> m ()
+consumeAlcohol :: (ChPrinter m,ChRandom m,MonadPlayer m,MonadDungeon m,ChClock m) => Int -> m ()
 consumeAlcohol r = do
   modifyPlayerState $ \p -> p{playerAlcoholOf=r+playerAlcoholOf p}
   p <- getPlayerState
diff --git a/src/Game/Antisplice/SingleUser.hs b/src/Game/Antisplice/SingleUser.hs
--- a/src/Game/Antisplice/SingleUser.hs
+++ b/src/Game/Antisplice/SingleUser.hs
@@ -32,10 +32,10 @@
 import Text.Chatty.Channel.Printer
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad.Vocab
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Utils.Counter
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.None
+import Data.Chatty.Fail
+import Data.Chatty.Counter
+import Data.Chatty.Atoms
+import Data.Chatty.None
 import Game.Antisplice.Errors
 import Game.Antisplice.Monad
 import Game.Antisplice.Rooms
diff --git a/src/Game/Antisplice/Skills.hs b/src/Game/Antisplice/Skills.hs
--- a/src/Game/Antisplice/Skills.hs
+++ b/src/Game/Antisplice/Skills.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RankNTypes, FlexibleContexts, FlexibleInstances, RecordWildCards, LambdaCase #-}
+{-# LANGUAGE RankNTypes, FlexibleContexts, FlexibleInstances, RecordWildCards, LambdaCase, ConstraintKinds #-}
 
 {-
   This module is part of Antisplice.
@@ -63,10 +63,10 @@
 import Game.Antisplice.Monad.Vocab
 import Game.Antisplice.Rooms
 import Game.Antisplice.Stats
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.Counter
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.None
+import Data.Chatty.Counter
+import Data.Chatty.Atoms
+import Data.Chatty.Hetero
 import Game.Antisplice.MaskedSkills
 
 -- | A wrapper type for skill execution preconditions.
diff --git a/src/Game/Antisplice/Stats.hs b/src/Game/Antisplice/Stats.hs
--- a/src/Game/Antisplice/Stats.hs
+++ b/src/Game/Antisplice/Stats.hs
@@ -29,9 +29,9 @@
 import Data.Monoid
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Rooms
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.None
+import Data.Chatty.AVL
+import Data.Chatty.Atoms
+import Data.Chatty.None
 import Text.Chatty.Printer
 
 -- | Typeclass for every pure data that saves stats
@@ -59,7 +59,7 @@
   getStatM k = (return . getStat k) =<< getPlayerState
 
 -- | Calculates the stats of the objects the player carries
-calcStat :: (MonadPlayer m,MonadAtoms m,MonadRoom m) => StatKey -> m Int
+calcStat :: (MonadPlayer m,ChAtoms m,MonadRoom m) => StatKey -> m Int
 calcStat k = do
   p <- getPlayerState
   let ss k = getStat k p
@@ -67,7 +67,7 @@
   return $ stereoCalcStatBonus stes ss k + ss k
 
 -- | Calculates the total stereotype the player carries
-totalStereo :: (MonadAtoms m,MonadPlayer m,MonadRoom m) => m PlayerStereo
+totalStereo :: (ChAtoms m,MonadPlayer m,MonadRoom m) => m PlayerStereo
 totalStereo = do
   p <- getPlayerState
   r <- getRoomState
diff --git a/src/Game/Antisplice/Stereos.hs b/src/Game/Antisplice/Stereos.hs
--- a/src/Game/Antisplice/Stereos.hs
+++ b/src/Game/Antisplice/Stereos.hs
@@ -62,14 +62,14 @@
 import Game.Antisplice.Skills
 import Game.Antisplice.Stats
 import Game.Antisplice.Templates
-import Game.Antisplice.Utils.Atoms
-import Game.Antisplice.Utils.None
-import Game.Antisplice.Utils.Hetero
+import Data.Chatty.Atoms
+import Data.Chatty.None
+import Data.Chatty.Hetero
 import Text.Chatty.Interactor.Templates
 import System.IO
 
 -- | Register the given stereotype and return its atom.
-registerStereo :: MonadAtoms m => PlayerStereo -> m (Atom PlayerStereo)
+registerStereo :: ChAtoms m => PlayerStereo -> m (Atom PlayerStereo)
 registerStereo s = do
   a <- newAtom
   putAtom a s
@@ -155,7 +155,7 @@
   mergeRecipe rp
 
 -- | Process the builder chain and register the resulting stereotype
-registerStereoM :: MonadAtoms m => StereoBuilderT m () -> m (Atom PlayerStereo)
+registerStereoM :: ChAtoms m => StereoBuilderT m () -> m (Atom PlayerStereo)
 registerStereoM m = do
   (_,s) <- runStereoBuilderT m none
   registerStereo s
diff --git a/src/Game/Antisplice/Templates.hs b/src/Game/Antisplice/Templates.hs
--- a/src/Game/Antisplice/Templates.hs
+++ b/src/Game/Antisplice/Templates.hs
@@ -28,12 +28,11 @@
 import Text.Chatty.Templates
 import Text.Chatty.Channel.Printer
 import Text.Chatty.Channel.Broadcast
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Utils.Run
-import Game.Antisplice.Utils.Counter
+import Data.Chatty.Fail
+import Data.Chatty.Counter
 import Game.Antisplice.Monad.Dungeon
 import Game.Antisplice.Monad.Vocab
-import Game.Antisplice.Utils.Atoms
+import Data.Chatty.Atoms
 import Control.Monad.Error.Class
 import Control.Monad.Trans.Class
 import Control.Monad.State.Class
@@ -63,14 +62,14 @@
     instance MonadDungeon m => MonadDungeon ($sx m) where
       getDungeonState = lift getDungeonState
       putDungeonState = lift . putDungeonState
-    instance (MonadDungeon m,ChannelPrinter PlayerId m) => Broadcaster PlayerId ($sx m) where
+    instance (MonadDungeon m,ChChannelPrinter PlayerId m) => ChBroadcaster PlayerId ($sx m) where
       bprint c = lowerDungeon . bprint (lift . c)
   |]
   where sx = strToType s
 
 -- | Automatically derive an instance for 'MonadCounter'
 mkCounter s = [d|
-    instance MonadCounter m => MonadCounter ($sx m) where
+    instance ChCounter m => ChCounter ($sx m) where
       countOn = lift countOn
   |]
   where sx = strToType s
@@ -109,7 +108,7 @@
 
 -- | Automatically derive an instance for 'MonadAtoms'
 mkAtoms s = [d|
-    instance MonadAtoms m => MonadAtoms ($sx m) where
+    instance ChAtoms m => ChAtoms ($sx m) where
       newAtom = lift newAtom
       putAtom k = lift . putAtom k
       getAtom = lift . getAtom
diff --git a/src/Game/Antisplice/Terminal/Repl.hs b/src/Game/Antisplice/Terminal/Repl.hs
--- a/src/Game/Antisplice/Terminal/Repl.hs
+++ b/src/Game/Antisplice/Terminal/Repl.hs
@@ -38,11 +38,11 @@
 import Game.Antisplice.Monad
 import Game.Antisplice.Errors
 import Game.Antisplice.Lang
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Utils.Counter
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.Atoms
+import Data.Chatty.Fail
+import Data.Chatty.Counter
+import Data.Chatty.AVL
+import Data.Chatty.BST
+import Data.Chatty.Atoms
 import Control.Monad
 import Control.Concurrent
 import Control.Concurrent.MVar
@@ -53,7 +53,7 @@
 import System.Console.Haskeline.History
 
 -- | Read Eval Print Loop for Antisplice.
-repl :: (ExtendedPrinter m,MonadScanner m,MonadError SplErr m,MonadIO m,MonadExpand m,ExpanderEnv m,MonadDungeon m,MonadAtoms m,MonadRoom m,MonadClock m,MonadVocab m,HistoryEnv m,MonadRandom m,Broadcaster PlayerId m) => m ()
+repl :: (ChExtendedPrinter m,ChScanner m,MonadError SplErr m,MonadIO m,ChExpand m,ChExpanderEnv m,MonadDungeon m,ChAtoms m,MonadRoom m,ChClock m,MonadVocab m,ChHistoryEnv m,ChRandom m,ChBroadcaster PlayerId m) => m ()
 repl = do
   mv <- liftIO (newEmptyMVar :: IO (MVar (Maybe String)))
   cont <- liftIO (newEmptyMVar :: IO (MVar String))
diff --git a/src/Game/Antisplice/Utils/AVL.hs b/src/Game/Antisplice/Utils/AVL.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/AVL.hs
+++ /dev/null
@@ -1,170 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides an AVL tree.
-module Game.Antisplice.Utils.AVL (avlMax,avlMin,avlLookup,avlHeight,avlSize,avlInsert,avlRemove,AVL (EmptyAVL,AVL),avlRoot,avlPreorder,avlPostorder,avlInorder) where
-
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.None
-
-instance Indexable i o v => AnyBST AVL i o v where
-  anyBstMax = avlMax
-  anyBstMin = avlMin
-  anyBstLookup = avlLookup
-  anyBstEmpty = EmptyAVL
-  anyBstInsert = avlInsert
-  anyBstRemove = avlRemove
-  anyBstHead = avlHead
-  anyBstInorder = avlInorder
-
-instance None (AVL a) where
-  none = EmptyAVL
-
--- | An AVL tree.
-data AVL a = EmptyAVL | AVL a Int Int !(AVL a) !(AVL a)
-
--- | Get the greatest element.
-avlMax :: AVL i -> Maybe i
-avlMax EmptyAVL = Nothing
-avlMax (AVL a _ _ _ EmptyAVL) = Just a
-avlMax (AVL _ _ _ _ r) = avlMax r
-
--- | Get the least element.
-avlMin :: AVL i -> Maybe i
-avlMin EmptyAVL = Nothing
-avlMin (AVL a _ _ EmptyAVL _) = Just a
-avlMin (AVL _ _ _ l _) = avlMin l
-
--- | Lookup a given key.
-avlLookup :: Indexable i o v => o -> AVL i -> Maybe v
-avlLookup _ EmptyAVL = Nothing
-avlLookup o (AVL a _ _ l r)
-  | o == indexOf a = Just $ valueOf a
-  | o < indexOf a = avlLookup o l
-  | o > indexOf a = avlLookup o r
-
--- | Get the height of the tree.
-avlHeight :: AVL i -> Int
-avlHeight EmptyAVL = 0
-avlHeight (AVL _ _ h _ _) = h
-
--- | Get the size of the tree.
-avlSize :: AVL i -> Int
-avlSize EmptyAVL = 0
-avlSize (AVL _ s _ _ _) = s
-
-avlBalance :: AVL i -> AVL i
-avlBalance EmptyAVL = EmptyAVL
-avlBalance t@(AVL a _ _ l r)
-  | abs (avlHeight l - avlHeight r) < 2 = t
-  | avlHeight l < avlHeight r = case r of
-    AVL a1 _ _ l1 r1 ->
-      let child = AVL a (findSize l l1) (findHeight l l1) l l1
-      in AVL a1 (findSize child r1) (findHeight child r1) child r1
-  | otherwise = case l of
-    AVL a1 _ _ l1 r1 ->
-      let child = AVL a (findSize r1 r) (findHeight r1 r) r1 r
-      in AVL a1 (findSize l1 child) (findHeight l1 child) l1 child
-
-findSize :: AVL i -> AVL i -> Int
-findSize a b = 1 + avlSize a + avlSize b
-
-findHeight :: AVL i -> AVL i -> Int
-findHeight a b = 1 + max (avlHeight a) (avlHeight b)
-
--- | Insert into the tree.
-avlInsert :: Indexable i o v => i -> AVL i -> AVL i
-avlInsert a EmptyAVL = AVL a 1 1 EmptyAVL EmptyAVL
-avlInsert a (AVL a1 s h l r)
-  | indexOf a == indexOf a1 = AVL a s h l r
-  | indexOf a < indexOf a1 =
-    let l' = avlInsert a l
-    in avlBalance $ AVL a1 (s+1) (findHeight l' r) l' r
-  | otherwise =
-    let r' = avlInsert a r
-    in avlBalance $ AVL a1 (s+1) (findHeight l r') l r' 
-
--- | Remove from the tree.
-avlRemove :: Indexable i o v => o -> AVL i -> AVL i
-avlRemove _ EmptyAVL = EmptyAVL
-avlRemove o t@(AVL a _ _ EmptyAVL EmptyAVL)
-  | indexOf a == o = EmptyAVL
-  | otherwise = t
-avlRemove o t@(AVL a _ _ l r)
-  | indexOf a == o =
-    case t of
-      AVL _ _ _ EmptyAVL _ -> case getLeft r of
-        (Just a',r') -> avlBalance $ AVL a' (findSize EmptyAVL r') (findHeight EmptyAVL r') EmptyAVL r'
-      _ -> case getRight l of
-        (Just a',l') -> avlBalance $ AVL a' (findSize l' r) (findHeight l' r) l' r
-  | o < indexOf a =
-    let l' = avlRemove o l
-    in avlBalance $ AVL a (findSize l' r) (findHeight l' r) l' r
-  | otherwise =
-    let r' = avlRemove o r
-    in avlBalance $ AVL a (findSize l r') (findHeight l r') l r'
-
-getLeft :: AVL i -> (Maybe i,AVL i)
-getLeft EmptyAVL = (Nothing,EmptyAVL)
-getLeft (AVL a _ _ EmptyAVL EmptyAVL) = (Just a,EmptyAVL)
-getLeft (AVL a _ _ EmptyAVL r) = (Just a,r)
-getLeft (AVL a _ _ l r) =
-  case getLeft l of
-    (p, t2) -> (p, AVL a (findSize r t2) (findHeight r t2) t2 r)
-
-getRight :: AVL i -> (Maybe i,AVL i)
-getRight EmptyAVL = (Nothing,EmptyAVL)
-getRight (AVL a _ _ EmptyAVL EmptyAVL) = (Just a,EmptyAVL)
-getRight (AVL a _ _ l EmptyAVL) = (Just a,l)
-getRight (AVL a _ _ l r) =
-  case getRight r of
-    (p, t2) -> (p, AVL a (findSize l t2) (findHeight l t2) l t2)
-
-instance Functor AVL where
-  fmap _ EmptyAVL = EmptyAVL
-  fmap f (AVL a s h l r) = AVL (f a) s h (fmap f l) (fmap f r)
-
--- | Get the root of the tree.
-avlRoot :: AVL i -> i
-avlRoot EmptyAVL = error "Trying to get the root of an empty AVL tree."
-avlRoot (AVL a _ _ _ _) = a
-
--- | Get the root of the tree (safely)
-avlHead :: AVL i -> Maybe i
-avlHead EmptyAVL = Nothing
-avlHead t = Just $ avlRoot t
-
--- | Traverse the tree, order (head, left, right)
-avlPreorder :: AVL i -> [i]
-avlPreorder EmptyAVL = []
-avlPreorder (AVL a _ _ l r) = a : avlPreorder l ++ avlPreorder r
-
--- | Traverse the tree, order (left, right, head)
-avlPostorder :: AVL i -> [i]
-avlPostorder EmptyAVL = []
-avlPostorder (AVL a _ _ l r) = avlPostorder l ++ avlPostorder r ++ [a]
-
--- | Traverse the tree, order (left, head, right)
-avlInorder :: AVL i -> [i]
-avlInorder EmptyAVL = []
-avlInorder (AVL a _ _ l r) = avlInorder l ++ [a] ++ avlInorder r
diff --git a/src/Game/Antisplice/Utils/Atoms.hs b/src/Game/Antisplice/Utils/Atoms.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/Atoms.hs
+++ /dev/null
@@ -1,104 +0,0 @@
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a variable-storing monad and functions for access (they almost form an arrow)
-module Game.Antisplice.Utils.Atoms where
-
-import Control.Arrow
-import qualified Control.Category as C
-import Control.Monad
-import Control.Monad.Trans.Class
-import Control.Monad.IO.Class
-import Data.Dynamic
-import Data.Typeable
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.Counter
-
--- | Phantom type for atom IDs
-newtype Atom a = Atom Int deriving (Ord,Eq)
-
--- | The storage monad
-newtype AtomStoreT m a = AtomStore { runAtomStoreT :: AVL (Int,Dynamic) -> m (a,AVL (Int,Dynamic)) }
-
-instance Functor m => Functor (AtomStoreT m) where
-  fmap f a = AtomStore $ \s -> fmap (first f) $ runAtomStoreT a s
-
-instance Monad m => Monad (AtomStoreT m) where
-  return a = AtomStore $ \s -> return (a,s)
-  m >>= f = AtomStore $ \s -> do (a,s') <- runAtomStoreT m s; runAtomStoreT (f a) s'
-
-instance MonadTrans AtomStoreT where
-  lift m = AtomStore $ \s -> do a <- m; return (a,s)
-
-instance MonadIO m => MonadIO (AtomStoreT m) where
-  liftIO = lift . liftIO
-
-instance MonadCounter m => MonadCounter (AtomStoreT m) where
-  countOn = lift countOn
-
--- | Typeclass for all atom-storing monads.
-class MonadCounter m => MonadAtoms m where
-  -- | Reserve a new atom.
-  newAtom :: Typeable v => m (Atom v)
-  -- | Save a value for the given atom.
-  putAtom :: Typeable v => Atom v -> v -> m ()
-  -- | Get the value from a given atom.
-  getAtom :: Typeable v => Atom v -> m v
-  -- | Dispose the given atom.
-  dispAtom :: Atom v -> m ()
-  -- | Clone the given atom.
-  cloneAtom :: Typeable v => Atom v -> m (Atom v)
-  cloneAtom a = do
-    b <- newAtom
-    v <- getAtom a
-    putAtom b v
-    return b
-
-instance (Functor m,MonadCounter m) => MonadAtoms (AtomStoreT m) where
-  newAtom = fmap Atom $ lift countOn
-  putAtom (Atom a) v = AtomStore $ \s -> return ((),avlInsert (a,toDyn v) s)
-  getAtom (Atom a) = AtomStore $ \s -> let Just v = avlLookup a s in return (fromDyn v undefined,s)
-  dispAtom (Atom a) = AtomStore $ \s -> return ((),avlRemove a s)
-
--- | Atomar operation (almost arrow)
-newtype (Typeable a,Typeable b) => Atomar m a b = Atomar { runAtomar :: Atom a -> m (Atom b) }
-
-{-instance MonadAtoms m => C.Category (Atomar m) where
-  id = Atomar return
-  a . b = Atomar (runAtomar a <=< runAtomar b)
-
-instance MonadAtoms m => Arrow (Atomar m) where
-  arr = Atomar . mapAtom
-  first f = Atomar $ \a -> do
-    b <- cloneAtom a
-    b' <- mapAtom fst b
-    c <- runAtomar f b'
-    v <- getAtom c
-    mapAtom (first $ const v) a
-    dispAtom c-}
-
--- | Run a pure function on atoms.
-mapAtom :: (Typeable a, Typeable b, MonadAtoms m) => (a -> b) -> Atom a -> m (Atom b)
-mapAtom f (Atom a) = do
-  v <- getAtom (Atom a)
-  putAtom (Atom a) $ f v
-  return (Atom a)
-
diff --git a/src/Game/Antisplice/Utils/BST.hs b/src/Game/Antisplice/Utils/BST.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/BST.hs
+++ /dev/null
@@ -1,155 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies, TypeFamilies #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a typeclass for all binary search trees and an unbalanced implementation
-module Game.Antisplice.Utils.BST where
-
-import Game.Antisplice.Utils.None
-
--- | Only instances of Indexable may be saved in a BST
-class Ord o => Indexable i o v | i -> o, i -> v where
-  type IndexOf i
-  type ValueOf i
-  -- | Extract the index
-  indexOf :: i -> o
-  -- | Extract the value
-  valueOf :: i -> v
-
-instance Indexable Int Int Int where
-  type IndexOf Int = Int
-  type ValueOf Int = Int
-  indexOf = id
-  valueOf = id
-
-instance Ord o => Indexable (o,a) o a where
-  type IndexOf (o,a) = o
-  type ValueOf (o,a) = a
-  indexOf = fst
-  valueOf = snd
-
-instance Ord o => Indexable (o,a,b) o (a,b) where
-  type IndexOf (o,a,b) = o
-  type ValueOf (o,a,b) = (a,b)
-  indexOf (o,_,_) = o
-  valueOf (_,a,b) = (a,b)
-
-instance Ord o => Indexable (o,a,b,c) o (a,b,c) where
-  type IndexOf (o,a,b,c) = o
-  type ValueOf (o,a,b,c) = (a,b,c)
-  indexOf (o,_,_,_) = o
-  valueOf (_,a,b,c) = (a,b,c)
-
-instance Ord o => Indexable (o,a,b,c,d) o (a,b,c,d) where
-  type IndexOf (o,a,b,c,d) = o
-  type ValueOf (o,a,b,c,d) = (a,b,c,d)
-  indexOf (o,_,_,_,_) = o
-  valueOf (_,a,b,c,d) = (a,b,c,d)
-
-instance Ord o => Indexable (o,a,b,c,d,e) o (a,b,c,d,e) where
-  type IndexOf (o,a,b,c,d,e) = o
-  type ValueOf (o,a,b,c,d,e) = (a,b,c,d,e)
-  indexOf (o,a,b,c,d,e) = o
-  valueOf (o,a,b,c,d,e) = (a,b,c,d,e)
-
--- | Typeclass for all BSTs that store the given Indexable
-class Indexable i o v => AnyBST t i o v where
-  -- | Insert into the tree
-  anyBstInsert :: i -> t i -> t i
-  -- | Remove from the tree
-  anyBstRemove :: o -> t i -> t i
-  -- | Get the greatest element
-  anyBstMax :: t i -> Maybe i
-  -- | Get the least element
-  anyBstMin :: t i -> Maybe i
-  -- | Lookup a given key
-  anyBstLookup :: o -> t i -> Maybe v
-  -- | An empty tree
-  anyBstEmpty :: t i
-  -- | The root of the tree
-  anyBstHead :: t i -> Maybe i
-  -- | Traverse the tree in order
-  anyBstInorder :: t i -> [i]
-
-instance Indexable i o v => AnyBST BST i o v where
-  anyBstInsert = bstInsert
-  anyBstRemove = bstRemove
-  anyBstMax = bstMax
-  anyBstMin =  bstMin
-  anyBstLookup = bstLookup
-  anyBstEmpty = EmptyBST
-  anyBstHead = bstHead
-  anyBstInorder = bstInorder
-
-instance None (BST a) where
-  none = EmptyBST
-
--- | An unbalanced binary search tree
-data BST a = EmptyBST | BST a !(BST a) !(BST a)
-
--- | Insert into the BST
-bstInsert :: Indexable i o v => i -> BST i -> BST i
-bstInsert i EmptyBST = BST i EmptyBST EmptyBST
-bstInsert i (BST a l r)
-  | indexOf i < indexOf a = BST a (bstInsert i l) r
-  | indexOf i > indexOf a = BST a l (bstInsert i r)
-  | otherwise = BST i l r
-
--- | Remove from the BST
-bstRemove :: Indexable i o v => o -> BST i -> BST i
-bstRemove o EmptyBST = EmptyBST
-bstRemove o (BST a EmptyBST r) | indexOf a == o = r
-bstRemove o (BST a l EmptyBST) | indexOf a == o = l
-bstRemove o (BST a l r)
-  | indexOf a < o = BST a (bstRemove o l) r
-  | indexOf a > o = BST a l (bstRemove o r)
-  | otherwise = let (Just m) = bstMax l in BST m (bstRemove (indexOf m) l) r
-
--- | Get the greatest element
-bstMax :: BST i -> Maybe i
-bstMax EmptyBST = Nothing
-bstMax (BST a _ EmptyBST) = Just a
-bstMax (BST _ _ r) = bstMax r
-
--- | Get the least element
-bstMin :: BST i -> Maybe i
-bstMin EmptyBST = Nothing
-bstMin (BST a EmptyBST _) = Just a
-bstMin (BST _ l _) = bstMin l
-
--- | Lookup a given key
-bstLookup :: Indexable i o v => o -> BST i -> Maybe v
-bstLookup _ EmptyBST = Nothing
-bstLookup o (BST a l r)
-  | o == indexOf a = Just $ valueOf a
-  | o < indexOf a = bstLookup o l
-  | o > indexOf a = bstLookup o r
-
--- | Return the tree's root
-bstHead :: Indexable i o v => BST i -> Maybe i
-bstHead EmptyBST = Nothing
-bstHead (BST a _ _) = Just a
-
--- | Traverse the tree in order
-bstInorder :: Indexable i o v => BST i -> [i]
-bstInorder EmptyBST = []
-bstInorder (BST a l r) = bstInorder l ++ [a] ++ bstInorder r
diff --git a/src/Game/Antisplice/Utils/Counter.hs b/src/Game/Antisplice/Utils/Counter.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/Counter.hs
+++ /dev/null
@@ -1,52 +0,0 @@
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a counter monad.
-module Game.Antisplice.Utils.Counter where
-
-import Control.Arrow
-import Control.Monad
-import Control.Monad.Trans.Class
-
--- | A counter monad.
-newtype CounterT m a = Counter { runCounterT :: Int -> m (a,Int) }
-
-instance Functor m => Functor (CounterT m) where
-  fmap f a = Counter $ \s -> fmap (first f) $ runCounterT a s
-
-instance Monad m => Monad (CounterT m) where
-  return a = Counter $ \s -> return (a,s)
-  m >>= f = Counter $ \s -> do (a,s') <- runCounterT m s; runCounterT (f a) s'
-
-instance MonadTrans CounterT where
-  lift m = Counter $ \s -> do a <- m; return (a,s)
-
--- | Typeclass for all counter monads.
-class Monad m => MonadCounter m where
-  -- | Tell the current number and increment it
-  countOn :: m Int
-
-instance Monad m => MonadCounter (CounterT m) where
-  countOn = Counter $ \s -> return (s,s+1)
-
--- | Run the given function inside a counter
-withCounter :: (Monad m,Functor m) => CounterT m a -> m a
-withCounter m = fmap fst $ runCounterT m 0
diff --git a/src/Game/Antisplice/Utils/Fail.hs b/src/Game/Antisplice/Utils/Fail.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/Fail.hs
+++ /dev/null
@@ -1,62 +0,0 @@
-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a monad for error handling. Okay, I confess it's equal to ErrorT...
-module Game.Antisplice.Utils.Fail where
-
-import Control.Monad
-import Control.Monad.Identity
-import Control.Monad.Error.Class
-import Control.Monad.Trans.Class
-
--- | The error handling monad.
-newtype FailT e m a = Fail { runFailT :: m (Either e a) }
-type Fail e = FailT e Identity
-
-instance Monad m => Functor (FailT e m) where
-  fmap f a = Fail $ do
-     v <- runFailT a
-     case v of
-       Left e -> return $ Left e
-       Right x -> return $ Right (f x)
-
-instance Monad m => Monad (FailT e m) where
-  return a = Fail $ return $ Right a
-  m >>= f = Fail $ do
-    v <- runFailT m
-    case v of
-      Left e -> return $ Left e
-      Right x -> runFailT $ f x
-
-instance MonadTrans (FailT e) where
-  lift m = Fail $ do
-    a <- m
-    return $ Right a
-
-instance Monad m => MonadError e (FailT e m) where
-  throwError e = Fail $ return $ Left e
-  catchError m h = Fail $ do
-    v <- runFailT m
-    case v of
-      Left e -> runFailT $ h e
-      Right x -> return v
diff --git a/src/Game/Antisplice/Utils/Focus.hs b/src/Game/Antisplice/Utils/Focus.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/Focus.hs
+++ /dev/null
@@ -1,62 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies, TypeFamilies #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides an unbalanced BST with a focus on the root.
-module Game.Antisplice.Utils.Focus (Focus, focusSelect) where
-
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.None
-
--- | An unbalanced BST with a focus on the root.
-newtype Focus a = Focus { runFocus :: BST a }
-
-instance None (Focus a) where
-  none = Focus none
-
-instance Indexable i o v => AnyBST Focus i o v where
-  anyBstInsert i t = Focus $ bstInsert i $ runFocus t
-  anyBstRemove o t = Focus $ bstRemove o $ runFocus t
-  anyBstMax t = bstMax $ runFocus t
-  anyBstMin t = bstMin $ runFocus t
-  anyBstLookup o t = bstLookup o $ runFocus t
-  anyBstHead t = bstHead $ runFocus t
-  anyBstEmpty = Focus none
-  anyBstInorder t = bstInorder $ runFocus t
-
-focusSelect' :: Indexable i o v => o -> BST i -> Maybe (BST i)
-focusSelect' _ EmptyBST = Nothing
-focusSelect' o t@(BST a l r)
-  | o == indexOf a = Just t
-  | o < indexOf a = case focusSelect' o l of
-      Just (BST a' l' r') -> Just $ BST a' l' (BST a r' r)
-      Nothing -> Nothing
-  | otherwise = case focusSelect' o r of
-      Nothing -> Nothing
-      Just (BST a' l' r') -> Just $ BST a' (BST a l l') r'
-
-focusInsert' :: Indexable i o v => i -> BST i -> BST i
-focusInsert' i = unjust . focusSelect' (indexOf i) . bstInsert i
-  where unjust (Just j) = j
-
--- | Rotate the tree such that the given element becomes the root node.
-focusSelect o t = fmap Focus $ focusSelect' o $ runFocus t
diff --git a/src/Game/Antisplice/Utils/Graph.hs b/src/Game/Antisplice/Utils/Graph.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/Graph.hs
+++ /dev/null
@@ -1,152 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a general graph.
-module Game.Antisplice.Utils.Graph where
-
-import Game.Antisplice.Utils.BST
-import Game.Antisplice.Utils.AVL
-import Game.Antisplice.Utils.None
-
--- | Phantom type for a node ID
-newtype NodeId = NodeId Int deriving (Eq,Show,Ord)
-
--- | A general graph
-data Graph a b c = Graph { nodes :: AVL (Node a), edges :: [Edge b c], nextId :: NodeId }
-
--- | A node for the graph
-data Node a = Node { nodeMarked :: Bool, nodeContent :: a, nodeId :: NodeId }
-
--- | An edge for the graph
-data Edge b c = Edge { fromNode :: NodeId, toNode :: NodeId, weight :: Int, label :: b, content :: c }
-
-instance Indexable (Node a) NodeId (Node a) where
-  type IndexOf (Node a) = NodeId
-  type ValueOf (Node a) = Node a  
-  indexOf = nodeId
-  valueOf = id
-
---instance (Show a,Show b) => Show (Graph a b) where
---  show (Graph ns es _) = unlines (map show (reverse ns) ++ map show es)
-  
-instance (Show a) => Show (Node a) where
-  show (Node _ c i) = concat [show i, ": ", show c]
-
-instance (Show b) => Show (Edge b c) where
-  show (Edge f t w l _) = concat [show f, " --", show l, "-> ", show t, " [", show w, "]"]
-
--- | Increment a NodeId
-incId :: NodeId -> NodeId
-incId (NodeId i) = NodeId (i+1)
-
--- | An empty graph
-emptyGraph :: Graph a b c
-emptyGraph = Graph EmptyAVL [] (NodeId 0)
-
-instance None (Graph a b c) where
-  none = emptyGraph
-
--- | Add a node to the graph
-addNode :: a -> Graph a b c -> Graph a b c
-addNode x = snd . addNode' x
-
--- | Add a node to the graph and also return its ID
-addNode' :: a -> Graph a b c -> (NodeId,Graph a b c)
-addNode' x (Graph ns es nid) = (nid, Graph (avlInsert (Node False x nid) ns) es (incId nid))
-
--- | Add a bunch of nodes
-addNodes :: [a] -> Graph a b c -> Graph a b c
-addNodes xs = snd . addNodes' xs
-
--- | Add a bunch of nodes and also return their IDs
-addNodes' :: [a] -> Graph a b c -> ([NodeId],Graph a b c)
-addNodes' [] g = ([],g)
-addNodes' (p:ps) g = let (ls, g'') = addNodes' ps g'
-                         (l, g') = addNode' p g
-                     in (l:ls, g'')
-
--- | Return all nodes
-allNodes :: Graph a b c -> [Node a]
-allNodes = avlInorder . nodes
-
--- | Return the node in the AVL tree's root
-rootNode :: Graph a b c -> NodeId
-rootNode = nodeId . avlRoot . nodes
-
--- | Add a unidirectional edge to the graph (provide both nodes, a weight and a label)
-addEdge :: NodeId -> NodeId -> Int -> b -> c -> Graph a b c -> Graph a b c
-addEdge f t w l c = addEdge' (Edge f t w l c)
-
--- | Add a unidirectional edge to the graph (provide the 'Edge')
-addEdge' :: Edge b c -> Graph a b c -> Graph a b c
-addEdge' e g = g{edges=e:edges g}
-
--- | Add a bidirectional edge to the graph (provide both nodes, a weight and a label)
-addMutualEdge :: NodeId -> NodeId -> Int -> b -> c -> Graph a b c -> Graph a b c
-addMutualEdge f t w l c = addEdge f t w l c . addEdge t f w l c
-
--- | Add a bunch of edges unidirectionally (provide both nodes, a weight and a label)
-addEdges :: [(NodeId,NodeId,Int,b,c)] -> Graph a b c -> Graph a b c
-addEdges es g = foldr (addEdge' . (\(f,t,w,l,c) -> Edge f t w l c)) g es
-
--- | Add a bunch of edges unidirectionally (provide the 'Edge's)
-addEdges' :: [Edge b c] -> Graph a b c -> Graph a b c
-addEdges' = flip $ foldr addEdge'
-
--- | Add a bunch of edges bidirectionally (provide both nodes, a weight and a label)
-addMutualEdges :: [(NodeId,NodeId,Int,b,c)] -> Graph a b c -> Graph a b c
-addMutualEdges es = addEdges es . addEdges (map (\(f,t,w,l,c) -> (t,f,w,l,c)) es)
-
--- | Get the node's content from its ID
-getNode :: NodeId -> Graph a b c -> a
-getNode n = nodeContent . getNode' n
-
--- | Get the 'Node' object from its ID
-getNode' :: NodeId -> Graph a b c -> Node a
-getNode' n = (\(Just x) -> x) . avlLookup n . nodes
-
--- | Set the node's content by its ID
-setNode :: NodeId -> a -> Graph a b c -> Graph a b c
-setNode n a g@(Graph ns _ _) = g{nodes=fmap setNode' ns}
-  where setNode' (Node m c i) = if i == n then Node m a i else Node m c i
-
--- | Mark a node by its ID
-markNode :: NodeId -> Graph a b c -> Graph a b c
-markNode n g@(Graph ns _ _) = g{nodes=fmap markNode' ns}
-  where markNode' (Node m c i) = if i == n then Node True c i else Node m c i 
-
--- | Follow an edge by its source node and label
-followEdge :: Eq b => NodeId -> b -> Graph a b c -> Maybe NodeId
-followEdge n l g = case filter ((==l).label) $ filter ((==n).fromNode) $ edges g of
-  [] -> Nothing
-  (x:_) -> Just (toNode x)
-
--- | Query an edge's content
-queryEdge :: Eq b => NodeId -> b -> Graph a b c -> Maybe c
-queryEdge n l g = case filter ((==l).label) $ filter ((==n).fromNode) $ edges g of
-  [] -> Nothing
-  (x:_) -> Just (content x)
-
--- | List all edges from the given node
-listEdges :: NodeId -> Graph a b c -> [(b,c,NodeId)]
-listEdges n g = fmap (\(Edge _ t _ l c) -> (l,c,t)) $ filter ((==n).fromNode) $ edges g
diff --git a/src/Game/Antisplice/Utils/Hetero.hs b/src/Game/Antisplice/Utils/Hetero.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/Hetero.hs
+++ /dev/null
@@ -1,91 +0,0 @@
-{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, RankNTypes, FlexibleContexts, LambdaCase, ScopedTypeVariables #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
-module Game.Antisplice.Utils.Hetero where
-
-infixr 9 :-:
--- | The Cons type for a heterogenous list
-data Cons a b = (:-:) a b
--- | The empty list
-data Nil = Nil
-
--- | Typeclass for appending one heterogenous list to another one
-class Append a b ab | a b -> ab where
-  tappend :: a -> b -> ab
-instance Append Nil b b where
-  tappend Nil b = b
-instance Append b c bc => Append (Cons a b) c (Cons a bc) where
-  tappend (a :-: b) c = a :-: tappend b c
-
--- | Typeclass for wrapping a heterogenous list into a Maybe on demand
-class IntoMaybe a ar  where
-  tjust :: a -> ar
-  tnothing :: a -> ar
-instance IntoMaybe Nil Nil where
-  tjust Nil = Nil
-  tnothing a = Nil
-instance IntoMaybe (Cons a as) (Cons (Maybe (Cons a as)) Nil) where
-  tjust a = Just a :-: Nil
-  tnothing a = Nothing :-: Nil
-
--- | Typeclass for everything that may be converted to a tuple
-class Tuplify l t | l -> t where
-  tuplify :: l -> t
-
-instance Tuplify Nil () where
-  tuplify Nil = ()
-
-instance Tuplify a ar => Tuplify (Cons a Nil) ar where
-  tuplify (a :-: Nil) = tuplify a
-
-instance (Tuplify a ar, Tuplify b br) => Tuplify (Cons a (Cons b Nil)) (ar,br) where
-  tuplify (a :-: b :-: Nil) = (tuplify a, tuplify b)
-
-instance (Tuplify a ar, Tuplify b br, Tuplify c cr) => Tuplify (Cons a (Cons b (Cons c Nil))) (ar,br,cr) where
-  tuplify (a :-: b :-: c :-: Nil) = (tuplify a, tuplify b, tuplify c)
-
-instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr) => Tuplify (Cons a (Cons b (Cons c (Cons d Nil)))) (ar,br,cr,dr) where
-  tuplify (a :-: b :-: c :-: d :-: Nil) = (tuplify a, tuplify b,tuplify c,tuplify d)
-
-instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e Nil))))) (ar,br,cr,dr,er) where
-  tuplify (a :-: b :-: c :-: d :-: e :-: Nil) = (tuplify a,tuplify b,tuplify c,tuplify d,tuplify e)
-
-instance (Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er, Tuplify f fr) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil)))))) (ar,br,cr,dr,er,fr) where
-  tuplify (a :-: b :-: c :-: d :-: e :-: f :-: Nil) = (tuplify a,tuplify b,tuplify c,tuplify d,tuplify e,tuplify f)
-
-instance Tuplify Int Int where
-  tuplify = id
-
-instance Tuplify Char Char where
-  tuplify = id
-
-instance Tuplify a ar => Tuplify [a] [ar] where
-  tuplify = map tuplify
-
-instance Tuplify a ar => Tuplify (Maybe a) (Maybe ar) where
-  tuplify = fmap tuplify
-
-data Titled a = Titled String a
-
-instance Tuplify a ar => Tuplify (Titled a) ar where
-  tuplify (Titled _ a) = tuplify a
diff --git a/src/Game/Antisplice/Utils/ListBuilder.hs b/src/Game/Antisplice/Utils/ListBuilder.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/ListBuilder.hs
+++ /dev/null
@@ -1,60 +0,0 @@
-{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts #-}
-
-module Game.Antisplice.Utils.ListBuilder where
-
-import Control.Arrow
-import Control.Monad.Trans.Class
-import Control.Monad.Identity
-
-class Monad l => ListBuilder l i | l -> i where
-  li :: i -> l ()
-  buildList :: l () -> [i]
-
-newtype StrictBuilderT i m a = StrictBuilder { runStrictBuilderT :: [i] -> m (a,[i]) }
-type StrictBuilder i = StrictBuilderT i Identity
-
-instance Functor m => Functor (StrictBuilderT i m) where
-  fmap f a = StrictBuilder $ \s -> fmap (first f) $ runStrictBuilderT a s
-
-instance Monad m => Monad (StrictBuilderT i m) where
-  return a = StrictBuilder $ \s -> return (a,s)
-  m >>= f = StrictBuilder $ \s -> do (a,s') <- runStrictBuilderT m s; runStrictBuilderT (f a) s'
-
-instance MonadTrans (StrictBuilderT i) where
-  lift m = StrictBuilder $ \s -> do a <- m; return (a,s)
-
-instance ListBuilder (StrictBuilder i) i where
-  li a = seq a $ StrictBuilder $ \s -> return ((),s++[a])
-  buildList m = snd $ runIdentity $ runStrictBuilderT m []
-
-strictBuild :: StrictBuilderT i Identity () -> [i]
-strictBuild = buildList
-
-newtype LazyBuilderT i m a = LazyBuilder { runLazyBuilderT :: ([i] -> [i]) -> m (a,[i] -> [i]) }
-type LazyBuilder i = LazyBuilderT i Identity
-
-instance Functor m => Functor (LazyBuilderT i m) where
-  fmap f a = LazyBuilder $ \s -> fmap (first f) $ runLazyBuilderT a s
-
-instance Monad m => Monad (LazyBuilderT i m) where
-  return a = LazyBuilder $ \s -> return (a,s)
-  m >>= f = LazyBuilder $ \s -> do (a,s') <- runLazyBuilderT m s; runLazyBuilderT (f a) s'
-
-instance MonadTrans (LazyBuilderT i) where
-  lift m = LazyBuilder $ \s -> do a <- m; return (a,s)
-
-instance ListBuilder (LazyBuilder i) i where
-  li a = LazyBuilder $ \s -> return ((),s.([a]++))
-  buildList m = ($[]) $ snd $ runIdentity $ runLazyBuilderT m ([]++)
-
-lazyBuild :: LazyBuilderT i Identity () -> [i]
-lazyBuild = buildList
-
-lis :: ListBuilder l i => [i] -> l ()
-lis = mapM_ li
-
-lit :: ListBuilder l (a,b) => a -> b -> l ()
-lit a b = li (a,b)
-
-(>-<) :: ListBuilder l (a,b) => a -> b -> l ()
-(>-<) = lit
diff --git a/src/Game/Antisplice/Utils/None.hs b/src/Game/Antisplice/Utils/None.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/None.hs
+++ /dev/null
@@ -1,87 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a typeclass for everything that may carry a void value
-module Game.Antisplice.Utils.None where
-
-import Data.Maybe
-import Data.Text (pack, Text)
-
--- | Typeclass for everything that may carry a void value
-class None n where
-  none :: n
-
-instance None [a] where
-  none = []
-
-instance None (Maybe a) where
-  none = Nothing
-
-instance None () where
-  none = ()
-
-instance None Text where
-  none = pack ""
-
-instance None (a -> a) where
-  none = id
-
-instance Monad m => None (a -> m a) where
-  none = return
-
-instance None Int where
-  none = 0
-
-instance None Integer where
-  none = 0
-
-instance None Bool where
-  none = False
-
--- | Wrap the void into a monad.
-noneM :: (Monad m,None n) => m n
-noneM = return none
-
--- | Join a maybe into the underlying type. 'Nothing' becomes 'none'.
-joinMaybe :: None n => Maybe n -> n
-joinMaybe (Just j) = j
-joinMaybe Nothing = none
-
--- | Wrap the value into a maybe. 'none' becomes 'Nothing'.
-expandMaybe :: (Eq n,None n) => n -> Maybe n
-expandMaybe n
-  | n == none = Nothing
-  | otherwise = Just n
-
--- | Clean the maybe by pulling wrapped 'none's to the outside (as a 'Nothing').
-cleanMaybe :: (Eq n,None n) => Maybe n -> Maybe n
-cleanMaybe = expandMaybe . joinMaybe
-
--- | Eliminate all void elements from the list.
-reduce :: (Eq n,None n) => [n] -> [n]
-reduce = filter (/=none)
-
--- | Eliminate all 'Nothing's from the list and unjust all remaining values.
-reduceMaybe :: [Maybe a] -> [a]
-reduceMaybe = map unjust . filter isJust
-  where unjust (Just j) = j
diff --git a/src/Game/Antisplice/Utils/Run.hs b/src/Game/Antisplice/Utils/Run.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/Run.hs
+++ /dev/null
@@ -1,47 +0,0 @@
-{-# LANGUAGE TypeFamilies #-}
-
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a generalized way of running newtypes.
-module Game.Antisplice.Utils.Run where
-
-import Control.Monad
-import Control.Monad.Trans.Class
-import Game.Antisplice.Utils.Fail
-import Game.Antisplice.Monad.Dungeon
-
--- | Typeclass for all runnable newtype 'MonadTrans'ers
-class MonadTrans t => Run t where
-  type Baretype t m a
-  run :: Monad m => t m a -> Baretype t m a
-
-instance Run (FailT e) where
-  type Baretype (FailT e) m a = m (Either e a)
-  run = runFailT
-
-instance Run DungeonT where
-  type Baretype DungeonT m a = DungeonState -> m (a,DungeonState)
-  run = runDungeonT
-
-instance Run RoomT where
-  type Baretype RoomT m a = RoomState -> m (a,RoomState)
-  run = runRoomT
diff --git a/src/Game/Antisplice/Utils/TST.hs b/src/Game/Antisplice/Utils/TST.hs
deleted file mode 100644
--- a/src/Game/Antisplice/Utils/TST.hs
+++ /dev/null
@@ -1,55 +0,0 @@
-{-
-  This module is part of Antisplice.
-  Copyleft (c) 2014 Marvin Cohrs
-
-  All wrongs reversed. Sharing is an act of love, not crime.
-  Please share Antisplice with everyone you like.
-
-  Antisplice is free software: you can redistribute it and/or modify
-  it under the terms of the GNU Affero General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Antisplice is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-  GNU Affero General Public License for more details.
-
-  You should have received a copy of the GNU Affero General Public License
-  along with Antisplice. If not, see <http://www.gnu.org/licenses/>.
--}
-
--- | Provides a ternary search trie
-module Game.Antisplice.Utils.TST where
-
-import Data.Maybe
-import Game.Antisplice.Utils.None
-
--- | A ternary search trie
-data TST a = EmptyTST | TST Char (Maybe a) (TST a) (TST a) (TST a)
-
--- | Insert something into the TST
-tstInsert :: String -> a -> TST a -> TST a
-tstInsert (c:[]) a EmptyTST = TST c (Just a) EmptyTST EmptyTST EmptyTST
-tstInsert (c:cs) a EmptyTST = TST c Nothing (tstInsert cs a EmptyTST) EmptyTST EmptyTST
-tstInsert cs a (TST c1 a1 f l r)
-  | head cs < c1 = TST c1 a1 f (tstInsert cs a l) r
-  | head cs > c1 = TST c1 a1 f l (tstInsert cs a r)
-  | cs == [c1] = TST c1 (Just a) f l r
-  | otherwise = TST c1 a1 (tstInsert (tail cs) a f) l r
-
--- | Lookup some string in the TST
-tstLookup :: String -> TST a -> Maybe a
-tstLookup _ EmptyTST = Nothing
-tstLookup cs (TST c1 a1 f l r)
-  | head cs < c1 = tstLookup cs l
-  | head cs > c1 = tstLookup cs r
-  | cs == [c1] = a1
-  | otherwise = tstLookup (tail cs) f
-
--- | Check if the TST contains the given key
-tstContains :: String -> TST a -> Bool
-tstContains cs = isJust . tstLookup cs
-
-instance None (TST a) where
-  none = EmptyTST
