Redid the API with C++ wrapping C