Expand templates

From Lsdf
Expand templates