Changes to search implementation