Start finalising the JS API