Removed an old rangeOverlaps function. Added rect distance.