Prototyped InfinityScroller class, caution - messy code