DRYing generator templates