Add additional checks for valid URIs

Sanitize bad nickname

Fix tests. We only allow tcp:

fix assert

Fix logging string

Refactor string split
Update network_util
Refactor return and check for None

Remove assertion.
Refactor valid_uri into is_valid_uri
Update for URI sanitizing