C-API enhancements

More C-API enhancements