break main.js into separate files