Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflip.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflip.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflip.cs	(revision 14450)
@@ -20,22 +20,26 @@
 #endregion
 
+using System.Threading;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
+using HeuristicLab.Algorithms.MemPR.Util;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.Binary.LocalSearch;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.LocalSearch;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  [Item("Exhaustive Bitflip Local Search (binary)", "")]
+namespace HeuristicLab.Algorithms.MemPR.Binary.LocalSearch {
+  [Item("Exhaustive Bitflip Local Search (binary)", "", ExcludeGenericTypeInfo = true)]
   [StorableClass]
-  public class ExhaustiveBitflip<TContext> : ExhaustiveBitflipOperator, IBinaryLocalSearch<TContext> 
-      where TContext : ISingleObjectiveSolutionContext<BinaryVector>, IStochasticContext, IMaximizationContext,
-                       IEvaluatedSolutionsContext, IIterationsManipulationContext {
+  public class ExhaustiveBitflip<TContext> : NamedItem, ILocalSearch<TContext> where TContext : ISingleSolutionHeuristicAlgorithmContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector> {
     
     [StorableConstructor]
     protected ExhaustiveBitflip(bool deserializing) : base(deserializing) { }
     protected ExhaustiveBitflip(ExhaustiveBitflip<TContext> original, Cloner cloner) : base(original, cloner) { }
-    public ExhaustiveBitflip() { }
+    public ExhaustiveBitflip() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -44,9 +48,10 @@
 
     public void Optimize(TContext context) {
+      var evalWrapper = new EvaluationWrapper<BinaryVector>(context.Problem, context.Solution);
       var quality = context.Solution.Fitness;
       try {
-        var result = Heuristic.ExhaustiveBitFlipSearch(context.Random, context.Solution.Solution, ref quality,
-          context.Maximization, EvaluateFunc, CancellationToken);
-        context.EvaluatedSolutions = result.Item1;
+        var result = ExhaustiveBitflip.Optimize(context.Random, context.Solution.Solution, ref quality,
+          context.Problem.Maximization, evalWrapper.Evaluate, CancellationToken.None);
+        context.IncrementEvaluatedSolutions(result.Item1);
         context.Iterations = result.Item2;
       } finally {
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipOperator.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipOperator.cs	(revision 14429)
+++ 	(revision )
@@ -1,89 +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.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.LocalSearch;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  [Item("Exhaustive Bitflip Local Search Operator (binary)", "")]
-  [StorableClass]
-  public class ExhaustiveBitflipOperator : SingleSuccessorOperator, ILocalSearch<BinaryVector>, ISingleObjectiveOperator, IStochasticOperator {
-
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-    
-    public ILookupParameter<BinaryVector> SolutionParameter {
-      get { return (ILookupParameter<BinaryVector>)Parameters["Solution"]; }
-    }
-
-    public ILookupParameter<BoolValue> MaximizationParameter {
-      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
-    }
-
-    public ILookupParameter<DoubleValue> QualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
-    }
-
-    public ILookupParameter<BoolArray> SubspaceParameter {
-      get { return (ILookupParameter<BoolArray>)Parameters["Subspace"]; }
-    }
-
-    public Func<BinaryVector, double> EvaluateFunc { get; set; }
-
-    [StorableConstructor]
-    protected ExhaustiveBitflipOperator(bool deserializing) : base(deserializing) { }
-    protected ExhaustiveBitflipOperator(ExhaustiveBitflipOperator original, Cloner cloner) : base(original, cloner) { }
-    public ExhaustiveBitflipOperator() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<BinaryVector>("Solution", "The solution that is to be optimized"));
-      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "Whether the solution's quality should be maximized or minimized."));
-      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
-      Parameters.Add(new LookupParameter<BoolArray>("Subspace", "Whether the local search should be confined to a sub-space of the solution space (indicated by true in this vector)."));
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ExhaustiveBitflipOperator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      var quality = QualityParameter.ActualValue.Value;
-      var subspace = SubspaceParameter.ActualValue != null ? SubspaceParameter.ActualValue.ToArray() : null;
-      try {
-        Heuristic.ExhaustiveBitFlipSearch(RandomParameter.ActualValue,
-          SolutionParameter.ActualValue, ref quality, MaximizationParameter.ActualValue.Value,
-          EvaluateFunc, CancellationToken, subspace);
-      } finally {
-        QualityParameter.ActualValue.Value = quality;
-      }
-      return base.Apply();
-    }
-  }
-}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipSubspace.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipSubspace.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipSubspace.cs	(revision 14450)
@@ -20,22 +20,26 @@
 #endregion
 
+using System.Threading;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.Binary.LocalSearch;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.LocalSearch;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  [Item("Exhaustive Bitflip Local (Subspace) Search (binary)", "")]
+namespace HeuristicLab.Algorithms.MemPR.Binary.LocalSearch {
+  [Item("Exhaustive Bitflip Local (Subspace) Search (binary)", "", ExcludeGenericTypeInfo = true)]
   [StorableClass]
-  public class ExhaustiveBitflipSubspace<TContext> : ExhaustiveBitflipOperator, IBinaryLocalSearch<TContext>
-      where TContext : ISingleObjectiveSolutionContext<BinaryVector>, IStochasticContext, IMaximizationContext,
-                       IEvaluatedSolutionsContext, IIterationsManipulationContext, IBinarySolutionSubspaceContext {
+  public class ExhaustiveBitflipSubspace<TContext> : NamedItem, ILocalSearch<TContext>
+      where TContext : ISingleSolutionHeuristicAlgorithmContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector>, IBinaryVectorSubspaceContext {
 
     [StorableConstructor]
     protected ExhaustiveBitflipSubspace(bool deserializing) : base(deserializing) { }
     protected ExhaustiveBitflipSubspace(ExhaustiveBitflipSubspace<TContext> original, Cloner cloner) : base(original, cloner) { }
-    public ExhaustiveBitflipSubspace() { }
+    public ExhaustiveBitflipSubspace() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -44,9 +48,10 @@
 
     public void Optimize(TContext context) {
+      var evalWrapper = new EvaluationWrapper(context);
       var quality = context.Solution.Fitness;
       try {
-        var result = Heuristic.ExhaustiveBitFlipSearch(context.Random, context.Solution.Solution, ref quality,
-          context.Maximization, EvaluateFunc, CancellationToken, context.Subspace != null ? context.Subspace.Subspace : null);
-        context.EvaluatedSolutions = result.Item1;
+        var result = ExhaustiveBitflip.Optimize(context.Random, context.Solution.Solution, ref quality,
+          context.Problem.Maximization, evalWrapper.Evaluate, CancellationToken.None, context.Subspace.Subspace);
+        context.IncrementEvaluatedSolutions(result.Item1);
         context.Iterations = result.Item2;
       } finally {
@@ -54,4 +59,24 @@
       }
     }
+
+    public sealed class EvaluationWrapper {
+      private readonly TContext context;
+      private readonly ISingleObjectiveSolutionScope<BinaryVector> scope;
+      private readonly SingleEncodingIndividual individual;
+
+      public EvaluationWrapper(TContext context) {
+        this.context = context;
+        // don't clone the solution, which is thrown away again
+        var cloner = new Cloner();
+        cloner.RegisterClonedObject(context.Solution.Solution, null);
+        this.scope = (ISingleObjectiveSolutionScope<BinaryVector>)context.Solution.Clone(cloner);
+        this.individual = new SingleEncodingIndividual(context.Problem.Encoding, this.scope);
+      }
+
+      public double Evaluate(BinaryVector b) {
+        scope.Solution = b;
+        return context.Problem.Evaluate(individual, null);
+      }
+    }
   }
 }
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/Heuristic.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/Heuristic.cs	(revision 14429)
+++ 	(revision )
@@ -1,71 +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.Linq;
-using System.Threading;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  public static class Heuristic {
-    private static bool IsBetter(bool maximization, double a, double b) {
-      return maximization && a > b
-        || !maximization && a < b;
-    }
-
-    public static Tuple<int, int> ExhaustiveBitFlipSearch(IRandom random, BinaryVector solution, ref double quality, bool maximization, Func<BinaryVector, double> evalFunc, CancellationToken token, bool[] subspace = null) {
-      if (double.IsNaN(quality)) quality = evalFunc(solution);
-      var improved = false;
-      var order = Enumerable.Range(0, solution.Length).Shuffle(random).ToArray();
-      var lastImp = -1;
-      var steps = 0;
-      var evaluations = 0;
-      do {
-        improved = false;
-        for (var i = 0; i < solution.Length; i++) {
-          // in case we didn't make an improvement this round and arrived at the index of the last improvement
-          // break means we don't need to try the remaining moves again as they have brought no improvement
-          if (!improved && lastImp == i) break;
-          var idx = order[i];
-          if (subspace != null && !subspace[idx]) continue;
-          // bitflip the solution
-          solution[idx] = !solution[idx];
-          var after = evalFunc(solution);
-          evaluations++;
-          if (IsBetter(maximization, after, quality)) {
-            steps++;
-            quality = after;
-            lastImp = i;
-            improved = true;
-          } else {
-            // undo the bitflip in case no improvement was made
-            solution[idx] = !solution[idx];
-          }
-          token.ThrowIfCancellationRequested();
-        }
-      } while (improved);
-      
-      return Tuple.Create(evaluations, steps);
-    }
-  }
-}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/StaticAPI/ExhaustiveBitflip.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/StaticAPI/ExhaustiveBitflip.cs	(revision 14450)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/StaticAPI/ExhaustiveBitflip.cs	(revision 14450)
@@ -0,0 +1,67 @@
+﻿#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.Linq;
+using System.Threading;
+using HeuristicLab.Algorithms.MemPR.Util;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Encodings.Binary.LocalSearch {
+  public static class ExhaustiveBitflip {
+    public static Tuple<int, int> Optimize(IRandom random, BinaryVector solution, ref double quality, bool maximization, Func<BinaryVector, double> evalFunc, CancellationToken token, bool[] subspace = null) {
+      if (double.IsNaN(quality)) quality = evalFunc(solution);
+      var improved = false;
+      var order = Enumerable.Range(0, solution.Length).Shuffle(random).ToArray();
+      var lastImp = -1;
+      var steps = 0;
+      var evaluations = 0;
+      do {
+        improved = false;
+        for (var i = 0; i < solution.Length; i++) {
+          // in case we didn't make an improvement this round and arrived at the index of the last improvement
+          // break means we don't need to try the remaining moves again as they have brought no improvement
+          if (!improved && lastImp == i) break;
+          var idx = order[i];
+          if (subspace != null && !subspace[idx]) continue;
+          // bitflip the solution
+          solution[idx] = !solution[idx];
+          var after = evalFunc(solution);
+          evaluations++;
+          if (FitnessComparer.IsBetter(maximization, after, quality)) {
+            steps++;
+            quality = after;
+            lastImp = i;
+            improved = true;
+          } else {
+            // undo the bitflip in case no improvement was made
+            solution[idx] = !solution[idx];
+          }
+          token.ThrowIfCancellationRequested();
+        }
+      } while (improved);
+
+      return Tuple.Create(evaluations, steps);
+    }
+  }
+}
