Added disabling of counts, configurable min/max, and display of query in legend
Query deactivation
Merged upstream