Rewrote function responsible for drawing scrolling lines.
Rewrote scrolling functions again. This time added pointers to the page top and bottom to use when calculating scroll distance.