Start working on a state machine.