Updates to the search function.