* Refactor of Undo to use non-deprecated methods and cleaner codestyle.
* Removed parameters and fields that were no longer used by Undo.