Refactor C code.