Refactor registration states. Simplify EventListener.