Move commands from commands.go to document.go and editor.go