Refactored queries, search.