Refactor, using State-Event, more natural and consistent code