Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 9042)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 9043)
@@ -185,5 +185,5 @@
     }
 
-    private void SymbolicExpressionTreeChart_MouseClick(object sender, MouseEventArgs e) {
+    protected virtual void SymbolicExpressionTreeChart_MouseClick(object sender, MouseEventArgs e) {
       VisualSymbolicExpressionTreeNode visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
       if (visualTreeNode != null) {
@@ -199,5 +199,5 @@
     }
 
-    private void SymbolicExpressionTreeChart_MouseDoubleClick(object sender, MouseEventArgs e) {
+    protected virtual void SymbolicExpressionTreeChart_MouseDoubleClick(object sender, MouseEventArgs e) {
       VisualSymbolicExpressionTreeNode visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
       if (visualTreeNode != null)
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 9042)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 9043)
@@ -49,11 +49,11 @@
       this.splitContainer = new System.Windows.Forms.SplitContainer();
       this.grpSimplify = new System.Windows.Forms.GroupBox();
+      this.treeStatusValue = new System.Windows.Forms.Label();
       this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
+      this.btnOptimizeConstants = new System.Windows.Forms.Button();
       this.btnSimplify = new System.Windows.Forms.Button();
-      this.btnOptimizeConstants = new System.Windows.Forms.Button();
+      this.treeStatusLabel = new System.Windows.Forms.Label();
+      this.treeChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.InteractiveSymbolicExpressionTreeChart();
       this.grpViewHost = new System.Windows.Forms.GroupBox();
-      this.treeStatusLabel = new System.Windows.Forms.Label();
-      this.treeStatusValue = new System.Windows.Forms.Label();
-      this.treeChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.InteractiveSymbolicExpressionTreeChart();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
       this.splitContainer.Panel1.SuspendLayout();
@@ -67,6 +67,6 @@
       // viewHost
       // 
-      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
+      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
       this.viewHost.Caption = "View";
@@ -113,59 +113,4 @@
       this.grpSimplify.Text = "Simplify";
       // 
-      // flowLayoutPanel
-      // 
-      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.flowLayoutPanel.Controls.Add(this.btnOptimizeConstants);
-      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
-      this.flowLayoutPanel.Location = new System.Drawing.Point(6, 370);
-      this.flowLayoutPanel.Name = "flowLayoutPanel";
-      this.flowLayoutPanel.Size = new System.Drawing.Size(204, 29);
-      this.flowLayoutPanel.TabIndex = 2;
-      this.flowLayoutPanel.WrapContents = false;
-      // 
-      // btnSimplify
-      // 
-      this.btnSimplify.Location = new System.Drawing.Point(106, 3);
-      this.btnSimplify.Name = "btnSimplify";
-      this.btnSimplify.Size = new System.Drawing.Size(95, 23);
-      this.btnSimplify.TabIndex = 1;
-      this.btnSimplify.Text = "Simplify";
-      this.btnSimplify.UseVisualStyleBackColor = true;
-      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
-      // 
-      // btnOptimizeConstants
-      // 
-      this.btnOptimizeConstants.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.btnOptimizeConstants.Enabled = false;
-      this.btnOptimizeConstants.Location = new System.Drawing.Point(3, 3);
-      this.btnOptimizeConstants.Name = "btnOptimizeConstants";
-      this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
-      this.btnOptimizeConstants.TabIndex = 2;
-      this.btnOptimizeConstants.Text = "Optimize";
-      this.btnOptimizeConstants.UseVisualStyleBackColor = true;
-      this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
-      // 
-      // grpViewHost
-      // 
-      this.grpViewHost.Controls.Add(this.viewHost);
-      this.grpViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.grpViewHost.Location = new System.Drawing.Point(0, 0);
-      this.grpViewHost.Name = "grpViewHost";
-      this.grpViewHost.Size = new System.Drawing.Size(348, 405);
-      this.grpViewHost.TabIndex = 1;
-      this.grpViewHost.TabStop = false;
-      this.grpViewHost.Text = "Details";
-      // 
-      // treeStatusLabel
-      // 
-      this.treeStatusLabel.AutoSize = true;
-      this.treeStatusLabel.BackColor = System.Drawing.Color.Transparent;
-      this.treeStatusLabel.Location = new System.Drawing.Point(6, 16);
-      this.treeStatusLabel.Name = "treeStatusLabel";
-      this.treeStatusLabel.Size = new System.Drawing.Size(68, 13);
-      this.treeStatusLabel.TabIndex = 2;
-      this.treeStatusLabel.Text = "Tree Status: ";
-      // 
       // treeStatusValue
       // 
@@ -179,8 +124,52 @@
       this.treeStatusValue.Text = "Valid";
       // 
+      // flowLayoutPanel
+      // 
+      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
+      this.flowLayoutPanel.Controls.Add(this.btnOptimizeConstants);
+      this.flowLayoutPanel.Location = new System.Drawing.Point(6, 370);
+      this.flowLayoutPanel.Name = "flowLayoutPanel";
+      this.flowLayoutPanel.Size = new System.Drawing.Size(204, 29);
+      this.flowLayoutPanel.TabIndex = 2;
+      this.flowLayoutPanel.WrapContents = false;
+      // 
+      // btnOptimizeConstants
+      // 
+      this.btnOptimizeConstants.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.btnOptimizeConstants.Enabled = false;
+      this.btnOptimizeConstants.Location = new System.Drawing.Point(104, 3);
+      this.btnOptimizeConstants.Name = "btnOptimizeConstants";
+      this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
+      this.btnOptimizeConstants.TabIndex = 2;
+      this.btnOptimizeConstants.Text = "Optimize";
+      this.btnOptimizeConstants.UseVisualStyleBackColor = true;
+      this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
+      // 
+      // btnSimplify
+      // 
+      this.btnSimplify.Location = new System.Drawing.Point(3, 3);
+      this.btnSimplify.Name = "btnSimplify";
+      this.btnSimplify.Size = new System.Drawing.Size(95, 23);
+      this.btnSimplify.TabIndex = 1;
+      this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.UseVisualStyleBackColor = true;
+      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
+      // 
+      // treeStatusLabel
+      // 
+      this.treeStatusLabel.AutoSize = true;
+      this.treeStatusLabel.BackColor = System.Drawing.Color.Transparent;
+      this.treeStatusLabel.Location = new System.Drawing.Point(6, 16);
+      this.treeStatusLabel.Name = "treeStatusLabel";
+      this.treeStatusLabel.Size = new System.Drawing.Size(68, 13);
+      this.treeStatusLabel.TabIndex = 2;
+      this.treeStatusLabel.Text = "Tree Status: ";
+      // 
       // treeChart
       // 
-      this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
+      this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
       this.treeChart.BackgroundColor = System.Drawing.Color.White;
@@ -197,4 +186,15 @@
       this.treeChart.SymbolicExpressionTreeNodeClicked += new System.Windows.Forms.MouseEventHandler(this.treeChart_SymbolicExpressionTreeNodeClicked);
       this.treeChart.SymbolicExpressionTreeNodeDoubleClicked += new System.Windows.Forms.MouseEventHandler(this.treeChart_SymbolicExpressionTreeNodeDoubleClicked);
+      // 
+      // grpViewHost
+      // 
+      this.grpViewHost.Controls.Add(this.viewHost);
+      this.grpViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.grpViewHost.Location = new System.Drawing.Point(0, 0);
+      this.grpViewHost.Name = "grpViewHost";
+      this.grpViewHost.Size = new System.Drawing.Size(348, 405);
+      this.grpViewHost.TabIndex = 1;
+      this.grpViewHost.TabStop = false;
+      this.grpViewHost.Text = "Details";
       // 
       // InteractiveSymbolicDataAnalysisSolutionSimplifierView
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 9042)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 9043)
@@ -53,40 +53,29 @@
     /// </summary>
     /// <param name="tree">The symbolic expression tree</param>
-    /// <param name="node">The insertion point (the parent node who will receive a new child)</param>
+    /// <param name="node">The insertion point (ie, the parent node who will receive a new child)</param>
     /// <param name="oldChild">The subtree to be replaced</param>
     /// <param name="newChild">The replacement subtree</param>
     /// <param name="removeSubtree">Flag used to indicate if whole subtrees should be removed (default behavior), or just the subtree root</param>
-    private void Modify(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node, ISymbolicExpressionTreeNode oldChild, ISymbolicExpressionTreeNode newChild,
-                        bool removeSubtree = true) {
+    private void Modify(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node, ISymbolicExpressionTreeNode oldChild, ISymbolicExpressionTreeNode newChild, bool removeSubtree = true) {
       if (oldChild == null && newChild == null) throw new ArgumentException();
       if (oldChild == null) { // insertion operation
         node.AddSubtree(newChild);
         newChild.Parent = node;
-        treeChart.Tree = tree; // because a new node is present in the tree, the visualNodes dictionary needs to be updated
       } else if (newChild == null) { // removal operation
-        // use switch instead of if/else purely for aesthetical reasons (to avoid nested ifs and elses)
-        switch (removeSubtree) {
-          case true:
-            // remove the whole subtree
-            node.RemoveSubtree(node.IndexOfSubtree(oldChild));
-            if (oldChild.SubtreeCount > 0)
-              foreach (var subtree in oldChild.IterateNodesBreadth()) {
-                changedNodes.Remove(subtree);
-                foldedNodes.Remove(subtree);
-              }
-            break;
-          case false:
-            // only remove the current node and try to preserve its subtrees
-            node.RemoveSubtree(node.IndexOfSubtree(oldChild));
-            if (oldChild.SubtreeCount > 0)
-              for (int i = oldChild.SubtreeCount - 1; i >= 0; --i) {
-                var subtree = oldChild.GetSubtree(i);
-                oldChild.RemoveSubtree(i);
-                node.AddSubtree(subtree);
-              }
-            break;
-        }
+        node.RemoveSubtree(node.IndexOfSubtree(oldChild));
         changedNodes.Remove(oldChild);
         foldedNodes.Remove(oldChild);
+        if (removeSubtree) {
+          foreach (var subtree in oldChild.IterateNodesPrefix()) {
+            changedNodes.Remove(subtree);
+            foldedNodes.Remove(subtree);
+          }
+        } else {
+          for (int i = oldChild.SubtreeCount - 1; i >= 0; --i) {
+            var subtree = oldChild.GetSubtree(i);
+            oldChild.RemoveSubtree(i);
+            node.AddSubtree(subtree);
+          }
+        }
       } else { // replacement operation
         var replacementIndex = node.IndexOfSubtree(oldChild);
@@ -101,31 +90,29 @@
         }
       }
-
       if (IsValid(tree)) {
         treeState = TreeState.Valid;
         UpdateModel(Content.Model.SymbolicExpressionTree);
+      } else {
+        treeState = TreeState.Invalid;
+      }
+    }
+
+    private bool IsValid(ISymbolicExpressionTree tree) {
+      treeChart.Tree = tree;
+      treeChart.Repaint();
+      bool valid = !tree.IterateNodesPostfix().Any(node => node.SubtreeCount < node.Symbol.MinimumArity || node.SubtreeCount > node.Symbol.MaximumArity);
+      if (valid) {
         btnOptimizeConstants.Enabled = true;
         btnSimplify.Enabled = true;
         treeStatusValue.Text = "Valid";
         treeStatusValue.ForeColor = Color.Green;
-        this.Refresh();
       } else {
-        treeState = TreeState.Invalid;
         btnOptimizeConstants.Enabled = true;
         btnSimplify.Enabled = true;
         treeStatusValue.Text = "Invalid";
         treeStatusValue.ForeColor = Color.Red;
-        treeChart.Repaint();
-        this.Refresh();
-      }
-      foreach (var changedNode in changedNodes.Keys) {
-        var visualNode = treeChart.GetVisualSymbolicExpressionTreeNode(changedNode);
-        visualNode.LineColor = Color.DodgerBlue;
-        treeChart.RepaintNode(visualNode);
-      }
-    }
-
-    private static bool IsValid(ISymbolicExpressionTree tree) {
-      return !tree.IterateNodesPostfix().Any(node => node.SubtreeCount < node.Symbol.MinimumArity || node.SubtreeCount > node.Symbol.MaximumArity);
+      }
+      this.Refresh();
+      return valid;
     }
 
@@ -183,16 +170,4 @@
 
     private void treeChart_SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
-      var visualNode = (VisualSymbolicExpressionTreeNode)sender;
-      if (visualNode == null) return;
-      var treeNode = visualNode.SymbolicExpressionTreeNode;
-      if (changedNodes.ContainsKey(treeNode)) {
-        visualNode.LineColor = Color.DodgerBlue;
-      } else if (treeNode is ConstantTreeNode && foldedNodes.ContainsKey(treeNode)) {
-        visualNode.LineColor = Color.DarkOrange;
-      } else {
-        visualNode.LineColor = Color.Black;
-      }
-      visualNode.TextColor = Color.Black;
-      treeChart.RepaintNode(visualNode);
     }
 
@@ -206,10 +181,12 @@
       int indexOfSubtree = parent.IndexOfSubtree(symbExprTreeNode);
       if (changedNodes.ContainsKey(symbExprTreeNode)) {
+        // undo node change
         parent.RemoveSubtree(indexOfSubtree);
-        ISymbolicExpressionTreeNode originalNode = changedNodes[symbExprTreeNode];
+        var originalNode = changedNodes[symbExprTreeNode];
         parent.InsertSubtree(indexOfSubtree, originalNode);
         changedNodes.Remove(symbExprTreeNode);
         UpdateModel(tree);
       } else if (foldedNodes.ContainsKey(symbExprTreeNode)) {
+        // undo node folding
         SwitchNodeWithReplacementNode(parent, indexOfSubtree);
         UpdateModel(tree);
@@ -257,11 +234,12 @@
           }
         }
-        if (visualTree != null && treeNode is ConstantTreeNode && foldedNodes.ContainsKey(treeNode)) {
-          visualTree.LineColor = Color.DarkOrange;
-        }
-      }
-      // repaint nodes and refresh
+        if (visualTree != null)
+          if (changedNodes.ContainsKey(treeNode)) {
+            visualTree.LineColor = Color.DodgerBlue;
+          } else if (treeNode is ConstantTreeNode && foldedNodes.ContainsKey(treeNode)) {
+            visualTree.LineColor = Color.DarkOrange;
+          }
+      }
       treeChart.RepaintNodes();
-      treeChart.Refresh();
     }
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 9042)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 9043)
@@ -29,11 +29,10 @@
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
   internal delegate void
-  ModifyTree(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node, ISymbolicExpressionTreeNode oldChild, ISymbolicExpressionTreeNode newChild,
-             bool removeSubtree = true);
+  ModifyTree(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node, ISymbolicExpressionTreeNode oldChild, ISymbolicExpressionTreeNode newChild, bool removeSubtree = true);
 
   internal sealed partial class InteractiveSymbolicExpressionTreeChart : SymbolicExpressionTreeChart {
     private ISymbolicExpressionTreeNode tempNode; // node in clipboard (to be cut/copy/pasted etc)
     private VisualSymbolicExpressionTreeNode currSelected; // currently selected node
-    public enum EditOp { NoOp, CopySubtree, CutSubtree, ChangeNode, InsertNode, InsertSubtree, RemoveNode, RemoveSubtree }
+    private enum EditOp { NoOp, CopySubtree, CutSubtree }
     private EditOp lastOp = EditOp.NoOp;
 
@@ -52,5 +51,9 @@
       var ea = new MouseEventArgs(MouseButtons.Left, 1, point.X, point.Y, 0);
       var visualNode = FindVisualSymbolicExpressionTreeNodeAt(ea.X, ea.Y);
-      if (visualNode != null) { OnSymbolicExpressionTreeNodeClicked(visualNode, ea); };
+      if (visualNode != null) {
+        OnSymbolicExpressionTreeNodeClicked(visualNode, ea);
+      } else {
+        currSelected = null;
+      }
 
       if (currSelected == null) {
@@ -76,13 +79,24 @@
 
     protected override void OnSymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
-      var visualTreeNode = (VisualSymbolicExpressionTreeNode)sender;
-      var lastSelected = currSelected;
-      currSelected = visualTreeNode;
       if (currSelected != null) {
-        currSelected.LineColor = Color.LightGreen;
+        currSelected.LineColor = Color.FromArgb(255, currSelected.LineColor);
         RepaintNode(currSelected);
       }
-      if (lastSelected != null)
-        base.OnSymbolicExpressionTreeNodeClicked(lastSelected, e);
+      currSelected = (VisualSymbolicExpressionTreeNode)sender; ;
+      if (currSelected != null) {
+        currSelected.LineColor = Color.FromArgb(130, currSelected.LineColor);
+        RepaintNode(currSelected);
+      }
+    }
+
+    protected override void SymbolicExpressionTreeChart_MouseClick(object sender, MouseEventArgs e) {
+      var visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
+      if (visualTreeNode != null) {
+        OnSymbolicExpressionTreeNodeClicked(visualTreeNode, e);
+      } else if (currSelected != null) {
+        currSelected.LineColor = Color.FromArgb(255, currSelected.LineColor);
+        RepaintNode(currSelected);
+        currSelected = null;
+      }
     }
 
@@ -124,5 +138,4 @@
       currSelected = null;
     }
-
     private void changeNodeToolStripMenuItem_Click(object sender, EventArgs e) {
       if (currSelected == null) return;
@@ -150,14 +163,20 @@
       currSelected = null;
     }
-
     private void cutToolStripMenuItem_Click(object sender, EventArgs e) {
       lastOp = EditOp.CutSubtree;
+      copySubtree();
+    }
+    private void copyToolStripMenuItem_Click(object sender, EventArgs e) {
+      lastOp = EditOp.CopySubtree;
+      copySubtree();
+    }
+    private void copySubtree() {
       if (tempNode != null) {
         foreach (var subtree in tempNode.IterateNodesBreadth()) {
           var vNode = GetVisualSymbolicExpressionTreeNode(subtree);
-          base.OnSymbolicExpressionTreeNodeClicked(vNode, null);
+          vNode.LineColor = Color.FromArgb(255, vNode.LineColor); // reset the alpha value to 255
           if (subtree.Parent != null) {
             var vArc = GetVisualSymbolicExpressionTreeNodeConnection(subtree.Parent, subtree);
-            vArc.LineColor = Color.Black;
+            vArc.LineColor = Color.FromArgb(255, vArc.LineColor);
           }
         }
@@ -166,37 +185,9 @@
       foreach (var node in tempNode.IterateNodesPostfix()) {
         var visualNode = GetVisualSymbolicExpressionTreeNode(node);
-        visualNode.LineColor = Color.LightGray;
-        visualNode.TextColor = Color.LightGray;
-        if (node.SubtreeCount > 0) {
-          foreach (var subtree in node.Subtrees) {
-            var visualLine = GetVisualSymbolicExpressionTreeNodeConnection(node, subtree);
-            visualLine.LineColor = Color.LightGray;
-          }
-        }
-      }
-      currSelected = null;
-      Repaint();
-    }
-    private void copyToolStripMenuItem_Click(object sender, EventArgs e) {
-      lastOp = EditOp.CopySubtree;
-      if (tempNode != null) {
-        foreach (var subtree in tempNode.IterateNodesBreadth()) {
-          var vNode = GetVisualSymbolicExpressionTreeNode(subtree);
-          base.OnSymbolicExpressionTreeNodeClicked(vNode, null);
-          if (subtree.Parent != null) {
-            var vArc = GetVisualSymbolicExpressionTreeNodeConnection(subtree.Parent, subtree);
-            vArc.LineColor = Color.Black;
-          }
-        }
-      }
-      tempNode = currSelected.SymbolicExpressionTreeNode;
-      foreach (var node in tempNode.IterateNodesPostfix()) {
-        var visualNode = GetVisualSymbolicExpressionTreeNode(node);
-        visualNode.LineColor = Color.LightGray;
-        visualNode.TextColor = Color.LightGray;
-        if (node.SubtreeCount <= 0) continue;
+        visualNode.LineColor = Color.FromArgb(100, visualNode.LineColor);
+        visualNode.TextColor = Color.FromArgb(100, visualNode.TextColor);
         foreach (var subtree in node.Subtrees) {
           var visualLine = GetVisualSymbolicExpressionTreeNodeConnection(node, subtree);
-          visualLine.LineColor = Color.LightGray;
+          visualLine.LineColor = Color.FromArgb(100, visualLine.LineColor);
         }
       }
@@ -205,5 +196,4 @@
     }
     private void removeNodeToolStripMenuItem_Click(object sender, EventArgs e) {
-      lastOp = EditOp.RemoveNode;
       var node = currSelected.SymbolicExpressionTreeNode;
       ModifyTree(Tree, node.Parent, node, null, removeSubtree: false);
@@ -211,5 +201,4 @@
     }
     private void removeSubtreeToolStripMenuItem_Click(object sender, EventArgs e) {
-      lastOp = EditOp.RemoveNode;
       var node = currSelected.SymbolicExpressionTreeNode;
       ModifyTree(Tree, node.Parent, node, null, removeSubtree: true);
@@ -227,6 +216,8 @@
       switch (lastOp) {
         case EditOp.CutSubtree: {
+            if (tempNode.IterateNodesBreadth().Contains(node))
+              goto case EditOp.CopySubtree; // a subtree cannot be cut/pasted onto itself
             ModifyTree(Tree, tempNode.Parent, tempNode, null); //remove node from its original parent
-            ModifyTree(Tree, node, null, tempNode);//insert it as a child to the new parent
+            ModifyTree(Tree, node, null, tempNode); //insert it as a child to the new parent
             lastOp = EditOp.CopySubtree; //do this so the next paste will actually perform a copy   
             break;
@@ -241,4 +232,5 @@
       }
       currSelected = null; // because the tree will have changed
+      tempNode = null; // clear the clipboard after one paste
     }
   }
