- Improved `onLeave` feature detecting the direction of the movement.
- Optimized code added on `scrollPage` function.