StateMachine class is now internal