     }
 
     /// Returns the summary calculated over the sequence all nodes preceding `handle` in the tree.
-    /// - Complexity: O(log(count) for nonempty summarys, O(1) when the summary is empty.
+    /// - Complexity: O(log(count) for nonempty summaries, O(1) when the summary is empty.
     public func summaryOfAllNodesBefore(handle: Handle) -> Summary {
         func summaryOfLeftSubtree(handle: Handle) -> Summary {
             guard sizeof(Summary.self) > 0 else { return Summary() }

        let old = node.head
        node.head = head
        self[handle] = node
        updateSummarysAtAndAbove(handle)
        return old
    }
}

            if rightmost == parent && direction == .Right { rightmost = handle }
        }

        updateSummariesAtAndAbove(handle)

        rebalanceAfterInsertion(handle)
        return handle
