reverting the "better C API" stuff as it was starting to be a pain to do and manage the memory between the conversions and such