Broke the code slightly.  Reverted a lot of recent changes.  Now using a
map to determine which GUI patches are applied.
Fixed seg fault when quitting.