Started changes towards parsing into a generic document.