Improving scrolling.js readability