Add code to support the 'page' parameter and to work around bugs in the
paging code
Fixed bugs in paging code