Created main.js and started fixing errors