TECH: update - make doc objects mutable so that they can be adjusted via the visitors.