Deleting queries and tests