Minor refacorting, remove not needed var
Pull SaveMetadata into MetadataProvider from Runtime