Synchronize js fixes and tweaks to python
Merge upstream changes into node-package