moved main.js to own file