Paging

Implemented paging.
Also derived remaining value client side instead of server-side.