More fixes to detection for vertical scrolling
Got horizontal scrolling working too