Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10246)
@@ -78,4 +78,6 @@
   <ItemGroup>
     <Compile Include="Implementations\DataGridLogic.cs" />
+    <Compile Include="Interfaces\IDataGridLogic.cs" />
+    <Compile Include="Interfaces\IPreprocessingDataManipulation.cs" />
     <Compile Include="Implementations\FilterContent.cs" />
     <Compile Include="Implementations\FilterLogic.cs" />
@@ -92,5 +94,4 @@
     <Compile Include="Interfaces\ILineChartLogic.cs" />
     <Compile Include="Interfaces\IStatisticsLogic.cs" />
-    <Compile Include="Interfaces\IDataGridLogic.cs" />
     <Compile Include="Interfaces\ITransformationLogic.cs" />
     <Compile Include="Views\DataPreprocessingView.cs">
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs	(revision 10246)
@@ -1,49 +1,43 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Data;
+using System.Drawing;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Common;
-using System.Drawing;
 
 namespace HeuristicLab.DataPreprocessing {
 
   [Item("DataGridContent", "Represents a data grid.")]
-    public class DataGridContent : Item,IDataGridContent,IContent
-    {
-    private readonly IPreprocessingData preprocessingData;
-   
-    public DataGridContent(IPreprocessingData thePreprocessingData) {
-      preprocessingData = thePreprocessingData;
+  public class DataGridContent : Item, IDataGridContent, IContent {
+
+    private readonly IDataGridLogic dataGridLogic;
+    public DataGridContent(IDataGridLogic theDataGridLogic) {
+      dataGridLogic = theDataGridLogic;
     }
 
     public DataGridContent(DataGridContent dataGridContent, Cloner cloner)
-        : base(dataGridContent, cloner)
-    {
+      : base(dataGridContent, cloner) {
 
     }
 
-    public IDataGridLogic DataGridLogic { get; set; }
-
-    public static new Image StaticItemImage
-    {
-        get { return HeuristicLab.Common.Resources.VSImageLibrary.Table; }
+    public IDataGridLogic DataGridLogic {
+      get {
+        return dataGridLogic;
+      }
     }
 
-    public override IDeepCloneable Clone(Cloner cloner)
-    {
-        return new DataGridContent(this, cloner);
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Table; }
     }
 
-    #region IStringConvertibleMatrix Members
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DataGridContent(this, cloner);
+    }
 
     public int Rows {
       get {
-        return preprocessingData.Rows;
+        return dataGridLogic.Rows;
       }
       set {
-        //does nothing, use something else :P
+        //does nothing
       }
     }
@@ -51,8 +45,8 @@
     public int Columns {
       get {
-        return preprocessingData.Columns;
+        return dataGridLogic.Columns;
       }
       set {
-        //does nothing, use something else :P
+        //does nothing
       }
     }
@@ -60,8 +54,8 @@
     public IEnumerable<string> ColumnNames {
       get {
-        return preprocessingData.VariableNames;
+        return dataGridLogic.ColumnNames;
       }
       set {
-        //not supported 
+
       }
     }
@@ -69,8 +63,8 @@
     public IEnumerable<string> RowNames {
       get {
-        return Enumerable.Range(1, Rows).Select(n => n.ToString());
+        return dataGridLogic.RowNames;
       }
       set {
-        //not supported 
+        //not supported
       }
     }
@@ -81,10 +75,10 @@
       }
       set {
-        //not supported 
+        //not supported
       }
     }
 
     public bool ReadOnly {
-      get { return false; }
+      get { return true; }
     }
 
@@ -95,65 +89,13 @@
 
     public bool Validate(string value, out string errorMessage, int columnIndex) {
-      if (columnIndex < 0 || columnIndex > preprocessingData.VariableNames.Count()) {
-        throw new ArgumentOutOfRangeException("column index is out of range");
-      }
-      bool valid = false;
-      string variableName = preprocessingData.GetVariableName(columnIndex);
-      if (preprocessingData.IsType<double>(variableName)) {
-        double val;
-        valid = double.TryParse(value, out val);
-        errorMessage = string.Empty;
-        if (!valid) {
-          errorMessage = "Invalid Value (Valid Value Format: \"" + FormatPatterns.GetDoubleFormatPattern() + "\")";
-        }
-      } else if (preprocessingData.IsType<string>(variableName)) {
-        valid = value != null;
-        errorMessage = string.Empty;
-        if (!valid) {
-          errorMessage = "Invalid Value (string must not be null)";
-        }
-      } else if (preprocessingData.IsType<DateTime>(variableName)) {
-        DateTime date;
-        valid = DateTime.TryParse(value, out date);
-        errorMessage = string.Empty;
-        if (!valid) {
-          errorMessage = "Invalid Value (Valid Value Format: \"" + CultureInfo.CurrentCulture.DateTimeFormat + "\"";
-        }
-      } else {
-        throw new ArgumentException("column with variableName: " + variableName + " contains a non supported type.");
-      }
-
-      return valid;
+      return dataGridLogic.Validate(value, out errorMessage, columnIndex);
     }
 
     public string GetValue(int rowIndex, int columnIndex) {
-      return preprocessingData.GetCellAsString(preprocessingData.GetVariableName(columnIndex), rowIndex);
+      return dataGridLogic.GetValue(rowIndex, columnIndex);
     }
 
     public bool SetValue(string value, int rowIndex, int columnIndex) {
-      string variableName = preprocessingData.GetVariableName(columnIndex);
-      bool valid = false;
-      if (preprocessingData.IsType<double>(variableName)) {
-        double val;
-        valid = double.TryParse(value, out val);
-        if (valid) {
-          preprocessingData.SetCell<double>(variableName, rowIndex, val);
-        }
-      } else if (preprocessingData.IsType<string>(variableName)) {
-        valid = value != null;
-        if (valid) {
-          preprocessingData.SetCell<string>(variableName, rowIndex, value);
-        }
-      } else if (preprocessingData.IsType<DateTime>(variableName)) {
-        DateTime date;
-        valid = DateTime.TryParse(value, out date);
-        if (valid) {
-          preprocessingData.SetCell<DateTime>(variableName, rowIndex, date);
-        }
-      } else {
-        throw new ArgumentException("column with variableName: " + variableName + " contains a non supported type.");
-      }
-
-      return valid;
+      return dataGridLogic.SetValue(value, rowIndex, columnIndex);
     }
 
@@ -168,9 +110,8 @@
     public event EventHandler SortableViewChanged;
 
-    public event EventHandler<Common.EventArgs<int, int>> ItemChanged;
+    public event EventHandler<EventArgs<int, int>> ItemChanged;
 
     public event EventHandler Reset;
 
-    #endregion
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridLogic.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridLogic.cs	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridLogic.cs	(revision 10246)
@@ -1,7 +1,7 @@
 ﻿using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
-using System.Text;
-using HeuristicLab.DataPreprocessing;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.DataPreprocessing {
@@ -14,33 +14,107 @@
     }
 
-    public IEnumerable<string> GetVariableNames()
-    {
-      return preprocessingData.VariableNames;
+    public int Rows {
+      get {
+        return preprocessingData.Rows;
+      }
     }
 
-    public IList<IList<string>> GetAllValues() {
+    public int Columns {
+      get {
+        return preprocessingData.Columns;
+      }
+    }
 
-      IEnumerable<string> variableNames = preprocessingData.VariableNames;
-      IList<IList<string>> allValues = new List<IList<string>>();
+    public IEnumerable<string> ColumnNames {
+      get {
+        return preprocessingData.VariableNames;
+      }
+    }
 
-      IList<IEnumerable<string>> columnValuesList = new List<IEnumerable<string>>();
+    public IEnumerable<string> RowNames {
+      get {
+        return Enumerable.Range(1, Rows).Select(n => n.ToString());
+      }
+    }
 
-      foreach (string variableName in variableNames) {
-
-        columnValuesList.Add(preprocessingData.GetValues<string>(variableName));
+    public bool Validate(string value, out string errorMessage, int columnIndex) {
+      if (columnIndex < 0 || columnIndex > preprocessingData.VariableNames.Count()) {
+        throw new ArgumentOutOfRangeException("column index is out of range");
+      }
+      bool valid = false;
+      string variableName = preprocessingData.GetVariableName(columnIndex);
+      if (preprocessingData.IsType<double>(variableName)) {
+        double val;
+        valid = double.TryParse(value, out val);
+        errorMessage = string.Empty;
+        if (!valid) {
+          errorMessage = "Invalid Value (Valid Value Format: \"" + FormatPatterns.GetDoubleFormatPattern() + "\")";
+        }
+      } else if (preprocessingData.IsType<string>(variableName)) {
+        valid = value != null;
+        errorMessage = string.Empty;
+        if (!valid) {
+          errorMessage = "Invalid Value (string must not be null)";
+        }
+      } else if (preprocessingData.IsType<DateTime>(variableName)) {
+        DateTime date;
+        valid = DateTime.TryParse(value, out date);
+        errorMessage = string.Empty;
+        if (!valid) {
+          errorMessage = "Invalid Value (Valid Value Format: \"" + CultureInfo.CurrentCulture.DateTimeFormat + "\"";
+        }
+      } else {
+        throw new ArgumentException("column with variableName: " + variableName + " contains a non supported type.");
       }
 
+      return valid;
+    }
 
-      if (columnValuesList.Count > 0) {
-        for (int i = 0; i < columnValuesList.ElementAt(0).Count(); i++) {
-          allValues.Add(new List<string>());
-          foreach (IEnumerable<string> columnValues in columnValuesList) {
-            allValues[i].Add(columnValues.ElementAt(i));
-          }
+    public string GetValue(int rowIndex, int columnIndex) {
+      return preprocessingData.GetCellAsString(preprocessingData.GetVariableName(columnIndex), rowIndex);
+    }
+
+    public bool SetValue(string value, int rowIndex, int columnIndex) {
+      string variableName = preprocessingData.GetVariableName(columnIndex);
+      bool valid = false;
+      if (preprocessingData.IsType<double>(variableName)) {
+        double val;
+        valid = double.TryParse(value, out val);
+        if (valid) {
+          preprocessingData.SetCell<double>(variableName, rowIndex, val);
         }
+      } else if (preprocessingData.IsType<string>(variableName)) {
+        valid = value != null;
+        if (valid) {
+          preprocessingData.SetCell<string>(variableName, rowIndex, value);
+        }
+      } else if (preprocessingData.IsType<DateTime>(variableName)) {
+        DateTime date;
+        valid = DateTime.TryParse(value, out date);
+        if (valid) {
+          preprocessingData.SetCell<DateTime>(variableName, rowIndex, date);
+        }
+      } else {
+        throw new ArgumentException("column with variableName: " + variableName + " contains a non supported type.");
       }
-      return allValues;
+
+      return valid;
     }
-    
+
+    public event EventHandler ColumnsChanged;
+
+    public event EventHandler RowsChanged;
+
+    public event EventHandler ColumnNamesChanged;
+
+    public event EventHandler RowNamesChanged;
+
+    public event EventHandler SortableViewChanged;
+
+    public event EventHandler<Common.EventArgs<int, int>> ItemChanged;
+
+    public event EventHandler Reset;
+
+
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs	(revision 10246)
@@ -5,7 +5,7 @@
 using System.Text;
 
-namespace HeuristicLab.DataPreprocessing.Implementations
+namespace HeuristicLab.DataPreprocessing
 {
-    class PreprocessingDataManipulation
+    class PreprocessingDataManipulation : IPreprocessingDataManipulation
     {
         private IPreprocessingData preprocessingData;
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridContent.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridContent.cs	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridContent.cs	(revision 10246)
@@ -7,5 +7,5 @@
 namespace HeuristicLab.DataPreprocessing {
   public interface IDataGridContent : IStringConvertibleMatrix {
-    bool Validate(string value, out string errorMessage, int columnIndex);
+    IDataGridLogic DataGridLogic { get; }
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridLogic.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridLogic.cs	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridLogic.cs	(revision 10246)
@@ -1,13 +1,13 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
+﻿using System.Collections.Generic;
 namespace HeuristicLab.DataPreprocessing {
   public interface IDataGridLogic {
+    IEnumerable<string> ColumnNames { get; }
+    IEnumerable<string> RowNames { get; }
+    int Columns { get; }
+    int Rows { get; }
 
-    IEnumerable<string> GetVariableNames();
-
-    IList<IList<string>> GetAllValues();
+    string GetValue(int rowIndex, int columnIndex);
+    bool SetValue(string value, int rowIndex, int columnIndex);
+    bool Validate(string value, out string errorMessage, int columnIndex);
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingDataManipulation.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingDataManipulation.cs	(revision 10246)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingDataManipulation.cs	(revision 10246)
@@ -0,0 +1,14 @@
+﻿using System;
+using System.Collections.Generic;
+namespace HeuristicLab.DataPreprocessing {
+  interface IPreprocessingDataManipulation {
+    void reOrderToIndices<T>(string variableName, List<Tuple<int, int>> indices);
+    void ReplaceIndicesByAverageValue(string variableName, IEnumerable<int> indices);
+    void ReplaceIndicesByLinearInterpolationOfNeighbours(string variableName, IEnumerable<int> indices);
+    void ReplaceIndicesByMedianValue(string variableName, IEnumerable<int> indices);
+    void ReplaceIndicesByMostCommonValue(string variableName, IEnumerable<int> indices);
+    void ReplaceIndicesByRandomValue(string variableName, IEnumerable<int> indices);
+    void ReplaceIndicesByValue<T>(string variableName, IEnumerable<int> indices, T value);
+    void ShuffleWithRanges(IEnumerable<HeuristicLab.Data.IntRange> ranges);
+  }
+}
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataGridContentView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataGridContentView.cs	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataGridContentView.cs	(revision 10246)
@@ -29,5 +29,5 @@
       if (!dataGridView.ReadOnly) {
         string errorMessage;
-        if (Content != null && !Content.Validate(e.FormattedValue.ToString(), out errorMessage, e.ColumnIndex)) {
+        if (Content != null && !Content.DataGridLogic.Validate(e.FormattedValue.ToString(), out errorMessage, e.ColumnIndex)) {
           e.Cancel = true;
           dataGridView.Rows[e.RowIndex].ErrorText = errorMessage;
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs	(revision 10245)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs	(revision 10246)
@@ -45,5 +45,5 @@
 
     private void InitializeContents() {
-      dataGridContent = new DataGridContent(this.Content);
+      dataGridContent = new DataGridContent(new DataGridLogic(this.Content));
 
       listViewItemItemMapping = new Dictionary<ListViewItem,IItem>();
