DRYify some templates