Rename any vars and functions into main.js
Refactory pattern of Autocomplete function