Refactored scrolling class.