refactored some code
refactored more code
got rid of dead code
made each task in the taskidgroup to cancel