Made changes to main.js to search