Refactor on UndoManager : move undo mechanism from UndoManager to UndoSnapshot