fixed up color escape code handling and layout of text