These are repeated often, they should probably be in a file of macros, similar to how the judges are done in https://github.com/mozilla/firefox-flicks/blob/master/flicks/base/templates/judge_macros.html