Move DFA conversion into it's own file