Refactor event type management