Added thread usage instead of the parallelism package

Its performances are equivalent, though I find the code more readable.