Fixed and re-factored closing procedure.
Added call to update window title
Reworked network connection shutdown procedure.