Typo in comment
Typo in comment
making JS more generic
Fixing $ global in js