Added initial C code, though I think I'll abandon it for C++