Created new StateMachine class; reworked SimpleState permissions