Made JS API & tests compatible with latest release.