Organized functions and hook as suggested in http://jetpack.me/support/infinite-scroll/