Comments

Added many comments to main.js