Updated main.js for GitHub Pages