Simplify pagenav.

Seriously, I made this as complicated as it could possibly be when I
first did it.