Improved behavior for working with containers other than the body.

This is two parts, changing the scrolling implementation, and changing how the top of the scroll to highlight is computed.