First draft of the state machine diagram.