Split threads and tasks into Classes