SetRanges: function simplification.