             switch ordering {
             case .Min:
                 if items[right] < items[index] {
-                    return Heap(items: self.swapItemsForIndices(right, index), ordering: ordering).downHeap(right)
+                    return Heap(items: items.swapValuesForIndices(right, index), ordering: ordering).downHeap(right)
                 } else {
                     return self
                 }
             case .Max:
                 if items[right] > items[index] {
-                    return Heap(items: self.swapItemsForIndices(right, index), ordering: ordering).downHeap(right)
+                    return Heap(items: items.swapValuesForIndices(right, index), ordering: ordering).downHeap(right)
                 } else {
                     return self
                 }

    
    // Delete the root from the heap, return the new heap
    func extract() -> Heap {
        let newHeap = Heap(items: self.moveLastItemToFront(), ordering: ordering)
        return newHeap.downHeap(0)
    }
}

// Private
extension Heap {
    
    private func upHeap(index: Int) -> Heap {

            switch ordering {
            case .Min:
                if items[right] < items[index] {
                    return Heap(items: items.swapValuesForIndices(right, index), ordering: ordering).downHeap(right)
                } else {
                    return self
                }
            case .Max:
                                print("yo \(items[left]) \(items[right])")
                if items[left] > items[index] {
                    return Heap(items: items.swapValuesForIndices(left, index), ordering: ordering).downHeap(left)
                } else {
                    return self
                }
            }
        }
    }
}

