Added better IPv6 parsing to the URI, and cleaned up some warnings.