More work on scroll logic