Index: branches/ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs	(revision 13401)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs	(revision 14429)
@@ -25,4 +25,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -70,17 +71,17 @@
     /// <param name="n">Number of crossover points.</param>
     /// <returns>The newly created binary vector, resulting from the N point crossover.</returns>
-    public static BinaryVector Apply(IRandom random, BinaryVector parent1, BinaryVector parent2, IntValue n) {
+    public static BinaryVector Apply(IRandom random, BinaryVector parent1, BinaryVector parent2, int n) {
       if (parent1.Length != parent2.Length)
         throw new ArgumentException("NPointCrossover: The parents are of different length.");
 
-      if (n.Value > parent1.Length)
+      if (n > parent1.Length)
         throw new ArgumentException("NPointCrossover: There cannot be more breakpoints than the size of the parents.");
 
-      if (n.Value < 1)
+      if (n < 1)
         throw new ArgumentException("NPointCrossover: N cannot be < 1.");
 
       int length = parent1.Length;
       bool[] result = new bool[length];
-      int[] breakpoints = new int[n.Value];
+      int[] breakpoints = new int[n];
 
       //choose break points
@@ -90,5 +91,5 @@
         breakpointPool.Add(i);
 
-      for (int i = 0; i < n.Value; i++) {
+      for (int i = 0; i < n; i++) {
         int index = random.Next(breakpointPool.Count);
         breakpoints[i] = breakpointPool[index];
@@ -137,5 +138,40 @@
       if (NParameter.ActualValue == null) throw new InvalidOperationException("NPointCrossover: Parameter " + NParameter.ActualName + " could not be found.");
 
-      return Apply(random, parents[0], parents[1], NParameter.ActualValue);
+      return Apply(random, parents[0], parents[1], NParameter.ActualValue.Value);
+    }
+  }
+
+  [Item("N-point Crossover", "", ExcludeGenericTypeInfo = true)]
+  [StorableClass]
+  public sealed class NPointCrossover<TContext> : ParameterizedNamedItem, IBinaryCrossover<TContext>
+    where TContext : IMatingContext<BinaryVector>, IStochasticContext {
+
+    [Storable]
+    private IValueParameter<IntValue> nparameter;
+    public int N {
+      get { return nparameter.Value.Value; }
+      set {
+        if (value < 1) throw new ArgumentException("Cannot set N to less than 1.");
+        nparameter.Value.Value = value;
+      }
+    }
+
+    [StorableConstructor]
+    private NPointCrossover(bool deserializing) : base(deserializing) { }
+    private NPointCrossover(NPointCrossover<TContext> original, Cloner cloner)
+      : base(original, cloner) {
+      nparameter = cloner.Clone(original.nparameter);
+    }
+    public NPointCrossover() {
+      Parameters.Add(nparameter = new ValueParameter<IntValue>("N", "The number of crossover points.", new IntValue(1)));
+    }
+
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NPointCrossover<TContext>(this, cloner);
+    }
+
+    public void Cross(TContext context) {
+      context.Child.Solution = NPointCrossover.Apply(context.Random, context.Parents.Item1.Solution, context.Parents.Item2.Solution, N);
     }
   }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 13401)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 14429)
@@ -57,5 +57,5 @@
       if (parents.Length != 2) throw new ArgumentException("ERROR in SinglePointCrossover: The number of parents is not equal to 2");
 
-      return NPointCrossover.Apply(random, parents[0], parents[1], new IntValue(1));
+      return NPointCrossover.Apply(random, parents[0], parents[1], 1);
     }
   }
