Moved metadata function to Collection.