Cleaned up States Code