Added monad instance for StateCPS