Issue#27: C interface implementation

following issue #27 
This applies to the whole file (and PR).