Add rudimentary c api
Build upon capi