Formatting and small fixes (codegen)