Added configuration for thread concurrency and thread safe random numbers