Remove the C API and refactor the raw API.