fixes to coloring bugs, coding standard cleanup