Improved search functionality (less duplicates)