Moving states to its own class.