Updates to scrolling functionality, cleaned up JS a little bit