// Fixed, cleaned and commented pagination