WIP #32: Got ranged lookup function working. Tests pass.