added colorized diagnostics and fixed a few cosmetic errors