Being a bit more ruthless about the state machine