Separated state machine.