remove unused functions in search autocomplete js