Refactor event to accept bitless events and custom events.