Refactor NFA.