colorize output, few small code changes