stats: fix stats query sets; delete dead code.