Gallery and GalleryMetadata class implementation