Changed states() to get_states() and so on.