Moved scripts from index.html to script.js