Refactored scroll bar width calculations
Fixes related to buffered scroll