migrate _main.js to main.js