Caching searcher, tests, some refactoring