Added state machine skeleton