Made template tags more DRY