Remove unused tasks from handlers