A few more undo actions

You can now undo altering a text field or changing a variable name. I also moved undo/redo to the top menu, which seemed more suitable than having it in the context menu.