Updated UndoLogic