riched20: Rewrite of scrolling and some redrawing code.