         var y1 = x1 - kIndex1
 
         // follow the snake!
-        while x1 < arrayALength && y1 < arrayBLength && inArrayA[x1] == inArrayB[y1] {
+        while x1 < parameters.inArrayA.count && y1 < parameters.inArrayB.count && parameters.inArrayA[x1] == parameters.inArrayB[y1] {
             x1 += 1
             y1 += 1
         }
 
         vectors1[k1Offset] = x1
 
-        if x1 > arrayALength {
+        if x1 > parameters.inArrayA.count {
             // Ran off the right of the graph.
             k1end += 2
-        } else if y1 > arrayBLength {
+        } else if y1 > parameters.inArrayB.count {
             // Ran off the bottom of the graph.
             k1start += 2
         } else if front {
-            let k2Offset = vOffset + delta - kIndex1
+            let k2Offset = parameters.vOffset + delta - kIndex1
 
             if k2Offset >= 0 && k2Offset < vLength && vectors2[k2Offset] != -1 {
                 // Mirror x2 onto top-left coordinate system.
-                let x2 = arrayALength - vectors2[k2Offset]
+                let x2 = parameters.inArrayA.count - vectors2[k2Offset]
                 if x1 >= x2 {
                     // diffs = diff_bisectSplitOfStrings(text1, text2, x1, y1, properties);
-                    diffs = diff_bisectSplitOfArrays(arrayA: inArrayA, arrayB: inArrayB, x: x1, y: y1)
+                    diffs = diff_bisectSplitOfArrays(arrayA: parameters.inArrayA, arrayB: parameters.inArrayB, x: x1, y: y1)
                     haveFoundDiffs = true
                     break
                 }

                              diffs: inout [Diff<T>]) -> Bool {

    var haveFoundDiffs = false // assume
    while kIndex1 <= currentD - k1end {
        defer {
            kIndex1 += 2
        }
        let k1Offset = vOffset + kIndex1
        var x1 = 0

        if kIndex1 == -currentD || (kIndex1 != currentD && vectors1[k1Offset - 1] < vectors1[k1Offset + 1]) {
            x1 = vectors1[k1Offset + 1]
        } else {
            x1 = vectors1[k1Offset - 1] + 1

    return haveFoundDiffs
}

private func walkReversePath<T: Equatable>(kIndex2: inout Int,
                                           currentD: Int,
                                           k2end: inout Int,
                                           vOffset: Int,
                                           vectors2: inout [Int],
                                           inArrayA: [T],
                                           inArrayB: [T],
                                           k2start: inout Int,
                                           front: Bool,
                                           delta: Int,
                                           vLength: Int,
                                           vectors1: inout [Int],
                                           diffs: inout [Diff<T>],
                                           haveFoundDiffs: inout Bool) {
    while kIndex2 <= currentD - k2end {

        defer {
