Added the option to enable smooth scrolling via requestAnimationFrame