Refactored TasksCtrl