Javascript client implementation and fixes, now with integration tests.