cleanup and support for monochrome terminals