cleanup and worker dispatch