extract some more transformation functions and apply namespacing to generated code files