move template in metadata, it makes for a nicer ast