Updated main.js with typeSuggestor code