Many changes to improve search string matching