Removing unused queries.