Locate relevant code

Add ability to close network and associated channel tabls

Fix connection not ending

Remove unnecessary check