- Refactoring `scrollPage` function