Added main State machine documentation.