WIP: Extract document metadata into separate behavior

:construction: work in progress :construction:

(currently contains some commits that aren't supposed to go in `feature_public_trial` (yet) because I branched off `master`)