Create and expand templates