Separated main.js into separate files