Optimizations to speed up stripping of "greedy" search results