Fix document parser constructors.
work in progress.