DRYing templates