[gallery-y-common-infinite-scroll] minor tweaks and refactor