added comments to the main.js