moved code to main.js/removed other files