Improving the debug query so it is in a hidden div in all modes except production.