Fixups based on PR feedback
Remove need to a nodeRange comparison in getNodesInRange

Rewrote comparison previously using a range to compare the offsets
manually. This makes the 3 branches of flow more obvious as well.