further string formatting fixes and use of list comprehension