Complete rework of Metadata source file generation and marshalling.