Awesome refactoring

... using states