Made infinite scrolling to work (not completely finished/tested yet).