* Modify undo manager to return a value and use it on undo
* Storing the last redo value internally to correctly run undo
* Fix types
* Improve test ensuring redo didn't add original block
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>