Completely re-implemnted refresh and scrolling.