Very dirty code, but infinite scrolling working