rename "metadata" (the global one) to "registry" and make it private
save updated metadata