         self.receivedString = nil
         self.receivedDataBuffer = NSMutableData()
 
-
-        var port = ""
-        if let optionalPort = self.url.port {
-            port = String(optionalPort)
-        }
+        let port = String(self.url.port ?? 80)
         let relativePath = self.url.relativePath
         let host = self.url.host ?? ""
-
-        self.uniqueIdentifier = "\(String(describing: self.url.scheme)).\(host).\(port).\(relativePath)"
+        let scheme = self.url.scheme ?? ""
+
+        self.uniqueIdentifier = "\(scheme).\(host).\(port).\(relativePath)"
         self.lastEventIDKey = "\(EventSource.DefaultsKey).\(self.uniqueIdentifier)"
 
         super.init()

    }

    //Mark: Connect

    func connect() {
        var additionalHeaders = self.headers
        if let eventID = self.lastEventID {

        return (event["id"], event["event"], event["data"])
    }

    fileprivate func parseKeyValuePair(_ line: String) -> (String?, String?) {
        var key: NSString?, value: NSString?
        let scanner = Scanner(string: line)
        scanner.scanUpTo(":", into: &key)
