Paging System

Added paging system to repository. Also fixed the indefinite paging
issue