Add scroll example and improve scroll position finding code