bugfixes and improved API (not implemented yet) for Levenshtein;
some bugs remain in DFA construction