Implemented first pass of DFA state machinery