Adding a class to handle paging