Remove unused queries.