More C API work