Some work on getting the js api going