Starting to write DFA-simulation code