removed unnecessary duplication of TaskList calls, moved task_root to global variable
removed debug print line