First undocommand is for move
Updating how pointers are swapped in UndoStack