#7: Updated operation state machine