Great removal of duplication. Let's think about making it into a helper instead of a template though.