Fixed error in colorpicker javascript and cleaned up code formatting a bit.