Finished the conversion to pure C.