unroll a reader/state/error monad into a single simple monad, and move back version and client context in state.