Get rid of RangeSet

Premature optimization strikes again! I realized I had gone against best
practice by generalizing from a single example. Mea culpa.