Optimize the autocomplete