Template normalization.