Update pagination.php

remove excessive comments and add docblock to describe methods