clean up Queries