Improved the slowdown scrolling thread

- the scrolling thread can now also handle the horizontal scrolling
- added some documentation comments