Updates for JS and C API consistency