Update main.js

Added comments.