Abstracted, in the calling code, over the type of the state monad. Introduced a StateMonad typeclass, and made StateT an instance of.