made changing the color of the header and footer smarter