Moved all js scripts from the index.html to the main.js