Added paging support and more tests