Cleans up search functionality