Refactoring EventFactory