Renamed RGcState to RGc
Minor refactoring