refactor error box to use python templating. fix links on wiki stats page