Rework how saving a doc works.