Fix memory leak with "re" search strategy
Minor clean-ups