StateMachine now working properly.
Merge pull request #4 from XiDevelopment/state-machine

StateMachine now working properly.