Simplify the event queue handling.