Improved viewport scrolling, now supports horizontal too