bug fixes to filter; beginnings of legend panel