TGG-Editor: improved code structure