Start of _consolidate_range functionality