query cleanup, better progress msg