Refactor installing stanzas into their own subroutine.

This will make things easier when we come to copying metadata,
or generating fragments of metadata.