     /// - 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)
+            let i = _index(ofInteger: 0)
             return i..<i
         }
         
         if range.lowerBound > last || (range.upperBound - 1) < first {
-            let i = Index(indexSet: self, index: 0)
+            let i = _index(ofInteger: 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()
+        let resultFirst = _index(ofInteger: integerGreaterThanOrEqualTo(range.lowerBound))
+        let resultLast = _index(ofInteger: integerLessThanOrEqualTo(range.upperBound - 1))
+        return resultFirst..<index(after: resultLast)
     }
     
     /// Return a `Range<IndexSet.Index>` which can be used to subscript the index set.

    // Indexable
    
    public func index(after i: Index) -> Index {
        return i.successor()
    }
    
    public func formIndex(after i: inout Index) {
        i._successorInPlace()
    }
    
    public func index(before i: Index) -> Index {
        return i.predecessor()
    }
    
    public func formIndex(before i: inout Index) {
        i._predecessorInPlace()
    }
    
    // MARK: -

        
    }
    
    /// The mechanism for accessing the integers stored in an IndexSet.
    public struct Index : CustomStringConvertible, Comparable {
        private var value : IndexSet.Element
        private var extent : Range<IndexSet.Element>
        private var rangeIndex : Int
        private let rangeCount : Int
        
        private init(value: Int, extent: Range<Int>, rangeIndex: Int, rangeCount: Int) {
            self.value = value
            self.extent = extent
            self.rangeCount = rangeCount
            self.rangeIndex = rangeIndex
        }
        
        public var description: String {
            return "index \(value) in a range of \(extent) [range #\(rangeIndex + 1)/\(rangeCount)]"
        }
    }

