Add state machine and transition definition explanation.