Moved the states into their own service