Handle some events.