removed a lot of old commented code. fixed color problem by converting color space