Added paging function
Merged
FIxed multiple bugs