refactor Document
make it possible to addChildren to a document
Document does not need children to be passed in its constructor
fix docblock