Added trigger events on layer show and hide. This drives the legend.
Re-did how accordion is driving the legend. It finally, finally works!