Restored initial version
Updated the pagination system