[Added] Full working correctly undo method
+
Refactoring