Move data out of main.js
Break out autocomplete setup into a function
Make the input erase function reference the class