changed segment classes to a dictionary to make it easier to access
fixed bugs in __repr__ methods
Changed to load type="defaults"/"globals" component into
__GLOBALS_COMPONENT__ key