Merge some of update by document and script

These share many of the same options so it makes sense to merge them.

Closes #628
Closes #627