Cleanup the queues.