Refactor Reader monad as State, first pass at verification (commented out).