Fixed small bug in rgbConvert plus several small changes