Some cleanup.
Fix a jumping bug on pages with page note, and refactor the jumping code.