Added DFA and NFA classes. DFA is a subclass of NFA.