Work on RGBMode
General tidy-up and bugfixes