Move some tmpl.format calls out a level of nesting for simplicity's sake.