New local client code which sends and receives to and from yourself
Additional clean up code
new mutex and condition variable for local client code
fixes