Scrolling is still broken. Split up into multiple functions