Refactoring of pluralize template helper