Let e_querymark work on a range to be more correct. Also, make e_markpage, e_querymark, and e_querymprotrange use the same algorithmic structure.