Optimize scrolling when trackpad is used

The scrolling animation is much smoother now. I hope nothing is broken?