NFAFactory stuff and tests and stuff.