First implementation of the JS client.