Changed to keep string in search input after click, and removed debug code.