Add 'state' property to StateMachine