Greatly improved scrolling perfomance

A combination of tweaks and now it scrolls smoothly.