Created class TaskMortality that is  responsible for instructing a unit to "die"and be disposed