Client changes

Multithreading added.