Event handling to the top of the component tree
Undo logic working correctly