Conversion to templates