JS lib changes
Merge pull request #895 from seandst/js-lib

JS lib changes