Refactored the EventManager API to make it simpler to use.