refactoring around template rendering
refactoring around template error reporting