Edited DFA's, but still has some bugs.