Fixes to infinite scrolling code
Misc fixes