remove some useless explicit usages of C-API calls from the code base