Update cpdf so 'pages' can be nested (count total leaf nodes on master, and link to parent on children)