More stable socket communications and support for tree view