Moved scanner responsibilities to Dfa.