Launches threads and sets up the data