Avoiding template repetition