Added a threadManager class (minor)

Also increased on the server class