Adjusts test for ThreadWorker so that it doesn't take as long.
Adds argument checks to functions and constructors.