Refactoring EventDispatcher