Adds documents, moves messaging specific stuff out of erod.