Separate scrolling code out of RenderLayer