Adding some helpful comments to show what the functions do

Mostly this is for those JS-incompetent people.