Consistent treatment of search terms; fix tests.