Adds new scrolling functionality

This should fix the problem mentioned in #6.