Added support for horizontal scrolling, plus relevant test

Fixes #319 

Includes test for horizontal scrolling