Enhancing the Undo/Redo feature