Add internal event listeners to undo-manager