Added comments to main.js

Hi!
I just added some comments to make things a bit more overlookie.

/ Martin