Partially updated the event listeners and the event manager to support priorities