Cleanup documents API code and names
Expand the document app API to include document version and document pages