Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10308)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10310)
@@ -94,4 +94,5 @@
     <Compile Include="Interfaces\ILineChartLogic.cs" />
     <Compile Include="Interfaces\ITransformationLogic.cs" />
+    <Compile Include="PreprocessingCloner.cs" />
     <Compile Include="Views\FilterView.cs">
       <SubType>UserControl</SubType>
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/PreprocessingCloner.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/PreprocessingCloner.cs	(revision 10310)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/PreprocessingCloner.cs	(revision 10310)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.DataPreprocessing {
+  internal class PreprocessingCloner {
+
+    private readonly IPreprocessingContext context;
+
+    public PreprocessingCloner(IPreprocessingContext context) {
+      this.context = context;
+    }
+
+    public IItem GenerateAlteredClone(IItem obj) {
+      IPreprocessingData data = context.Data;
+
+      Dataset dataset = data.ExportToDataset();
+      var variables = new CheckedItemList<StringValue>(data.VariableNames.Select(s => new StringValue(s))).AsReadOnly();
+
+      var cloner = new Cloner();
+
+      cloner.RegisterClonedObject(context.DataAnalysisProblemData.Dataset, dataset);
+      cloner.RegisterClonedObject(context.DataAnalysisProblemData.TrainingPartition, data.TrainingPartition);
+      cloner.RegisterClonedObject(context.DataAnalysisProblemData.TestPartition, data.TestPartition);
+      cloner.RegisterClonedObject(context.DataAnalysisProblemData.InputVariables, variables);
+      if (context.Algorithm != null) {
+        cloner.RegisterClonedObject(context.Algorithm.Runs, new RunCollection { OptimizerName = context.Algorithm.Name });
+      }
+
+      return cloner.Clone(obj);
+    }
+  }
+}
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs	(revision 10308)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs	(revision 10310)
@@ -1,13 +1,9 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Windows.Forms;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Data;
 using HeuristicLab.MainForm;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.DataPreprocessing {
@@ -25,9 +21,7 @@
     private Dictionary<ListViewItem, IItem> listViewItemItemMapping;
 
-
     public DataPreprocessingView() {
       InitializeComponent();
     }
-
 
     protected override void OnContentChanged() {
@@ -105,4 +99,7 @@
 
     private void exportProblemButton_Click(object sender, EventArgs e) {
+      var cloner = new PreprocessingCloner(Content);
+      var alteredClone = cloner.GenerateAlteredClone(Content.Problem);
+
       var saveFileDialog = new SaveFileDialog {
         Title = "Save Item",
@@ -112,5 +109,5 @@
       };
 
-      var content = Content.Problem as IStorableContent;
+      var content = alteredClone as IStorableContent;
       if (saveFileDialog.ShowDialog() == DialogResult.OK) {
         bool compressed = saveFileDialog.FilterIndex != 1;
@@ -120,34 +117,19 @@
 
     private void applyInNewTabButton_Click(object sender, EventArgs e) {
-      IPreprocessingData Data = Content.Data;
+      IPreprocessingData data = Content.Data;
 
-      foreach (string variable in Data.VariableNames) {
-        for (int j = 0; j < Data.Rows; j++) {
+      foreach (string variable in data.VariableNames) {
+        for (int j = 0; j < data.Rows; j++) {
           // assume: all double
-          Data.SetCell(variable, j, 1.0);
+          data.SetCell(variable, j, 1.0);
         }
       }
-
       MessageBox.Show("Success, now cloning... ");
 
-      Dataset dataset = Data.ExportToDataset();
-      var variables = new CheckedItemList<StringValue>(Data.VariableNames.Select(s => new StringValue(s))).AsReadOnly();
-
-      var cloner = new Cloner();
-
-      cloner.RegisterClonedObject(Content.DataAnalysisProblemData.Dataset, dataset);
-      cloner.RegisterClonedObject(Content.DataAnalysisProblemData.TrainingPartition, Data.TrainingPartition);
-      cloner.RegisterClonedObject(Content.DataAnalysisProblemData.TestPartition, Data.TestPartition);
-      cloner.RegisterClonedObject(Content.DataAnalysisProblemData.InputVariables, variables);
-      if (Content.Algorithm != null) {
-        cloner.RegisterClonedObject(Content.Algorithm.Runs, new RunCollection { OptimizerName = Content.Algorithm.Name });
-      }
-
-      var item = cloner.Clone(Content.ParentItem);
+      var cloner = new PreprocessingCloner(Content);
+      var item = cloner.GenerateAlteredClone(Content.ParentItem);
 
       MainFormManager.MainForm.ShowContent(item);
     }
-
   }
 }
-
