Cleaning up the search