Refactored out the Nfa builder