Removed unused runTasks function