Added argparsing and a command line option for the number of threads to start