Move important functions to the top of the file.
Number the states of the automata.