Added code for deleting units.