Changed scroll event handler to allow greater flexibility with regard to date retrieval. Also added documentation.