beginnings of a js client, fixes