cleaning up looping of queues and removing state from clearing calls