Added an event queue for exit and pause.