     // Indexable
     
     public func index(after i: Index) -> Index {
-        return i.successor()
+        if i.value + 1 == i.extent.upperBound {
+            // Move to the next range
+            if i.rangeIndex + 1 == i.rangeCount {
+                // We have no more to go; return a 'past the end' index
+                return Index(value: i.value + 1, extent: i.extent, rangeIndex: i.rangeIndex, rangeCount: i.rangeCount)
+            } else {
+                let rangeIndex = i.rangeIndex + 1
+                let rangeCount = i.rangeCount
+                let extent = _range(at: rangeIndex)
+                let value = extent.lowerBound
+                return Index(value: value, extent: extent, rangeIndex: rangeIndex, rangeCount: rangeCount)
+            }
+        } else {
+            // Move to the next value in this range
+            return Index(value: i.value + 1, extent: i.extent, rangeIndex: i.rangeIndex, rangeCount: i.rangeCount)
+        }
     }
     
     public func formIndex(after i: inout Index) {
-        i._successorInPlace()
+        if i.value + 1 == i.extent.upperBound {
+            // Move to the next range
+            if i.rangeIndex + 1 == i.rangeCount {
+                // We have no more to go; return a 'past the end' index
+                i.value += 1
+            } else {
+                i.rangeIndex += 1
+                i.extent = _range(at: i.rangeIndex)
+                i.value = i.extent.lowerBound
+            }
+        } else {
+            // Move to the next value in this range
+            i.value += 1
+        }
     }
     
     public func index(before i: Index) -> Index {
-        return i.predecessor()
+        if i.value == i.extent.lowerBound {
+            // Move to the next range
+            if i.rangeIndex == 0 {
+                // We have no more to go
+                return Index(value: i.value, extent: i.extent, rangeIndex: i.rangeIndex, rangeCount: i.rangeCount)
+            } else {
+                let rangeIndex = i.rangeIndex - 1
+                let rangeCount = i.rangeCount
+                let extent = _range(at: rangeIndex)
+                let value = extent.upperBound - 1
+                return Index(value: value, extent: extent, rangeIndex: rangeIndex, rangeCount: rangeCount)
+            }
+        } else {
+            // Move to the previous value in this range
+            return Index(value: i.value - 1, extent: i.extent, rangeIndex: i.rangeIndex, rangeCount: i.rangeCount)
+        }
     }
     
     public func formIndex(before i: inout Index) {
-        i._predecessorInPlace()
+        if i.value == i.extent.lowerBound {
+            // Move to the next range
+            if i.rangeIndex == 0 {
+                // We have no more to go
+            } else {
+                i.rangeIndex -= 1
+                i.extent = _range(at: i.rangeIndex)
+                i.value = i.extent.upperBound - 1
+            }
+        } else {
+            // Move to the previous value in this range
+            i.value -= 1
+        }
+    }
+    
+    private func _index(ofInteger integer: Element) -> Index {
+        let rangeCount = _rangeCount
+        let value = integer
+        if let rangeIndex = _indexOfRange(containing: integer) {
+            let extent = _range(at: rangeIndex)
+            let rangeIndex = rangeIndex
+            return Index(value: value, extent: extent, rangeIndex: rangeIndex, rangeCount: rangeCount)
+        } else {
+            let extent = 0..<0
+            let rangeIndex = 0
+            return Index(value: value, extent: Range(extent), rangeIndex: rangeIndex, rangeCount: rangeCount)
+        }
     }
     
     // MARK: -

    /// - parameter range: The range of integers to include.
    public func indexRange(in range: Range<Element>) -> Range<Index> {
        if range.isEmpty {
            let i = Index(indexSet: self, index: 0)
            return i..<i
        }
        
        if range.lowerBound > last || (range.upperBound - 1) < first {
            let i = Index(indexSet: self, index: 0)
            return i..<i
        }
        
        let resultFirst = Index(indexSet: self, index: integerGreaterThanOrEqualTo(range.lowerBound))
        let resultLast = Index(indexSet: self, index: integerLessThanOrEqualTo(range.upperBound - 1))
        return resultFirst..<resultLast.successor()
    }
    
    /// Return a `Range<IndexSet.Index>` which can be used to subscript the index set.

    }
    
    public var startIndex: Index {
        // If this winds up being NSNotFound, that's ok because then endIndex is also NSNotFound, and empty collections have startIndex == endIndex
        let extent = _range(at: 0)
        return Index(value: extent.lowerBound, extent: extent, rangeIndex: 0, rangeCount: _rangeCount)
    }

    public var endIndex: Index {
        let rangeCount = _rangeCount
        let rangeIndex = rangeCount - 1
        let extent : Range<Int>
        let value : Int
        if rangeCount > 0 {
            extent = _range(at: rangeCount - 1)
            value = extent.upperBound // "1 past the end" position is the last range, 1 + the end of that range's extent
        } else {
            extent = 0..<0
            value = 0
        }
        
        return Index(value: value, extent: extent, rangeIndex: rangeIndex, rangeCount: rangeCount)
    }
    
    public subscript(index : Index) -> Element {
