Cleaning up Part C code