Added newline support in templates