Add notes and minor changes to js.

changed some variable names and some other thoughts.
Merge pull request #8 from vipyne/add-notes

Add notes and minor changes to js.