Cleanup of the Worker class.