Corrected multi-threaded Stratum

Improved multi-threaded Stratum so that it works. Moved functions from Types into Client module.