NFA renamed to Automaton and bugfix. All regex test cases pass.