Cleaning up search functionality