Moved creation of state to State constructor