Miscellaneous fixes
Merging js and jsclient