XGM optimizations and fixes

fixes ZAS unsim connections filling up, optimizes graphics a bit
this was lying on my tree from a week ago

wouldn't this stop gas overlays from disappearing, since gas is not there anymore so removal check is skipped?