added comments to main.js