   }  
 }
 
+
+// MARK: - Get associated payload from a node with a given key.
+
 extension SkipList {
   
   public func get(key:Key) -> Payload?{
-    return self.search(key: key)
-  }
-}
+    return search(key: key)
+  }
+}

  }


  internal func insert(key: Key, data: Payload) {
    if self.head != nil {
      if let node = self.findNode(key: key) {
        // replace in case key already exists
        var currentNode = node.next        
        while currentNode != nil && currentNode!.key == key {
          currentNode!.data = data
          currentNode       = currentNode!.down
        }
      } else {
        self.insertItem(key: key, data: data)
      }
      
    } else {
      self.bootstrapBaseLayer(key: key, data: data)
    }
  }
  
}


// MARK: - Removing

extension SkipList {
  public func remove(key: Key) -> Void {
    guard let item = self.findNode(key: key) else {
      return
    }
    

        switch node.next {
        case .none:
          
          currentNode = node.down          
        case .some(let value) where value.key != nil:

          if value.key == key {
