Change smooth scrolling to requestAnimationFrame, tidy up scroller code