Index: branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
===================================================================
--- branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 7408)
+++ branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 7411)
@@ -32,5 +32,5 @@
     private Dictionary<ISymbolicExpressionTreeNode, VisualSymbolicExpressionTreeNode> visualTreeNodes;
     private Dictionary<Tuple<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>, VisualSymbolicExpressionTreeNodeConnection> visualLines;
-    private VisualSymbolicExpressionTreeNode selectedNode = null;
+    private VisualSymbolicExpressionTreeNode selectedNode;
 
     public SymbolicExpressionTreeChart() {
Index: branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
===================================================================
--- branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 7408)
+++ branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 7411)
@@ -217,4 +217,12 @@
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="InteractiveSymbolicDataAnalysisSolutionSimplifierView.resx">
+      <DependentUpon>InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="SymbolicExpressionTreeNodeChangeValueDialog.resx">
+      <DependentUpon>SymbolicExpressionTreeNodeChangeValueDialog.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs
===================================================================
--- branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 7408)
+++ branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 7411)
@@ -53,4 +53,6 @@
       this.treeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
       this.grpViewHost = new System.Windows.Forms.GroupBox();
+      this.btnPrune = new System.Windows.Forms.Button();
+      this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
       this.splitContainer.Panel1.SuspendLayout();
@@ -64,6 +66,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";
@@ -97,4 +99,5 @@
       // grpSimplify
       // 
+      this.grpSimplify.AutoSize = true;
       this.grpSimplify.Controls.Add(this.flowLayoutPanel);
       this.grpSimplify.Controls.Add(this.treeChart);
@@ -109,7 +112,8 @@
       // flowLayoutPanel
       // 
-      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+      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.btnPrune);
       this.flowLayoutPanel.Controls.Add(this.btnOptimizeConstants);
       this.flowLayoutPanel.Location = new System.Drawing.Point(6, 313);
@@ -133,5 +137,5 @@
       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.Location = new System.Drawing.Point(205, 3);
       this.btnOptimizeConstants.Name = "btnOptimizeConstants";
       this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
@@ -143,6 +147,6 @@
       // 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;
@@ -171,4 +175,20 @@
       this.grpViewHost.Text = "Details";
       // 
+      // btnPrune
+      // 
+      this.btnPrune.Location = new System.Drawing.Point(104, 3);
+      this.btnPrune.Name = "btnPrune";
+      this.btnPrune.Size = new System.Drawing.Size(95, 23);
+      this.btnPrune.TabIndex = 3;
+      this.btnPrune.Text = "Prune";
+      this.btnPrune.UseVisualStyleBackColor = true;
+      this.btnPrune.Click += new System.EventHandler(this.btnPrune_Click);
+      // 
+      // backgroundWorker1
+      // 
+      this.backgroundWorker1.WorkerSupportsCancellation = true;
+      this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
+      this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
+      // 
       // InteractiveSymbolicDataAnalysisSolutionSimplifierView
       // 
@@ -179,4 +199,5 @@
       this.Size = new System.Drawing.Size(564, 348);
       this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel1.PerformLayout();
       this.splitContainer.Panel2.ResumeLayout(false);
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
@@ -199,4 +220,6 @@
     private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
     protected System.Windows.Forms.Button btnOptimizeConstants;
+    private System.Windows.Forms.Button btnPrune;
+    private System.ComponentModel.BackgroundWorker backgroundWorker1;
   }
 }
Index: branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
===================================================================
--- branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 7408)
+++ branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 7411)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Drawing;
 using System.Linq;
@@ -36,4 +37,5 @@
     private Dictionary<ISymbolicExpressionTreeNode, double> originalValues;
     private bool updateInProgress = false;
+    private VisualSymbolicExpressionTreeNode visualTreeNode; // need some kind of state for correctly handling events 
 
     public InteractiveSymbolicDataAnalysisSolutionSimplifierView() {
@@ -129,5 +131,5 @@
 
     private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
-      VisualSymbolicExpressionTreeNode visualTreeNode = (VisualSymbolicExpressionTreeNode)sender;
+      visualTreeNode = (VisualSymbolicExpressionTreeNode)sender;
       var tree = Content.Model.SymbolicExpressionTree;
       // check if the node value/weight has been altered
@@ -189,6 +191,5 @@
 
     private void treeChart_SymbolicExpressionTreeNodeChanged(object sender, EventArgs e) {
-      var tree = Content.Model.SymbolicExpressionTree;
-      var visualTreeNode = sender as VisualSymbolicExpressionTreeNode;
+      visualTreeNode = sender as VisualSymbolicExpressionTreeNode;
       var subTree = visualTreeNode.SymbolicExpressionTreeNode;
       string title = String.Empty;
@@ -203,20 +204,31 @@
       }
 
+      double originalValue = value;
+
       if (!originalValues.ContainsKey(subTree))
         originalValues.Add(subTree, value);
-      var dialog = new ValueChangeDialog(title, Math.Round(value,4).ToString());
+      else originalValue = originalValues[subTree];
+
+      var dialog = new ValueChangeDialog(title, Math.Round(originalValue, 4).ToString(), Math.Round(value, 4).ToString());
+      dialog.NewValueTextBox.Validated += OnNewValueValidated;
       dialog.ShowDialog(this);
-      if (dialog.DialogResult == DialogResult.OK) {
-        value = double.Parse(dialog.NewValue);
-        if (subTree.Symbol is Constant)
-          (subTree as ConstantTreeNode).Value = value;
-        else if (subTree.Symbol is Variable)
-          (subTree as VariableTreeNode).Weight = value;
-        // show only interesting part of solution 
-        treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
-        updateInProgress = true;
-        UpdateModel(tree);
-        updateInProgress = false;
-      }
+    }
+
+    private void OnNewValueValidated(object sender, EventArgs e) {
+      var textBox = sender as TextBox;
+      var value = double.Parse(textBox.Text);
+      var subTree = visualTreeNode.SymbolicExpressionTreeNode;
+      var tree = Content.Model.SymbolicExpressionTree;
+
+      if (subTree.Symbol is Constant)
+        (subTree as ConstantTreeNode).Value = value;
+      else if (subTree.Symbol is Variable)
+        (subTree as VariableTreeNode).Weight = value;
+
+      // show only interesting part of solution 
+      treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
+      updateInProgress = true;
+      UpdateModel(tree);
+      updateInProgress = false;
     }
 
@@ -238,7 +250,16 @@
       double min = impacts.Min();
       foreach (ISymbolicExpressionTreeNode treeNode in Content.Model.SymbolicExpressionTree.IterateNodesPostfix()) {
+        VisualSymbolicExpressionTreeNode visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
+        bool flag1 = replacementNodes.ContainsKey(treeNode);
+        bool flag2 = originalValues.ContainsKey(treeNode);
+        bool flag3 = treeNode is ConstantTreeNode;
+
+        if (flag2) // constant or variable node was changed
+          visualTree.ToolTip += Environment.NewLine + "Original value: " + originalValues[treeNode];
+        else if (flag1 && flag3) // node was folded to a constant
+          visualTree.ToolTip += Environment.NewLine + "Original node: " + replacementNodes[treeNode];
+
         if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
           double impact = nodeImpacts[treeNode];
-          VisualSymbolicExpressionTreeNode visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
 
           // impact = 0 if no change
@@ -267,12 +288,10 @@
     private void PaintCollapsedNodes() {
       foreach (ISymbolicExpressionTreeNode treeNode in Content.Model.SymbolicExpressionTree.IterateNodesPostfix()) {
-        if (originalValues.ContainsKey(treeNode)) 
-          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.Blue;
-        else if (treeNode is ConstantTreeNode && replacementNodes.ContainsKey(treeNode))
-          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.DarkOrange;
-        else {
-          VisualSymbolicExpressionTreeNode visNode = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
-          if (visNode != null)
-            visNode.LineColor = Color.Black;
+        bool flag1 = replacementNodes.ContainsKey(treeNode);
+        bool flag2 = originalValues.ContainsKey(treeNode);
+        if (flag1 && treeNode is ConstantTreeNode) {
+          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = flag2 ? Color.DarkViolet : Color.DarkOrange;
+        } else if (flag2) {
+          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.DodgerBlue;
         }
       }
@@ -285,5 +304,61 @@
     }
 
+    private void btnPrune_Click(object sender, EventArgs e) {
+      backgroundWorker1.RunWorkerAsync();
+    }
+
+    private static IEnumerable<ISymbolicExpressionTreeNode> GetNodesAtDepth(ISymbolicExpressionTreeNode root, Data.IntRange range) {
+      var list = new List<Tuple<ISymbolicExpressionTreeNode, int>> { new Tuple<ISymbolicExpressionTreeNode, int>(root, 0) };
+      int offset = 0;
+      int level = 0;
+      while (level < range.End) {
+        ++level;
+        int count = list.Count;
+        for (int i = offset; i != count; ++i) {
+          if (list[i].Item1.Subtrees.Any())
+            list.AddRange(from s in list[i].Item1.Subtrees select new Tuple<ISymbolicExpressionTreeNode, int>(s, level));
+        }
+        offset = count;
+      }
+      // taking advantage of the fact that the list is already sorted by level
+      for (int i = list.Count - 1; i >= 0; --i) {
+        if (list[i].Item2 >= range.Start)
+          yield return list[i].Item1;
+        else break;
+      }
+    }
+
     protected abstract void btnOptimizeConstants_Click(object sender, EventArgs e);
+
+    private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) {
+      BackgroundWorker worker = sender as BackgroundWorker;
+      PruneTree(worker);
+
+    }
+
+    private void PruneTree(BackgroundWorker worker) {
+      var tree = Content.Model.SymbolicExpressionTree;
+      // get all tree nodes 
+      foreach (var node in GetNodesAtDepth(tree.Root, new Data.IntRange(2, tree.Depth))) {
+        if (worker.CancellationPending)
+          break; // pruning cancelled
+        if (!(node.Symbol is Constant) && nodeImpacts.ContainsKey(node) && nodeImpacts[node] < 0.001) {
+          SwitchNodeWithReplacementNode(node.Parent, node.Parent.IndexOfSubtree(node));
+          CalculateReplacementNodesAndNodeImpacts();
+        }
+      }
+    }
+
+    private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
+      if (e.Cancelled) {
+        // The user canceled the operation.
+      } else if (e.Error != null) {
+        // There was an error during the operation.
+        // Error-handling
+      } else {
+        // The operation completed normally. We can update the model
+        UpdateModel(Content.Model.SymbolicExpressionTree);
+      }
+    }
   }
 }
Index: branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicExpressionTreeNodeChangeValueDialog.Designer.cs
===================================================================
--- branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicExpressionTreeNodeChangeValueDialog.Designer.cs	(revision 7408)
+++ branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicExpressionTreeNodeChangeValueDialog.Designer.cs	(revision 7411)
@@ -46,7 +46,6 @@
     private void InitializeComponent() {
       this.components = new System.ComponentModel.Container();
-      this.okButton = new System.Windows.Forms.Button();
-      this.oldValueLabel = new System.Windows.Forms.Label();
-      this.oldValueTextBox = new System.Windows.Forms.TextBox();
+      this.originalValueLabel = new System.Windows.Forms.Label();
+      this.originalValueTextBox = new System.Windows.Forms.TextBox();
       this.newValueTextBox = new System.Windows.Forms.TextBox();
       this.newValueLabel = new System.Windows.Forms.Label();
@@ -55,33 +54,20 @@
       this.SuspendLayout();
       // 
-      // okButton
+      // originalValueLabel
       // 
-      this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
-      this.okButton.Enabled = false;
-      this.okButton.Location = new System.Drawing.Point(66, 74);
-      this.okButton.Name = "okButton";
-      this.okButton.Size = new System.Drawing.Size(75, 23);
-      this.okButton.TabIndex = 0;
-      this.okButton.Text = "&OK";
-      this.okButton.UseVisualStyleBackColor = true;
-      this.okButton.Click += new System.EventHandler(this.okButton_Click);
+      this.originalValueLabel.AutoSize = true;
+      this.originalValueLabel.Location = new System.Drawing.Point(14, 15);
+      this.originalValueLabel.Name = "originalValueLabel";
+      this.originalValueLabel.Size = new System.Drawing.Size(72, 13);
+      this.originalValueLabel.TabIndex = 2;
+      this.originalValueLabel.Text = "Original Value";
       // 
-      // oldValueLabel
+      // originalValueTextBox
       // 
-      this.oldValueLabel.AutoSize = true;
-      this.oldValueLabel.Location = new System.Drawing.Point(14, 15);
-      this.oldValueLabel.Name = "oldValueLabel";
-      this.oldValueLabel.Size = new System.Drawing.Size(53, 13);
-      this.oldValueLabel.TabIndex = 2;
-      this.oldValueLabel.Text = "Old Value";
-      // 
-      // oldValueTextBox
-      // 
-      this.oldValueTextBox.Location = new System.Drawing.Point(91, 12);
-      this.oldValueTextBox.Name = "oldValueTextBox";
-      this.oldValueTextBox.ReadOnly = true;
-      this.oldValueTextBox.Size = new System.Drawing.Size(100, 20);
-      this.oldValueTextBox.TabIndex = 3;
+      this.originalValueTextBox.Location = new System.Drawing.Point(91, 12);
+      this.originalValueTextBox.Name = "originalValueTextBox";
+      this.originalValueTextBox.ReadOnly = true;
+      this.originalValueTextBox.Size = new System.Drawing.Size(100, 20);
+      this.originalValueTextBox.TabIndex = 3;
       // 
       // newValueTextBox
@@ -90,5 +76,5 @@
       this.newValueTextBox.Name = "newValueTextBox";
       this.newValueTextBox.Size = new System.Drawing.Size(100, 20);
-      this.newValueTextBox.TabIndex = 4;
+      this.newValueTextBox.TabIndex = 0;
       this.newValueTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.newValueTextBox_KeyDown);
       this.newValueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.newValueTextBox_Validating);
@@ -98,5 +84,5 @@
       // 
       this.newValueLabel.AutoSize = true;
-      this.newValueLabel.Location = new System.Drawing.Point(8, 41);
+      this.newValueLabel.Location = new System.Drawing.Point(14, 41);
       this.newValueLabel.Name = "newValueLabel";
       this.newValueLabel.Size = new System.Drawing.Size(59, 13);
@@ -115,10 +101,9 @@
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.AutoSize = true;
-      this.ClientSize = new System.Drawing.Size(209, 109);
+      this.ClientSize = new System.Drawing.Size(209, 71);
       this.Controls.Add(this.newValueLabel);
       this.Controls.Add(this.newValueTextBox);
-      this.Controls.Add(this.oldValueTextBox);
-      this.Controls.Add(this.oldValueLabel);
-      this.Controls.Add(this.okButton);
+      this.Controls.Add(this.originalValueTextBox);
+      this.Controls.Add(this.originalValueLabel);
       this.MaximizeBox = false;
       this.MinimizeBox = false;
@@ -136,7 +121,6 @@
     #endregion
 
-    protected System.Windows.Forms.Button okButton;
-    private System.Windows.Forms.Label oldValueLabel;
-    private System.Windows.Forms.TextBox oldValueTextBox;
+    private System.Windows.Forms.Label originalValueLabel;
+    private System.Windows.Forms.TextBox originalValueTextBox;
     private System.Windows.Forms.TextBox newValueTextBox;
     private System.Windows.Forms.Label newValueLabel;
Index: branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicExpressionTreeNodeChangeValueDialog.cs
===================================================================
--- branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicExpressionTreeNodeChangeValueDialog.cs	(revision 7408)
+++ branches/HeuristicLab.TreeSimplifierView/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicExpressionTreeNodeChangeValueDialog.cs	(revision 7411)
@@ -24,5 +24,4 @@
 using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Data;
 
@@ -38,11 +37,11 @@
       }
     }
-    public string OldValue {
-      get { return oldValueTextBox.Text; }
+    public string OriginalValue {
+      get { return originalValueTextBox.Text; }
       set {
         if (InvokeRequired)
           Invoke(new Action<string>(x => this.NewValue = x), value);
         else
-          oldValueTextBox.Text = value;
+          originalValueTextBox.Text = value;
       }
     }
@@ -56,13 +55,17 @@
       }
     }
+    public TextBox NewValueTextBox {
+      get { return newValueTextBox; }
+    }
 
     public ValueChangeDialog() {
       InitializeComponent();
+      originalValueTextBox.TabStop = false; // cannot receive focus using tab key
     }
-    public ValueChangeDialog(string caption, string oldValue)
+    public ValueChangeDialog(string caption, string originalValue, string newValue)
       : this() {
       Caption = caption;
-      OldValue = oldValue;
-      NewValue = string.Empty;
+      OriginalValue = originalValue;
+      NewValue = newValue;
     }
 
@@ -84,5 +87,4 @@
       if (!Validate(newValueTextBox.Text, out errorMessage)) {
         e.Cancel = true;
-        okButton.Enabled = false;
         errorProvider.SetError(newValueTextBox, errorMessage);
         newValueTextBox.SelectAll();
@@ -91,5 +93,4 @@
     private void newValueTextBox_Validated(object sender, EventArgs e) {
       errorProvider.SetError(newValueTextBox, string.Empty);
-      okButton.Enabled = true;
     }
 
