refactoring the mustash templates