Text color handling; unused code removed