Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs	(revision 15269)
@@ -52,11 +52,8 @@
 
     private void InitData() {
-      IDictionary<int, IList<int>> missingValueIndices = Content.SearchLogic.GetMissingValueIndices();
-
-      bool[,] valueMissing = new bool[Content.SearchLogic.Rows, Content.SearchLogic.Columns];
-      foreach (var columnMissingValues in missingValueIndices) {
-        var column = columnMissingValues.Key;
-        foreach (var missingValueIndex in columnMissingValues.Value)
-          valueMissing[missingValueIndex, column] = true;
+      bool[,] valueMissing = new bool[Content.PreprocessingData.Rows, Content.PreprocessingData.Columns];
+      for (int row = 0; row < Content.PreprocessingData.Rows; row++) {
+        for (int column = 0; column < Content.PreprocessingData.Columns; column++)
+          valueMissing[row, column] = Content.PreprocessingData.IsCellEmpty(column, row);
       }
 
@@ -78,5 +75,5 @@
       //custom x axis label
       double from = 0.5;
-      foreach (String columnName in Content.SearchLogic.VariableNames) {
+      foreach (String columnName in Content.PreprocessingData.VariableNames) {
         double to = from + 1;
         chart.ChartAreas[0].AxisX.CustomLabels.Add(from, to, columnName);
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs	(revision 15269)
@@ -50,7 +50,6 @@
         var data = Content.Data;
         var filterLogic = new FilterLogic(data);
-        var searchLogic = new SearchLogic(data, filterLogic);
-        var statisticsLogic = new StatisticsLogic(data, searchLogic);
-        var manipulationLogic = new ManipulationLogic(data, searchLogic, statisticsLogic);
+        var statisticsLogic = new StatisticsLogic(data);
+        var manipulationLogic = new ManipulationLogic(data, statisticsLogic);
 
         var viewShortcuts = new ItemList<IViewShortcut> {
@@ -63,8 +62,8 @@
           new MultiScatterPlotContent(data),
           new CorrelationMatrixContent(Content),
-          new DataCompletenessChartContent(searchLogic),
+          new DataCompletenessChartContent(data),
 
           new FilterContent(filterLogic),
-          new ManipulationContent(manipulationLogic, searchLogic, filterLogic),
+          new ManipulationContent(manipulationLogic, filterLogic),
           new TransformationContent(data, filterLogic)
         };
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs	(revision 15269)
@@ -127,9 +127,11 @@
 
     private void ReplaceMissingValues() {
-      var allIndices = Content.SearchLogic.GetMissingValueIndices();
+      var missingValuesIndices = new List<int>();
       var columnIndex = cmbVariableNames.SelectedIndex;
-      var columnIndices = new Dictionary<int, IList<int>>{
-          {columnIndex,   allIndices[columnIndex]}
-      };
+      var columnIndices = new Dictionary<int, IList<int>> { { columnIndex, missingValuesIndices } };
+
+      for (int rowIndex = 0; rowIndex < Content.ManipulationLogic.PreProcessingData.Rows; rowIndex++)
+        if (Content.ManipulationLogic.PreProcessingData.IsCellEmpty(columnIndex, rowIndex))
+          missingValuesIndices.Add(rowIndex);
 
       switch (cmbReplaceWith.SelectedIndex) {
@@ -165,7 +167,7 @@
           sb.Append(Environment.NewLine);
           sb.Append("Columns: ");
-          sb.Append(Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));
+          sb.Append(Content.ManipulationLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));
           for (int i = 1; i < filteredColumns.Count; i++) {
-            string columnName = Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));
+            string columnName = Content.ManipulationLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));
             sb.Append(", ");
             sb.Append(columnName);
@@ -196,7 +198,7 @@
           sb.Append(Environment.NewLine);
           sb.Append("Columns: ");
-          sb.Append(Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));
+          sb.Append(Content.ManipulationLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));
           for (int i = 1; i < filteredColumns.Count; i++) {
-            string columnName = Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));
+            string columnName = Content.ManipulationLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));
             sb.Append(", ");
             sb.Append(columnName);
@@ -250,6 +252,8 @@
       }
       if (btnApply.Enabled) {
-        var allIndices = Content.SearchLogic.GetMissingValueIndices();
-        int count = allIndices[columnIndex].Count;
+        int count = 0;
+        for (int rowIndex = 0; rowIndex < Content.ManipulationLogic.PreProcessingData.Rows; rowIndex++)
+          if (Content.ManipulationLogic.PreProcessingData.IsCellEmpty(columnIndex, rowIndex)) count++;
+
         int cellCount = Content.FilterLogic.PreprocessingData.Rows * Content.FilterLogic.PreprocessingData.Columns;
         lblPreviewReplaceMissingValues.Text = count + " cell" + (count > 1 || count == 0 ? "s" : "")
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.cs	(revision 15269)
@@ -42,18 +42,16 @@
     //Clone chart items
     protected override void itemsListView_DoubleClick(object sender, EventArgs e) {
-      if (itemsListView.SelectedItems.Count == 1) {
-        IViewShortcut item = itemsListView.SelectedItems[0].Tag as IViewShortcut;
-        if (item != null) {
-          try {
-            item = (IViewShortcut)item.Clone();
-            var view = MainFormManager.MainForm.ShowContent(item);
-            if (view != null) {
-              view.ReadOnly = ReadOnly;
-              view.Locked = Locked;
-            }
-          } catch (NullReferenceException) {
-            // cloning for preprocessing not done properly yet
-          }
+      if (itemsListView.SelectedItems.Count != 1) return;
+      IViewShortcut item = itemsListView.SelectedItems[0].Tag as IViewShortcut;
+      if (item == null) return;
+      try {
+        item = (IViewShortcut)item.Clone();
+        var view = MainFormManager.MainForm.ShowContent(item);
+        if (view != null) {
+          view.ReadOnly = ReadOnly;
+          view.Locked = Locked;
         }
+      } catch (NullReferenceException) {
+        // cloning for preprocessing not done properly yet
       }
     }
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/DataCompletenessChartContent.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/DataCompletenessChartContent.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/DataCompletenessChartContent.cs	(revision 15269)
@@ -32,13 +32,13 @@
     }
 
-    public SearchLogic SearchLogic { get; private set; }
+    public ITransactionalPreprocessingData PreprocessingData { get; private set; }
 
-    public DataCompletenessChartContent(SearchLogic searchLogic) {
-      SearchLogic = searchLogic;
+    public DataCompletenessChartContent(ITransactionalPreprocessingData preprocessingData) {
+      PreprocessingData = preprocessingData;
     }
 
     public DataCompletenessChartContent(DataCompletenessChartContent content, Cloner cloner)
       : base(content, cloner) {
-      SearchLogic = content.SearchLogic;
+      PreprocessingData = content.PreprocessingData;
     }
 
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/ManipulationContent.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/ManipulationContent.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/ManipulationContent.cs	(revision 15269)
@@ -33,10 +33,8 @@
 
     public ManipulationLogic ManipulationLogic { get; private set; }
-    public SearchLogic SearchLogic { get; private set; }
     public FilterLogic FilterLogic { get; private set; }
 
-    public ManipulationContent(ManipulationLogic manipulationLogic, SearchLogic searchLogic, FilterLogic filterLogic) {
+    public ManipulationContent(ManipulationLogic manipulationLogic, FilterLogic filterLogic) {
       ManipulationLogic = manipulationLogic;
-      SearchLogic = searchLogic;
       FilterLogic = filterLogic;
     }
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs	(revision 15269)
@@ -28,5 +28,5 @@
 
 namespace HeuristicLab.DataPreprocessing {
-  public class FilteredPreprocessingData : NamedItem, IFilteredPreprocessingData {
+  public sealed class FilteredPreprocessingData : NamedItem, IFilteredPreprocessingData {
     private readonly ITransactionalPreprocessingData originalData;
     private ITransactionalPreprocessingData filteredData;
@@ -83,5 +83,5 @@
     }
 
-    protected FilteredPreprocessingData(FilteredPreprocessingData original, Cloner cloner)
+    private FilteredPreprocessingData(FilteredPreprocessingData original, Cloner cloner)
       : base(original, cloner) {
       originalData = original.originalData;
@@ -90,4 +90,8 @@
     public override IDeepCloneable Clone(Cloner cloner) {
       return new FilteredPreprocessingData(this, cloner);
+    }
+
+    public bool IsCellEmpty(int columnIndex, int rowIndex) {
+      return ActiveData.IsCellEmpty(columnIndex, rowIndex);
     }
 
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs	(revision 15269)
@@ -28,4 +28,5 @@
 namespace HeuristicLab.DataPreprocessing {
   public interface IPreprocessingData : INamedItem {
+    bool IsCellEmpty(int columnIndex, int rowIndex);
     T GetCell<T>(int columnIndex, int rowIndex);
 
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs	(revision 15269)
@@ -160,6 +160,13 @@
     }
 
+    public static bool IsMissingValue(object value) {
+      if (value is double) return double.IsNaN((double)value);
+      if (value is string) return string.IsNullOrEmpty((string)value);
+      if (value is DateTime) return ((DateTime)value).Equals(DateTime.MinValue);
+      throw new ArgumentException();
+    }
 
     #region IPreprocessingData Members
+    public abstract bool IsCellEmpty(int columnIndex, int rowIndex);
     public abstract T GetCell<T>(int columnIndex, int rowIndex);
 
@@ -173,7 +180,4 @@
 
     public abstract bool VariableHasType<T>(int columnIndex);
-
-    [Obsolete("use the index based variant, is faster")]
-    public abstract IList<T> GetValues<T>(string variableName, bool considerSelection);
 
     public abstract IList<T> GetValues<T>(int columnIndex, bool considerSelection);
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/TransactionalPreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/TransactionalPreprocessingData.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/TransactionalPreprocessingData.cs	(revision 15269)
@@ -88,4 +88,9 @@
 
     #region Overridden IPreprocessingData Members
+    public override bool IsCellEmpty(int columnIndex, int rowIndex) {
+      var value = variableValues[columnIndex][rowIndex];
+      return IsMissingValue(value);
+    }
+
     public override T GetCell<T>(int columnIndex, int rowIndex) {
       return (T)variableValues[columnIndex][rowIndex];
@@ -119,9 +124,4 @@
     public override bool VariableHasType<T>(int columnIndex) {
       return columnIndex >= variableValues.Count || variableValues[columnIndex] is List<T>;
-    }
-
-    [Obsolete("use the index based variant, is faster")]
-    public override IList<T> GetValues<T>(string variableName, bool considerSelection) {
-      return GetValues<T>(GetColumnIndex(variableName), considerSelection);
     }
 
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 15269)
@@ -146,5 +146,4 @@
     <Compile Include="PreprocessingContext.cs" />
     <Compile Include="Data\TransactionalPreprocessingData.cs" />
-    <Compile Include="Logic\SearchLogic.cs" />
     <Compile Include="Logic\StatisticsLogic.cs" />
     <Compile Include="Data\ITransactionalPreprocessingData.cs" />
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/FilterLogic.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/FilterLogic.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/FilterLogic.cs	(revision 15269)
@@ -73,5 +73,5 @@
     }
 
-    public bool Result(bool current, bool addition, bool isAndCombination) {
+    private bool Result(bool current, bool addition, bool isAndCombination) {
       return isAndCombination ? current || addition : current && addition;
     }
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs	(revision 15269)
@@ -30,5 +30,4 @@
     private readonly ITransactionalPreprocessingData preprocessingData;
     private readonly StatisticsLogic statisticsLogic;
-    private readonly SearchLogic searchLogic;
 
     public IEnumerable<string> VariableNames {
@@ -40,7 +39,6 @@
     }
 
-    public ManipulationLogic(ITransactionalPreprocessingData preprocessingData, SearchLogic theSearchLogic, StatisticsLogic theStatisticsLogic) {
+    public ManipulationLogic(ITransactionalPreprocessingData preprocessingData, StatisticsLogic theStatisticsLogic) {
       this.preprocessingData = preprocessingData;
-      searchLogic = theSearchLogic;
       statisticsLogic = theStatisticsLogic;
     }
@@ -187,5 +185,5 @@
     private int indexOfPrevPresentValue(int columnIndex, int start) {
       int offset = start - 1;
-      while (offset >= 0 && searchLogic.IsMissingValue(columnIndex, offset)) {
+      while (offset >= 0 && preprocessingData.IsCellEmpty(columnIndex, offset)) {
         offset--;
       }
@@ -196,5 +194,5 @@
     private int indexOfNextPresentValue(int columnIndex, int start) {
       int offset = start + 1;
-      while (offset < preprocessingData.Rows && searchLogic.IsMissingValue(columnIndex, offset)) {
+      while (offset < preprocessingData.Rows && preprocessingData.IsCellEmpty(columnIndex, offset)) {
         offset++;
       }
Index: anches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/SearchLogic.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/SearchLogic.cs	(revision 15268)
+++ 	(revision )
@@ -1,166 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 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;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace HeuristicLab.DataPreprocessing {
-  public class SearchLogic {
-    private readonly ITransactionalPreprocessingData preprocessingData;
-    private readonly FilterLogic filterLogic;
-
-    private Dictionary<int, IList<int>> MissingValueIndicies { get; set; }
-    private Dictionary<int, IList> ValuesWithoutNaN { get; set; }
-
-    public IEnumerable<string> VariableNames {
-      get { return preprocessingData.VariableNames; }
-    }
-
-    public int Columns {
-      get { return preprocessingData.Columns; }
-    }
-
-    public int Rows {
-      get { return preprocessingData.Rows; }
-    }
-
-    public SearchLogic(ITransactionalPreprocessingData thePreprocessingData, FilterLogic theFilterLogic) {
-      preprocessingData = thePreprocessingData;
-      filterLogic = theFilterLogic;
-
-      MissingValueIndicies = new Dictionary<int, IList<int>>();
-      ValuesWithoutNaN = new Dictionary<int, IList>();
-
-      preprocessingData.Changed += PreprocessingData_Changed;
-      filterLogic.FilterChanged += FilterLogic_FilterChanged;
-    }
-
-    void FilterLogic_FilterChanged(object sender, EventArgs e) {
-      //recalculate
-      for (int i = 0; i < Columns; i++) {
-        MissingValueIndicies.Remove(i);
-        ValuesWithoutNaN.Remove(i);
-      }
-    }
-
-    void PreprocessingData_Changed(object sender, DataPreprocessingChangedEventArgs e) {
-      switch (e.Type) {
-        case DataPreprocessingChangedEventType.DeleteColumn:
-        case DataPreprocessingChangedEventType.ChangeColumn:
-          MissingValueIndicies.Remove(e.Column);
-          ValuesWithoutNaN.Remove(e.Column);
-          break;
-        case DataPreprocessingChangedEventType.AddColumn:
-          //cache does not need to be updated, will be calculated the first time it is requested
-          break;
-        case DataPreprocessingChangedEventType.DeleteRow:
-        case DataPreprocessingChangedEventType.AddRow:
-        case DataPreprocessingChangedEventType.ChangeItem:
-        case DataPreprocessingChangedEventType.Any:
-        case DataPreprocessingChangedEventType.Transformation:
-        default:
-          MissingValueIndicies = new Dictionary<int, IList<int>>();
-          ValuesWithoutNaN = new Dictionary<int, IList>();
-          break;
-      }
-    }
-
-    public IDictionary<int, IList<int>> GetMissingValueIndices() {
-      var dic = new Dictionary<int, IList<int>>();
-      for (int i = 0; i < preprocessingData.Columns; ++i) {
-        dic.Add(i, GetMissingValueIndices(i));
-      }
-      return dic;
-    }
-
-    public IList<int> GetMissingValueIndices(int columnIndex) {
-      int index = 0;
-      var indices = new List<int>();
-
-      if (MissingValueIndicies.ContainsKey(columnIndex)) {
-        return MissingValueIndicies[columnIndex];
-      }
-
-      if (preprocessingData.VariableHasType<double>(columnIndex)) {
-        foreach (var v in preprocessingData.GetValues<double>(columnIndex)) {
-          if (double.IsNaN(v)) indices.Add(index);
-          index++;
-        }
-      } else if (preprocessingData.VariableHasType<string>(columnIndex)) {
-        foreach (var v in preprocessingData.GetValues<string>(columnIndex)) {
-          if (string.IsNullOrEmpty(v)) indices.Add(index);
-          index++;
-        }
-      } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
-        foreach (var v in preprocessingData.GetValues<DateTime>(columnIndex)) {
-          if (DateTime.MinValue.Equals(v)) indices.Add(index);
-          index++;
-        }
-      } else {
-        throw new ArgumentException("column " + columnIndex + " contains a non supported type.");
-      }
-
-      MissingValueIndicies[columnIndex] = indices;
-      return MissingValueIndicies[columnIndex];
-    }
-
-
-    public bool IsMissingValue(int columnIndex, int rowIndex) {
-      if (preprocessingData.VariableHasType<double>(columnIndex)) {
-        return double.IsNaN(preprocessingData.GetCell<double>(columnIndex, rowIndex));
-      } else if (preprocessingData.VariableHasType<string>(columnIndex)) {
-        return string.IsNullOrEmpty(preprocessingData.GetCell<string>(columnIndex, rowIndex));
-      } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
-        return preprocessingData.GetCell<DateTime>(columnIndex, rowIndex).Equals(DateTime.MinValue);
-      } else {
-        throw new ArgumentException("cell in column " + columnIndex + " and row index " + rowIndex + " contains a non supported type.");
-      }
-    }
-
-    public IEnumerable<T> GetValuesWithoutNaN<T>(int columnIndex, bool considerSelection) {
-      if (considerSelection) {
-        var selectedRows = preprocessingData.Selection[columnIndex];
-
-        List<T> values = new List<T>();
-        foreach (var rowIdx in selectedRows) {
-          if (!IsMissingValue(columnIndex, rowIdx)) {
-            values.Add(preprocessingData.GetCell<T>(columnIndex, rowIdx));
-          }
-        }
-        return values;
-      } else {
-        if (!ValuesWithoutNaN.ContainsKey(columnIndex)) {
-          List<T> values = new List<T>();
-
-          for (int row = 0; row < preprocessingData.Rows; ++row) {
-            if (!IsMissingValue(columnIndex, row)) {
-              values.Add(preprocessingData.GetCell<T>(columnIndex, row));
-            }
-          }
-
-          ValuesWithoutNaN[columnIndex] = values;
-        }
-        return (IEnumerable<T>)ValuesWithoutNaN[columnIndex];
-      }
-    }
-  }
-}
Index: /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/StatisticsLogic.cs
===================================================================
--- /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/StatisticsLogic.cs	(revision 15268)
+++ /branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/StatisticsLogic.cs	(revision 15269)
@@ -28,17 +28,15 @@
   public class StatisticsLogic {
     private readonly ITransactionalPreprocessingData preprocessingData;
-    private readonly SearchLogic searchLogic;
-
-    public StatisticsLogic(ITransactionalPreprocessingData thePreprocessingData, SearchLogic theSearchLogic) {
-      preprocessingData = thePreprocessingData;
-      searchLogic = theSearchLogic;
+
+    public StatisticsLogic(ITransactionalPreprocessingData preprocessingData) {
+      this.preprocessingData = preprocessingData;
     }
 
     public int GetColumnCount() {
-      return searchLogic.Columns;
+      return preprocessingData.Columns;
     }
 
     public int GetRowCount() {
-      return searchLogic.Rows;
+      return preprocessingData.Rows;
     }
 
@@ -46,5 +44,5 @@
       int count = 0;
 
-      for (int i = 0; i < searchLogic.Columns; ++i) {
+      for (int i = 0; i < preprocessingData.Columns; ++i) {
         if (preprocessingData.VariableHasType<double>(i)) {
           ++count;
@@ -55,10 +53,10 @@
 
     public int GetNominalColumnCount() {
-      return searchLogic.Columns - GetNumericColumnCount();
+      return preprocessingData.Columns - GetNumericColumnCount();
     }
 
     public int GetMissingValueCount() {
       int count = 0;
-      for (int i = 0; i < searchLogic.Columns; ++i) {
+      for (int i = 0; i < preprocessingData.Columns; ++i) {
         count += GetMissingValueCount(i);
       }
@@ -67,5 +65,14 @@
 
     public int GetMissingValueCount(int columnIndex) {
-      return searchLogic.GetMissingValueIndices(columnIndex).Count();
+      return Enumerable.Range(0, preprocessingData.Rows).Count(rowIndex => preprocessingData.IsCellEmpty(columnIndex, rowIndex));
+    }
+
+    public int GetRowMissingValueCount(int rowIndex) {
+      var columnIndexes = Enumerable.Range(0, preprocessingData.Columns);
+      return columnIndexes.Count(columnIndex => !preprocessingData.IsCellEmpty(columnIndex, rowIndex));
+    }
+
+    private IEnumerable<T> GetValuesWithoutNaN<T>(int columnIndex, bool considerSelection = false) {
+      return preprocessingData.GetValues<T>(columnIndex, considerSelection).Where(x => !PreprocessingData.IsMissingValue(x)).ToList();
     }
 
@@ -185,17 +192,5 @@
     }
 
-    public int GetRowMissingValueCount(int rowIndex) {
-      int count = 0;
-      for (int i = 0; i < preprocessingData.Columns; ++i) {
-        if (searchLogic.IsMissingValue(i, rowIndex)) {
-          ++count;
-        }
-      }
-      return count;
-    }
-
-    public string GetVariableName(int columnIndex) {
-      return preprocessingData.GetVariableName(columnIndex);
-    }
+
 
     public bool VariableHasType<T>(int columnIndex) {
@@ -218,7 +213,4 @@
     }
 
-    private IEnumerable<T> GetValuesWithoutNaN<T>(int columnIndex, bool considerSelection = false) {
-      return searchLogic.GetValuesWithoutNaN<T>(columnIndex, considerSelection);
-    }
 
     private DateTime GetSecondsAsDateTime(double seconds) {
