Updated jinja usage and improved formatting