Tidy up
Use strict
Move emptyEditorWhenDeleting into patch plugin and improve documentation