Cleanup of autocomplete search box code.