more api work, update js unit tests