separate main.js to other modules