split main.js into separate class-files