math and color section cleanup