removing duplicitive color rule check
deleting dead code, fixing up error log
undecided whether to comment exported functions or unexport them