Implemented State Changes

Changed the state change to be called by onThink rather than our own
state methods which would have caused it to be called multiple times a
tick. Feel free to comment out the print outs for when states change
once you get a feel for how it works.