Fixed multithreading. Still need to readapt to allow passing into the clock cycles and scoring