Remove unused queries