Removing dead code
Removing dead code
Handle orphaned tasks