Add events to undo manager

@mczepiel