needed for thread clean up in client code
for the editable state of the textfield when not edited.
hadling connections properly on server code