better organisation for C wrapper.