Added a goto_table and simplified the automaton code.