Updated C code generator