Reworked support for user events.