Add comments to the StateMachine class