Fixed errors, replacing paging implementation