Changed index.js to make search faster. Made index.template better for local dev