Some jinja snippets were refactored. Some others were added.