merged app.js and search.js