Work on porting the final version to C.