[#49102361] - Pagination code cleaned up and comments added