#8: Refactoring: Moved operations (undo/redo) to a new module.