Continuing work on imperative monad code