Change GSym internal types to fix json conversion.
Derived symbols and chains serialized to json.
Trivial refactoring.