Modified event system to use queues instead of direct calls to handle events