Some modifications for C++ codegen