MediaEmbed: reworked the way default templates are built