 public extension URL {
   
   var pathComponents : [String]? {
-    if let escapedPC = escapedPathComponents {
-      return escapedPC.map { return $0.withoutPercentEscapes }
-    }
-    else {
-      return nil
-    }
+    guard let escapedPC = escapedPathComponents else { return nil }
+    return escapedPC.map { return $0.withoutPercentEscapes }
   }
   
   var escapedPathComponents : [String]? {
-    if path == .None { return nil }
-    let uPath = path!
-    if uPath == ""   { return nil }
+    guard path != .None    else { return nil }
+    guard let uPath = path else { return nil }
+    guard uPath != ""      else { return nil }
     
     let isAbsolute = uPath.hasPrefix("/")
-    let pathComps  = split(uPath, allowEmptySlices: true) { $0 == "/" }
+    let pathComps  =
+      split(uPath.characters, allowEmptySlices: true) { $0 == "/" }
+     .map { String($0) }
     
     /* Note: we cannot just return a leading slash for absolute pathes as we
      *       wouldn't be able to distinguish between an absolute path and a

     *   So: Absolute pathes instead start with an empty string.
     */
    var gotAbsolute = isAbsolute ? false : true
    return filter(pathComps) {
      if $0 != "" || !gotAbsolute {
        if !gotAbsolute { gotAbsolute = true }
        return true

  }
  
  if ps != "" {
    if let idx = ps.characters.indexOf("?") {
      url.query = ps[idx + 1..<ps.endIndex]
      ps = ps[ps.startIndex..<idx]
    }
    
    if let idx = ps.characters.indexOf("#") {
      url.fragment = ps[idx + 1..<ps.endIndex]
      ps = ps[ps.startIndex..<idx]
    }
