improve the Metadata architecture