Tidied up formatting of string generator.