Updated the event manager to support prioritized listeners