Basic character state machine.