Refactoring paging buttons.