Updated the scrolling

Made some changes in scrollhandling.