Improved nfa construction for groups.