Improve formatting of generated messages