TGGeditor - improved code structure