Improved C code generation