made scroll event handling a bit more efficient. documented some design.