Refactored never-ending scroll to use JS template.