forgot to change one occurrence of state to self.state.
Went over all scripts and made sure they still work.