finished all the scrolling math and thingidibobs for the index.js