Added ranging support (work-in-progress).