Check dischargestructure only when active.
Changed legend URL; Added proper metadata.
Rectangle select fix.