Add option to control precise number of threads
Fix minor variable naming
Add tests to compare results depending on number of threads