Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingBin/RectangularPackingBin.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingBin/RectangularPackingBin.cs	(revision 13465)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingBin/RectangularPackingBin.cs	(revision 13497)
@@ -32,8 +32,5 @@
 
     public RectangularPackingBin(int width, int height) : base(width, height) { }
-    public RectangularPackingBin()
-      : base() {
-
-    }
+    public RectangularPackingBin() : base() { }
 
     [StorableConstructor]
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/CuboidPackingItem.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/CuboidPackingItem.cs	(revision 13465)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/CuboidPackingItem.cs	(revision 13497)
@@ -29,11 +29,16 @@
 
 namespace HeuristicLab.Problems.BinPacking.PackingItem {
-  [Item ("CuboidPackingItem", "Represents a cuboidic packing-item for bin-packing problems.")]
+  [Item("CuboidPackingItem", "Represents a cuboidic packing-item for bin-packing problems.")]
   [StorableClass]
   public class CuboidPackingItem : CuboidPackingShape, IPackingItem {
+    [Storable]
+    public CuboidPackingBin TargetBin { get; set; }
 
-    public CuboidPackingBin TargetBin { get; set; }
+    [Storable]
     public double Weight { get; set; }
+
+    [Storable]
     public int Material { get; set; }
+
     public bool SupportsStacking(IPackingItem other) {
       return ((other.Material < this.Material) || (other.Material.Equals(this.Material) && other.Weight <= this.Weight));
@@ -44,15 +49,25 @@
     protected CuboidPackingItem(CuboidPackingItem original, Cloner cloner)
       : base(original, cloner) {
-        this.Weight = original.Weight;
-        this.Material = original.Material;
+      this.Weight = original.Weight;
+      this.Material = original.Material;
+      this.TargetBin = cloner.Clone(TargetBin);
     }
     public override IDeepCloneable Clone(Cloner cloner) {
       return new CuboidPackingItem(this, cloner);
     }
-    public CuboidPackingItem() : base() {
+    public CuboidPackingItem()
+      : base() {
     }
 
-    public CuboidPackingItem(int width, int height, int depth, CuboidPackingBin targetBin, double weight, int material) : this(width, height, depth, targetBin) { this.Weight = weight; this.Material = material; }
-    public CuboidPackingItem(int width, int height, int depth, CuboidPackingBin targetBin) : base(width, height, depth) { this.TargetBin = new CuboidPackingBin(targetBin.Width, targetBin.Height, targetBin.Depth); }
+    public CuboidPackingItem(int width, int height, int depth, CuboidPackingBin targetBin, double weight, int material)
+      : this(width, height, depth, targetBin) {
+      this.Weight = weight;
+      this.Material = material;
+    }
+
+    public CuboidPackingItem(int width, int height, int depth, CuboidPackingBin targetBin)
+      : base(width, height, depth) {
+      this.TargetBin = (CuboidPackingBin)targetBin.Clone();
+    }
 
     public void AddTargetBinMeasures(int[] targetBinMeasures) {
@@ -61,5 +76,5 @@
 
     public override string ToString() {
-      return String.Format("CuboidPackingItem ({0}, {1}, {2}; w={3}, m={4})", this.Width, this.Height, this.Depth, this.Weight,this.Material);
+      return String.Format("CuboidPackingItem ({0}, {1}, {2}; w={3}, m={4})", this.Width, this.Height, this.Depth, this.Weight, this.Material);
     }
   }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/RectangularPackingItem.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/RectangularPackingItem.cs	(revision 13465)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingItem/RectangularPackingItem.cs	(revision 13497)
@@ -33,7 +33,13 @@
   public class RectangularPackingItem : RectangularPackingShape, IPackingItem {
 
+    [Storable]
     public RectangularPackingBin TargetBin { get; set; }
+
+    [Storable]
     public double Weight { get; set; }
+
+    [Storable]
     public int Material { get; set; }
+
     public bool SupportsStacking(IPackingItem other) {
       return ((other.Material < this.Material) || (other.Material.Equals(this.Material) && other.Weight <= this.Weight));
@@ -46,4 +52,5 @@
       this.Weight = original.Weight;
       this.Material = original.Material;
+      this.TargetBin = cloner.Clone(TargetBin);
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -54,5 +61,8 @@
     }
 
-    public RectangularPackingItem(int width, int height, RectangularPackingBin targetBin) : base(width, height) { this.TargetBin = new RectangularPackingBin(targetBin.Width, targetBin.Height); }
+    public RectangularPackingItem(int width, int height, RectangularPackingBin targetBin)
+      : base(width, height) {
+      this.TargetBin = (RectangularPackingBin)targetBin.Clone();
+    }
 
     public void AddTargetBinMeasures(int[] targetBinMeasures) {
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/CuboidPackingShape.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/CuboidPackingShape.cs	(revision 13465)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/CuboidPackingShape.cs	(revision 13497)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Diagnostics;
 using HeuristicLab.Problems.BinPacking.Interfaces;
 using HeuristicLab.Core;
@@ -148,7 +149,7 @@
 
     public int CompareTo(object obj) {
-      if (obj.GetType() == this.GetType())
-        return this.CompareTo((CuboidPackingShape)obj);
-      else return 0;
+      var other = (CuboidPackingShape)obj;
+      if (other != null) return CompareTo(other);
+      else throw new ArgumentException(string.Format("Cannot compare with object {0}", obj), "obj");
     }
 
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/PackingShape.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/PackingShape.cs	(revision 13465)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/PackingShape.cs	(revision 13497)
@@ -30,17 +30,17 @@
   [Item("PackingShape", "Represents an abstract shape to describe the measures and the positioning of objects related to bin-packing problems.")]
   [StorableClass]
-  public abstract class PackingShape<D> : Item, IPackingShape
-    where D : class, IPackingDimensions {
+  public abstract class PackingShape<T> : Item, IPackingShape
+    where T : class, IPackingDimensions {
     public static Type PositionType {
-      get { return typeof(D); }
+      get { return typeof(T); }
     }
 
-    public abstract bool EnclosesPoint(D myPosition, D checkedPoint);
-    public abstract bool Encloses(D checkedPosition, PackingShape<D> checkedShape);
-    public abstract bool Overlaps(D myPosition, D checkedPosition, PackingShape<D> checkedShape);
+    public abstract bool EnclosesPoint(T myPosition, T checkedPoint);
+    public abstract bool Encloses(T checkedPosition, PackingShape<T> checkedShape);
+    public abstract bool Overlaps(T myPosition, T checkedPosition, PackingShape<T> checkedShape);
     public abstract void InitializeFromMeasures(int[] measures);
     public abstract int[] ToArray();
     public abstract int MultipliedMeasures { get; }
-    public abstract D Origin { get; }
+    public abstract T Origin { get; }
 
     protected PackingShape(int[] measures) {
@@ -53,5 +53,5 @@
     [StorableConstructor]
     protected PackingShape(bool deserializing) : base(deserializing) { }
-    protected PackingShape(PackingShape<D> original, Cloner cloner)
+    protected PackingShape(PackingShape<T> original, Cloner cloner)
       : base(original, cloner) {
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/RectangularPackingShape.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/RectangularPackingShape.cs	(revision 13465)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/RectangularPackingShape.cs	(revision 13497)
@@ -33,12 +33,7 @@
   public abstract class RectangularPackingShape : PackingShape<TwoDimensionalPacking>, IRegularPackingShape, IComparable<RectangularPackingShape> {
     #region Properties
-    /// <summary>
-    /// Describes the size on the Y-axis
-    /// </summary> 
     [Storable]
     public int Height { get; set; }
-    /// <summary>
-    /// Describes the size on the X-axis
-    /// </summary>  
+
     [Storable]
     public int Width { get; set; }
@@ -60,7 +55,7 @@
     private bool Encloses(TwoDimensionalPacking checkedPosition, RectangularPackingShape checkedShape) {
       return Encloses(new RectangleDiagonal(this), new RectangleDiagonal(checkedPosition, checkedShape));
-    }       
+    }
     private bool Encloses(RectangleDiagonal r1, RectangleDiagonal r2) {
-      return  ( r1.x1 <= r2.x1 &&
+      return (r1.x1 <= r2.x1 &&
                 r1.x2 >= r2.x2 &&
                 r1.y1 <= r2.y1 &&
@@ -71,6 +66,6 @@
       return Overlaps(myPosition, checkedPosition, (RectangularPackingShape)checkedShape);
     }
-    private bool Overlaps(TwoDimensionalPacking myPosition, TwoDimensionalPacking checkedPosition, RectangularPackingShape checkedShape) {    
-      return Overlaps(new RectangleDiagonal (myPosition, this),new RectangleDiagonal (checkedPosition, checkedShape));
+    private bool Overlaps(TwoDimensionalPacking myPosition, TwoDimensionalPacking checkedPosition, RectangularPackingShape checkedShape) {
+      return Overlaps(new RectangleDiagonal(myPosition, this), new RectangleDiagonal(checkedPosition, checkedShape));
     }
     private bool Overlaps(RectangleDiagonal r1, RectangleDiagonal r2) {
@@ -90,5 +85,7 @@
     #endregion
 
-    public RectangularPackingShape(int width, int height) : base () {
+    protected RectangularPackingShape() : base() { }
+    protected RectangularPackingShape(int width, int height)
+      : base() {
       this.Height = height;
       this.Width = width;
@@ -101,7 +98,5 @@
       this.Height = measures[1];
     }
-    public override int[] ToArray() {
-      return new int[] { Width, Height };
-    }
+
 
     [StorableConstructor]
@@ -112,5 +107,4 @@
       this.Height = original.Height;
     }
-    public RectangularPackingShape() : base() {}
 
     public override string ToString() {
@@ -124,5 +118,5 @@
       if (result == 0) {
         result = this.Width.CompareTo(other.Width);
-        if (result == 0) 
+        if (result == 0)
           result = this.Height.CompareTo(other.Height);
       }
@@ -131,10 +125,14 @@
 
     public int CompareTo(object obj) {
-      if (obj.GetType().Equals(this.GetType()))
-        return this.CompareTo((RectangularPackingShape)obj);
-      else return 0;
+      var other = obj as RectangularPackingShape;
+      if (other != null) return CompareTo(other);
+      else throw new ArgumentException(string.Format("Cannot compare to object {0}", obj), "obj");
     }
 
     #endregion
+
+    public override int[] ToArray() {
+      return new int[] { Width, Height };
+    }
 
     private struct RectangleDiagonal {
