Use giant NFA instead of map

Do not pull in yet. Still need to make a few changes.