Properly format generated code