cleaned up TemplateList::fromGallery