Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushProgram.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushProgram.cs	(revision 14729)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PushProgram.cs	(revision 14730)
@@ -17,28 +17,50 @@
     public readonly bool IsEmpty;
 
-    private readonly Lazy<int> depth;
-    private readonly Lazy<int[]> treeIndex;
-    private readonly Lazy<int> hashCode;
-    private readonly Lazy<string> stringRepresentation;
+
+    private string stringRepresentation;
+    private string StringRepresentation {
+      get {
+        if (string.IsNullOrEmpty(stringRepresentation))
+          stringRepresentation = BuildString();
+        return stringRepresentation;
+      }
+    }
+
+    private int depth = -1;
+    private int Depth {
+      get {
+        if (depth == -1) depth = CalcDepth();
+        return depth;
+      }
+    }
+
+    private int[] treeIndex = null;
+    public int[] TreeIndex {
+      get {
+        if (treeIndex == null) treeIndex = BuildTreeIndex();
+        return treeIndex;
+      }
+    }
+
+    private int hashCode;
+    private int HashCode {
+      get {
+        if (hashCode == default(int)) hashCode = HashExpressions();
+        return hashCode;
+      }
+    }
 
     public PushProgram(Expression[] expressions) {
       this.Expressions = expressions;
       this.IsEmpty = expressions.Length == 0;
-
-      this.depth = new Lazy<int>(this.CalcDepth, true);
-      this.treeIndex = new Lazy<int[]>(this.BuildTreeIndex, true);
-      this.hashCode = new Lazy<int>(this.HashExpressions, true);
-      this.stringRepresentation = new Lazy<string>(this.BuildString, true);
     }
 
-    public int Depth { get { return depth.Value; } }
-    public int[] TreeIndex { get { return treeIndex.Value; } }
 
     public override int GetHashCode() {
-      return this.hashCode.Value;
+      return HashCode;
     }
 
     public override string ToString() {
-      return this.stringRepresentation.Value;
+      return this.StringRepresentation;
     }
 
@@ -47,12 +69,10 @@
     /// </summary>
     /// <returns></returns>
-    public int TotalCount
-    {
-      get
-      {
+    public int TotalCount {
+      get {
         return this.IsEmpty
             ? 1
-            // + 1 because "this" is also counted
-            : this.treeIndex.Value[0] + 1;
+          // + 1 because "this" is also counted
+            : TreeIndex[0] + 1;
       }
     }
@@ -111,5 +131,5 @@
 
     private int[] BuildTreeIndex() {
-      var TreeIndex = new int[this.Expressions.Count];
+      var local_treeIndex = new int[this.Expressions.Count];
 
       var next = 1;
@@ -118,5 +138,5 @@
         var subExpression = this.Expressions[i];
 
-        TreeIndex[i] = next;
+        local_treeIndex[i] = next;
 
         if (subExpression.CanExpand) {
@@ -127,5 +147,5 @@
       }
 
-      return TreeIndex;
+      return local_treeIndex;
     }
 
Index: /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefullExpression.cs
===================================================================
--- /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefullExpression.cs	(revision 14729)
+++ /branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefullExpression.cs	(revision 14730)
@@ -1,13 +1,18 @@
 ﻿namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
-  using System;
 
   public abstract class StatefullExpression<T> : Expression {
 
     public readonly T State;
-    private readonly Lazy<int> hashCode;
+
+    private int hashCode;
+    private int HashCode {
+      get {
+        if (hashCode == default(int)) hashCode = CalcHashCode();
+        return hashCode;
+      }
+    }
 
     protected StatefullExpression(T state) {
       this.State = state;
-      this.hashCode = new Lazy<int>(this.CalcHashCode, true);
     }
 
@@ -30,5 +35,5 @@
 
     public override int GetHashCode() {
-      return this.hashCode.Value;
+      return HashCode;
     }
   }
