Undo redo

This is not intuitive to me.  I would have thought that after cleanState there will be no history with which to redo.
I see now that cleanState returns a new clean copy but leaves the original undo object as is.
It's a bit odd that undo() and redo() manipulate the state captured in the undo object, but cleanState does not.