Moves the autocomplete ajax call to new method