Added state machine diagrams