Refactoring template integration with logger
Standardize loops
Use mustache templates instead of strings