Add Metadata namedtuple and _d attribute