StateMachine constructor.