Moving from main.js to index. cause it's not 2010 anymore.