Index: branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs
===================================================================
--- branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 15678)
+++ branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 15679)
@@ -286,12 +286,8 @@
       // produce solution 
       if (CreateSolution == ModelStorage.Parameter || CreateSolution == ModelStorage.Complete) {
-        IRegressionModel model = null;
+        IRegressionModel model = state.GetModel();
 
         if (CreateSolution == ModelStorage.Parameter) {
-          model = state.GetModel();
-        } else if (CreateSolution == ModelStorage.Complete) {
-          //If "Complete", a deep-copy is required, so no lazy lists
-          model = state.GetModel(false);
-          (model as GradientBoostedTreesModel).IsCompatibilityLoaded = true;
+          model = new GradientBoostedTreesModelSurrogate(problemData, (uint)Seed, lossFunction, Iterations, MaxSize, R, M, Nu, (GradientBoostedTreesModel)model);
         }
 
Index: branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
===================================================================
--- branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs	(revision 15678)
+++ branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs	(revision 15679)
@@ -33,5 +33,5 @@
 
     public interface IGbmState {
-      IRegressionModel GetModel(bool shallow = true);
+      IRegressionModel GetModel();
       double GetTrainLoss();
       double GetTestLoss();
@@ -100,16 +100,8 @@
       }
 
-      public IRegressionModel GetModel(bool shallow = true) {
-#pragma warning disable 618
-        var model = new GradientBoostedTreesModel(models, weights);
-#pragma warning restore 618
-        // we don't know the number of iterations here but the number of weights is equal 
-        // to the number of iterations + 1 (for the constant model)
-        // wrap the actual model in a surrogate that enables persistence and lazy recalculation of the model if necessary
-        if (shallow) {
-          return new GradientBoostedTreesModelSurrogate(problemData, randSeed, lossFunction, weights.Count - 1, maxSize, r, m, nu, model);
-        } else {
-          return model;
-        }
+      public IRegressionModel GetModel() {
+#pragma warning disable CS0618 // Type or member is obsolete
+        return new GradientBoostedTreesModel(models, weights);
+#pragma warning restore CS0618 // Type or member is obsolete
       }
       public IEnumerable<KeyValuePair<string, double>> GetVariableRelevance() {
Index: branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModel.cs
===================================================================
--- branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModel.cs	(revision 15678)
+++ branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModel.cs	(revision 15679)
@@ -36,28 +36,29 @@
     // BackwardsCompatibility3.4 for allowing deserialization & serialization of old models
     #region Backwards compatible code, remove with 3.5
-    private bool isCompatibilityLoaded = false; // only set to true if the model is deserialized from the old format, needed to make sure that information is serialized again if it was loaded from the old format
-    internal bool IsCompatibilityLoaded { get { return this.isCompatibilityLoaded; } set { this.isCompatibilityLoaded = value; } }
 
     [Storable(Name = "models")]
-    private IList<IRegressionModel> __persistedModels {
-      set {
-        this.isCompatibilityLoaded = true;
+    private IList<IRegressionModel> __persistedModels
+    {
+      set
+      {
         this.models.Clear();
         foreach (var m in value) this.models.Add(m);
       }
-      get { if (this.isCompatibilityLoaded) return models; else return null; }
+      get { return models; }
     }
     [Storable(Name = "weights")]
-    private IList<double> __persistedWeights {
-      set {
-        this.isCompatibilityLoaded = true;
+    private IList<double> __persistedWeights
+    {
+      set
+      {
         this.weights.Clear();
         foreach (var w in value) this.weights.Add(w);
       }
-      get { if (this.isCompatibilityLoaded) return weights; else return null; }
+      get { return weights; }
     }
     #endregion
 
-    public override IEnumerable<string> VariablesUsedForPrediction {
+    public override IEnumerable<string> VariablesUsedForPrediction
+    {
       get { return models.SelectMany(x => x.VariablesUsedForPrediction).Distinct().OrderBy(x => x); }
     }
@@ -79,5 +80,4 @@
       this.weights = new List<double>(original.weights);
       this.models = new List<IRegressionModel>(original.models.Select(m => cloner.Clone(m)));
-      this.isCompatibilityLoaded = original.isCompatibilityLoaded;
     }
     [Obsolete("The constructor of GBTModel should not be used directly anymore (use GBTModelSurrogate instead)")]
Index: branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs
===================================================================
--- branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs	(revision 15678)
+++ branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs	(revision 15679)
@@ -39,5 +39,6 @@
     // the actual model is only recalculated when necessary
     private readonly Lazy<IGradientBoostedTreesModel> actualModel;
-    private IGradientBoostedTreesModel ActualModel {
+    private IGradientBoostedTreesModel ActualModel
+    {
       get { return actualModel.Value; }
     }
@@ -61,6 +62,8 @@
 
 
-    public override IEnumerable<string> VariablesUsedForPrediction {
-      get {
+    public override IEnumerable<string> VariablesUsedForPrediction
+    {
+      get
+      {
         return ActualModel.Models.SelectMany(x => x.VariablesUsedForPrediction).Distinct().OrderBy(x => x);
       }
@@ -134,12 +137,16 @@
     }
 
-    public IEnumerable<IRegressionModel> Models {
-      get {
+    public IEnumerable<IRegressionModel> Models
+    {
+      get
+      {
         return ActualModel.Models;
       }
     }
 
-    public IEnumerable<double> Weights {
-      get {
+    public IEnumerable<double> Weights
+    {
+      get
+      {
         return ActualModel.Weights;
       }
