Moved legend to separate window

legend is now a separate window, which the user can toggle on and off.
Fix bug that didnt reset the displays when 2nd new search was chosen