Updated rest/metadata commands to not directly depend on MetadataManager, except the abstract command