Moving some stuff out of C++ and in to C repo