Renamed states dictionary to states_dict to make is less ambiguous and less likely to duplicate in the namespace.