Improved clear search functionality