Replaced remaining uses of '%' formatting with .format. Fixed two regressions introduced in earlier attempts.