split out main.js