Updated the state machine documentation