Move JS to main.js