Decompose the state into mutable and immutable bits, with a message log, and put into RWST