Offset diffs from the top of the page.
Sped up and corrected diff processing edge cases.