Moved autocomplete backend search to script.js so it is cached

Moved the autocomplete stuff to the script.js file so that it is cached with the rest