Paging and caching code updated.