refactored so clean out deployment occurs at beginning of any task.