improve debug output
simplify code
fix scrolling bug. Closes T106

Was fixed with help from great bug report by thomasg.

scroll_rev was ok