Add 'edit' command to edit the JSON representation of a document
Cleanup