Move index.js file to scripts content block and remove from footer page as it's not needed except on the home page.