Changed framework to C, not C++.
Finished porting to C.