small fix in SharedRGBImage + cleanups here and there