Index: branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/Mapper.cs
===================================================================
--- branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/Mapper.cs	(revision 14594)
+++ branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/Mapper.cs	(revision 14711)
@@ -139,5 +139,5 @@
       bundle.RootBoxId = mapper.GetBoxId(o);
       bundle.AddRangeTransformerGuids(mapper.transformers.GetValues().Select(x => x.Guid).Select(x => ByteString.CopyFrom(x.ToByteArray())));
-      bundle.AddRangeTypeGuids(mapper.types.GetValues().Select(x => x.AssemblyQualifiedName ?? x.Name).Select(x => ByteString.CopyFromUtf8(x)));
+      bundle.AddRangeTypeGuids(mapper.types.GetValues().Select(x => ByteString.CopyFrom(StaticCache.GetGuid(x).ToByteArray())));
       bundle.AddRangeStrings(mapper.strings.GetValues());
       bundle.AddRangeBoxes(mapper.boxId2Box.OrderBy(x => x.Key).Select(x => x.Value));
@@ -146,5 +146,5 @@
     public static object ToObject(Bundle bundle) {
       var mapper = new Mapper();
-      mapper.types = new Index<Type>(bundle.TypeGuidsList.Select(x => x.ToStringUtf8()).Select(x => Type.GetType(x)));
+      mapper.types = new Index<Type>(bundle.TypeGuidsList.Select(x => StaticCache.GetType(new Guid(x.ToByteArray()))));
       mapper.strings = new Index<string>(bundle.StringsList);
       mapper.boxId2Box = bundle.BoxesList.Select((b, i) => new { Box = b, Index = i }).ToDictionary(k => (uint)k.Index + 1, v => v.Box);
Index: branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/StaticCache.cs
===================================================================
--- branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/StaticCache.cs	(revision 14594)
+++ branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/StaticCache.cs	(revision 14711)
@@ -35,6 +35,6 @@
     private Dictionary<Guid, ITransformer> guid2Transformer;
     private Dictionary<ITransformer, Guid> transformer2Guid;
-    //private Dictionary<string, Type> guid2Type;
-    //private Dictionary<Type, string> type2Guid;
+    private Dictionary<Guid, Type> guid2Type;
+    private Dictionary<Type, Guid> type2Guid;
     private Dictionary<Type, TypeInfo> typeInfos;
     private ExtensionRegistry extensionRegistry;
@@ -43,6 +43,6 @@
       guid2Transformer = new Dictionary<Guid, ITransformer>();
       transformer2Guid = new Dictionary<ITransformer, Guid>();
-      //guid2Type = new Dictionary<string, Type>();
-      //type2Guid = new Dictionary<Type, string>();
+      guid2Type = new Dictionary<Guid, Type>();
+      type2Guid = new Dictionary<Type, Guid>();
       typeInfos = new Dictionary<Type, TypeInfo>();
       extensionRegistry = ExtensionRegistry.CreateInstance();
@@ -52,118 +52,115 @@
 
 
-      // ECC12A57-DA8D-43D9-9EC7-FCAC878A4D69
-      // E8348C94-9817-4164-9C98-377689F83F30
-      // 05551382-E894-4218-B860-FEE1D92CA07D
-      // 4CC0D44E-65B2-4DF1-A333-30F058CB78CA
-      // 5D451A64-EBD9-411F-A07E-232250B33784
-      // EEBD2D26-56CC-45EA-900A-DD29B9F598CE
-      // B8EEEFA7-8576-42DD-937C-AFBB66297B56
-      // 4C3C8E0A-7DCF-4814-B798-AECB86E1E4E3
-      // EAA4FF91-B90C-47CB-AC0F-66AB66D41186
-      // EB51B342-826F-4004-B2C6-F2A03A8C35C9
-      // 14138614-45DB-4A0D-9E59-AE9373241D6B
-
-
-      //       RegisterType(new Guid("94AD8522-3F55-4580-A6F8-2D2AAEDD4B8C"), typeof(bool));
-      //       RegisterType(new Guid("4A1C0FD5-423D-4F96-AB22-A496578C25AC"), typeof(byte));
-      //       RegisterType(new Guid("C4B00F0B-FED7-439F-B1B2-8A0048B64882"), typeof(sbyte));
-      //       RegisterType(new Guid("9F451811-3DE1-43AB-8B74-D7E03851857B"), typeof(short));
-      //       RegisterType(new Guid("46244D54-0145-49F7-9CF3-9CDB7FB5F240"), typeof(ushort));
-      //       RegisterType(new Guid("1FDDE40C-09E3-491F-8FBB-32BB3C885E9E"), typeof(char));
-      //       RegisterType(new Guid("EE3E0F9C-A5C2-4461-AF36-28BD8F26E6FB"), typeof(int));
-      //       RegisterType(new Guid("69476D18-D285-43E9-BC7C-6CC9E9F2321E"), typeof(uint));
-      //       RegisterType(new Guid("7C7BC5EC-F001-4BA0-9F85-50DCBAA9AE81"), typeof(long));
-      //       RegisterType(new Guid("AC808D5A-63BB-457C-9B92-C9B83DA2B139"), typeof(ulong));
-      //       RegisterType(new Guid("BF22653A-026C-4367-BBBA-2125AECF6C08"), typeof(float));
-      //       RegisterType(new Guid("8B49821A-3ADC-4715-9DB1-08E2F3CFDF15"), typeof(double));
-      //       RegisterType(new Guid("7BB386BF-6FD4-443D-A6C1-387096798C67"), typeof(DateTime));
-      //       RegisterType(new Guid("724A2D49-7E7B-455B-BBA9-4214C64E8A21"), typeof(TimeSpan));
-      //       RegisterType(new Guid("4DB2ED2B-D9F2-4695-B555-A2CF42740740"), typeof(Color));
-      //       RegisterType(new Guid("9BC74087-D5C0-4C39-99B4-D7465F478492"), typeof(Point));
-      //       RegisterType(new Guid("E84C326A-7E14-4F28-AEFF-BC16CC671655"), typeof(KeyValuePair<,>));
-      //       RegisterType(new Guid("F0280B55-25E8-4981-B309-D675D081402A"), typeof(string));
       // 
-      //       RegisterType(new Guid("9CF55419-439B-4A90-B2ED-8C7F7768EB61"), typeof(Array));
-      //       RegisterType(new Guid("D15AD28B-203A-460E-815C-F7230C4B1F75"), typeof(bool[]));
-      //       RegisterType(new Guid("EE318DC4-580D-4DB1-9AAD-988B0E50A3DB"), typeof(byte[]));
-      //       RegisterType(new Guid("326B9484-361F-46F8-B8A6-46C781A8C51F"), typeof(sbyte[]));
-      //       RegisterType(new Guid("C854783D-4C91-43C8-A19A-F96012494F8A"), typeof(short[]));
-      //       RegisterType(new Guid("C47FB329-2A1D-4EB7-AFB1-1CF72AB30E98"), typeof(ushort[]));
-      //       RegisterType(new Guid("9681D044-B50C-4907-B23E-BDFEBC6C3FFC"), typeof(char[]));
-      //       RegisterType(new Guid("0FC62D91-D63F-4507-8696-885D4C07285A"), typeof(int[]));
-      //       RegisterType(new Guid("C43A25A0-9B99-4DA4-9279-7495FE10428E"), typeof(uint[]));
-      //       RegisterType(new Guid("7AC4DDAC-0E13-428E-BF49-7BE7B76746CB"), typeof(long[]));
-      //       RegisterType(new Guid("8D9283A7-FE49-4AEA-A09F-D53CF3BE520A"), typeof(ulong[]));
-      //       RegisterType(new Guid("BB9CFA0B-DD29-4C44-85C6-3A6289C55448"), typeof(float[]));
-      //       RegisterType(new Guid("3B3AA69E-1641-4202-AE1D-7EEFF60FA355"), typeof(double[]));
-      //       RegisterType(new Guid("7DF325A6-2553-4915-B7C6-D98191107CB7"), typeof(string[]));
-      //       RegisterType(new Guid("DB2A785C-5803-42C7-A01F-E1FD845A83A1"), typeof(List<>));
-      //       RegisterType(new Guid("EB98A564-BEDC-458A-9E9B-4BF3CDAFB9BE"), typeof(Stack<>));
-      //       RegisterType(new Guid("D5E3118B-957A-43B5-A740-1BBAA0EAB666"), typeof(System.Collections.Stack));
-      //       RegisterType(new Guid("7E2F3277-7216-4295-A498-9ACA43527D5B"), typeof(HashSet<>));
-      //       RegisterType(new Guid("E92C35AD-32B1-4F37-B8D2-BE2F5FEB465B"), typeof(Dictionary<,>));
-
-      //RegisterTypeAndFullName(typeof(object));
-      //RegisterTypeAndFullName(typeof(bool));
-      //RegisterTypeAndFullName(typeof(byte));
-      //RegisterTypeAndFullName(typeof(sbyte));
-      //RegisterTypeAndFullName(typeof(short));
-      //RegisterTypeAndFullName(typeof(ushort));
-      //RegisterTypeAndFullName(typeof(char));
-      //RegisterTypeAndFullName(typeof(int));
-      //RegisterTypeAndFullName(typeof(uint));
-      //RegisterTypeAndFullName(typeof(long));
-      //RegisterTypeAndFullName(typeof(ulong));
-      //RegisterTypeAndFullName(typeof(float));
-      //RegisterTypeAndFullName(typeof(double));
-      //RegisterTypeAndFullName(typeof(decimal));
-      //RegisterTypeAndFullName(typeof(DateTime));
-      //RegisterTypeAndFullName(typeof(TimeSpan));
-      //RegisterTypeAndFullName(typeof(Font));
-      //RegisterTypeAndFullName(typeof(Color));
-      //RegisterTypeAndFullName(typeof(Bitmap));
-      //RegisterTypeAndFullName(typeof(Point));
-      //RegisterTypeAndFullName(typeof(KeyValuePair<,>));
-      //RegisterTypeAndFullName(typeof(Tuple<>));
-      //RegisterTypeAndFullName(typeof(Tuple<,>));
-      //RegisterTypeAndFullName(typeof(Tuple<,,>));
-      //RegisterTypeAndFullName(typeof(Tuple<,,,>));
-      //RegisterTypeAndFullName(typeof(Tuple<,,,,>));
-      //RegisterTypeAndFullName(typeof(Tuple<,,,,,>));
-      //RegisterTypeAndFullName(typeof(Tuple<,,,,,,>));
-      //RegisterTypeAndFullName(typeof(Tuple<,,,,,,,>));
-      //RegisterTypeAndFullName(typeof(Nullable<>));
-      //RegisterTypeAndFullName(typeof(string));
-
-      //RegisterTypeAndFullName(typeof(Array));
-      //RegisterTypeAndFullName(typeof(bool[]));
-      //RegisterTypeAndFullName(typeof(byte[]));
-      //RegisterTypeAndFullName(typeof(sbyte[]));
-      //RegisterTypeAndFullName(typeof(short[]));
-      //RegisterTypeAndFullName(typeof(ushort[]));
-      //RegisterTypeAndFullName(typeof(char[]));
-      //RegisterTypeAndFullName(typeof(int[]));
-      //RegisterTypeAndFullName(typeof(uint[]));
-      //RegisterTypeAndFullName(typeof(long[]));
-      //RegisterTypeAndFullName(typeof(ulong[]));
-      //RegisterTypeAndFullName(typeof(float[]));
-      //RegisterTypeAndFullName(typeof(double[]));
-      //RegisterTypeAndFullName(typeof(string[]));
-      //RegisterTypeAndFullName(typeof(List<>));
-      //RegisterTypeAndFullName(typeof(ArrayList));
-      //RegisterTypeAndFullName(typeof(HashSet<>));
-      //RegisterTypeAndFullName(typeof(Stack<>));
-      //RegisterTypeAndFullName(typeof(Stack));
-      //RegisterTypeAndFullName(typeof(Queue<>));
-      //RegisterTypeAndFullName(typeof(Queue));
-      //RegisterTypeAndFullName(typeof(Dictionary<,>));
-
-      //foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) {
-      //  foreach (var t in asm.GetTypes().Where(x => StorableClassAttribute.IsStorableClass(x) // storable classes
-      //                                           || x.IsValueType && !x.IsPrimitive && !x.IsEnum && x.IsSealed // structs
-      //                                           || typeof(IEqualityComparer).IsAssignableFrom(x) // equality comparers
-      //                                           || x.IsGenericType && typeof(IEqualityComparer<>).IsAssignableFrom(x.GetGenericTypeDefinition()))) // generic equality comparers
-      //    RegisterTypeAndFullName(t);
-      //}
+      //  
+      //  
+      //  
+      //  
+      //  
+      //  "B7313EE2-045F-41C9-AEC9-7B1A8CDBF90F"
+      //  "D5265599-7380-4A28-AB0D-9F336EF290C5"
+      //  "6A92B935-5D05-42D8-933C-333C9AB71133"
+      //  "934A44AA-7E04-4E2D-B640-EDD3DE24894F"
+      //  "0F24C888-AF34-4318-9472-187B9AA85F3C"
+
+
+
+      RegisterType(new Guid("ECAEA154-6BFF-419F-8BE6-2565E9314825"), typeof(object));
+      RegisterType(new Guid("94AD8522-3F55-4580-A6F8-2D2AAEDD4B8C"), typeof(bool));
+      RegisterType(new Guid("4A1C0FD5-423D-4F96-AB22-A496578C25AC"), typeof(byte));
+      RegisterType(new Guid("C4B00F0B-FED7-439F-B1B2-8A0048B64882"), typeof(sbyte));
+      RegisterType(new Guid("9F451811-3DE1-43AB-8B74-D7E03851857B"), typeof(short));
+      RegisterType(new Guid("46244D54-0145-49F7-9CF3-9CDB7FB5F240"), typeof(ushort));
+      RegisterType(new Guid("1FDDE40C-09E3-491F-8FBB-32BB3C885E9E"), typeof(char));
+      RegisterType(new Guid("EE3E0F9C-A5C2-4461-AF36-28BD8F26E6FB"), typeof(int));
+      RegisterType(new Guid("69476D18-D285-43E9-BC7C-6CC9E9F2321E"), typeof(uint));
+      RegisterType(new Guid("7C7BC5EC-F001-4BA0-9F85-50DCBAA9AE81"), typeof(long));
+      RegisterType(new Guid("AC808D5A-63BB-457C-9B92-C9B83DA2B139"), typeof(ulong));
+      RegisterType(new Guid("BF22653A-026C-4367-BBBA-2125AECF6C08"), typeof(float));
+      RegisterType(new Guid("8B49821A-3ADC-4715-9DB1-08E2F3CFDF15"), typeof(double));
+      RegisterType(new Guid("5C6CB86C-81DA-4334-9196-6571C6706240"), typeof(decimal));
+
+      RegisterType(new Guid("7BB386BF-6FD4-443D-A6C1-387096798C67"), typeof(DateTime));
+      RegisterType(new Guid("724A2D49-7E7B-455B-BBA9-4214C64E8A21"), typeof(TimeSpan));
+      RegisterType(new Guid("ECC12A57-DA8D-43D9-9EC7-FCAC878A4D69"), typeof(Font));
+      RegisterType(new Guid("E8348C94-9817-4164-9C98-377689F83F30"), typeof(Bitmap));
+      RegisterType(new Guid("05551382-E894-4218-B860-FEE1D92CA07D"), typeof(Nullable<>));
+      RegisterType(new Guid("4CC0D44E-65B2-4DF1-A333-30F058CB78CA"), typeof(Tuple<>));
+      RegisterType(new Guid("5D451A64-EBD9-411F-A07E-232250B33784"), typeof(Tuple<,>));
+      RegisterType(new Guid("EEBD2D26-56CC-45EA-900A-DD29B9F598CE"), typeof(Tuple<,,>));
+      RegisterType(new Guid("B8EEEFA7-8576-42DD-937C-AFBB66297B56"), typeof(Tuple<,,,>));
+      RegisterType(new Guid("4C3C8E0A-7DCF-4814-B798-AECB86E1E4E3"), typeof(Tuple<,,,,>));
+      RegisterType(new Guid("EAA4FF91-B90C-47CB-AC0F-66AB66D41186"), typeof(Tuple<,,,,,>));
+      RegisterType(new Guid("EB51B342-826F-4004-B2C6-F2A03A8C35C9"), typeof(Tuple<,,,,,,>));
+      RegisterType(new Guid("14138614-45DB-4A0D-9E59-AE9373241D6B"), typeof(Tuple<,,,,,,,>));
+      RegisterType(new Guid("4DB2ED2B-D9F2-4695-B555-A2CF42740740"), typeof(Color));
+      RegisterType(new Guid("9BC74087-D5C0-4C39-99B4-D7465F478492"), typeof(Point));
+      RegisterType(new Guid("E84C326A-7E14-4F28-AEFF-BC16CC671655"), typeof(KeyValuePair<,>));
+      RegisterType(new Guid("F0280B55-25E8-4981-B309-D675D081402A"), typeof(string));
+      // 
+      RegisterType(new Guid("9CF55419-439B-4A90-B2ED-8C7F7768EB61"), typeof(Array));
+      // RegisterType(new Guid("D15AD28B-203A-460E-815C-F7230C4B1F75"), typeof(bool[]));
+      // RegisterType(new Guid("EE318DC4-580D-4DB1-9AAD-988B0E50A3DB"), typeof(byte[]));
+      // RegisterType(new Guid("326B9484-361F-46F8-B8A6-46C781A8C51F"), typeof(sbyte[]));
+      // RegisterType(new Guid("C854783D-4C91-43C8-A19A-F96012494F8A"), typeof(short[]));
+      // RegisterType(new Guid("C47FB329-2A1D-4EB7-AFB1-1CF72AB30E98"), typeof(ushort[]));
+      // RegisterType(new Guid("9681D044-B50C-4907-B23E-BDFEBC6C3FFC"), typeof(char[]));
+      // RegisterType(new Guid("0FC62D91-D63F-4507-8696-885D4C07285A"), typeof(int[]));
+      // RegisterType(new Guid("C43A25A0-9B99-4DA4-9279-7495FE10428E"), typeof(uint[]));
+      // RegisterType(new Guid("7AC4DDAC-0E13-428E-BF49-7BE7B76746CB"), typeof(long[]));
+      // RegisterType(new Guid("8D9283A7-FE49-4AEA-A09F-D53CF3BE520A"), typeof(ulong[]));
+      // RegisterType(new Guid("BB9CFA0B-DD29-4C44-85C6-3A6289C55448"), typeof(float[]));
+      // RegisterType(new Guid("3B3AA69E-1641-4202-AE1D-7EEFF60FA355"), typeof(double[]));
+      // RegisterType(new Guid("7DF325A6-2553-4915-B7C6-D98191107CB7"), typeof(string[]));
+      RegisterType(new Guid("DB2A785C-5803-42C7-A01F-E1FD845A83A1"), typeof(List<>));
+      RegisterType(new Guid("EB98A564-BEDC-458A-9E9B-4BF3CDAFB9BE"), typeof(Stack<>));
+      RegisterType(new Guid("D5E3118B-957A-43B5-A740-1BBAA0EAB666"), typeof(Stack));
+      RegisterType(new Guid("8CBC5F9F-5671-4805-A690-DD034AEB7932"), typeof(ArrayList));
+      RegisterType(new Guid("80CAB5BF-06C2-4DB2-9CF0-EE6E93D40B30"), typeof(Queue));
+      RegisterType(new Guid("C528E123-F3DD-4711-83E2-A26E2A9A85E9"), typeof(Queue<>));
+      RegisterType(new Guid("7E2F3277-7216-4295-A498-9ACA43527D5B"), typeof(HashSet<>));
+      RegisterType(new Guid("E92C35AD-32B1-4F37-B8D2-BE2F5FEB465B"), typeof(Dictionary<,>));
+
+      var allTypes = new Dictionary<string, Type>(5000);
+      foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) {
+        if (asm.FullName == "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") {
+          foreach (var t in asm.GetTypes()) {
+            if (typeof(IEqualityComparer).IsAssignableFrom(t))
+              allTypes.Add(t.FullName, t);
+
+            else if (typeof(IEqualityComparer<>).IsAssignableFrom(t))
+              allTypes.Add(t.FullName, t);
+          }
+        } else {
+          foreach (var t in asm.GetTypes()) {
+            if (StorableTypeAttribute.IsStorableType(t)) {
+              RegisterType(StorableTypeAttribute.GetStorableTypeAttribute(t).Guid, t);
+            }
+          }
+        }
+      }
+      RegisterType(new Guid("67C35B3B-DC23-4929-9BA9-0A0CD5FE17F5"), allTypes["System.StringComparer"]);
+      RegisterType(new Guid("C7FDE8F0-EF3F-4A4D-8D87-5559C32A8B90"), allTypes["System.CultureAwareComparer"]);
+      RegisterType(new Guid("4AF3A1F6-49CD-4172-8394-FE464889250E"), allTypes["System.CultureAwareRandomizedComparer"]);
+      RegisterType(new Guid("6A80741F-066D-460B-B333-4F766A4D4AEF"), allTypes["System.OrdinalComparer"]);
+      RegisterType(new Guid("4C7F657C-B69E-4D1A-8812-3254D6219FD2"), allTypes["System.OrdinalRandomizedComparer"]);
+      RegisterType(new Guid("0549A3DF-1FD4-487A-B06B-8C572DFFFBEB"), allTypes["System.Security.PermissionTokenKeyComparer"]);
+      RegisterType(new Guid("94BB9853-8D25-4DD8-A915-FEF2EFF538BC"), allTypes["System.Resources.FastResourceComparer"]);
+      RegisterType(new Guid("65D2DE74-8BDF-4C74-9005-81A2C3991DC5"), allTypes["System.Collections.CompatibleComparer"]);
+      RegisterType(new Guid("075827F4-07D9-4E50-9D00-C9FF3E7DCF9A"), allTypes["System.Collections.IEqualityComparer"]);
+      RegisterType(new Guid("3DA30D50-2337-4487-AECD-F2DB3ECED834"), allTypes["System.Collections.StructuralEqualityComparer"]);
+      RegisterType(new Guid("C8BF5C03-1614-46AC-8730-2F231CAD4232"), allTypes["System.Collections.Generic.EqualityComparer`1"]);
+      RegisterType(new Guid("FB247FE0-9203-4196-B4D3-71AB18CD12C5"), allTypes["System.Collections.Generic.GenericEqualityComparer`1"]);
+      RegisterType(new Guid("06443E04-FB1D-41E1-BAE2-1AB3728BDCC9"), allTypes["System.Collections.Generic.NullableEqualityComparer`1"]);
+      RegisterType(new Guid("D9029E74-C511-4D28-B8C5-D0E299EC45A5"), allTypes["System.Collections.Generic.ObjectEqualityComparer`1"]);
+      RegisterType(new Guid("C6D867E2-3CD2-4C59-8BA6-F18F00DDB997"), allTypes["System.Collections.Generic.ByteEqualityComparer"]);
+      RegisterType(new Guid("02F8D180-BABE-4073-82E0-7FE77814F53D"), allTypes["System.Collections.Generic.EnumEqualityComparer`1"]);
+      RegisterType(new Guid("8A19DA46-FE80-4776-9DB4-B17E6182D104"), allTypes["System.Collections.Generic.SByteEnumEqualityComparer`1"]);
+      RegisterType(new Guid("F6F6EFB9-B631-4ACC-9326-F492A6A63011"), allTypes["System.Collections.Generic.ShortEnumEqualityComparer`1"]);
+      RegisterType(new Guid("D3D279FE-169E-46B6-93AE-589BB4F24A4D"), allTypes["System.Collections.Generic.LongEnumEqualityComparer`1"]);
+      RegisterType(new Guid("BA0AB604-C052-4E08-8F9E-A5D8098F16A6"), allTypes["System.Collections.Generic.RandomizedStringEqualityComparer"]);
+      RegisterType(new Guid("00C8C940-63D9-43FF-99BA-9C69301BF043"), allTypes["System.Collections.Generic.RandomizedObjectEqualityComparer"]);
+      RegisterType(new Guid("DAF22757-7FCC-49AC-B148-F3DD7E9E0A3B"), allTypes["System.Collections.Generic.IEqualityComparer`1"]);
+
 
       //var registeredTypes = type2Guid.Keys.ToArray();
@@ -198,5 +195,5 @@
     }
 
-    //private void AddBaseTypesRec(Type t) {
+    //private void AddBaseTypesRec(MemberSelection t) {
     //  foreach (var interfaceType in t.GetInterfaces()) {
     //    RegisterTypeAndFullName(interfaceType);
@@ -215,11 +212,11 @@
       }
     }
-    //    public void RegisterType(Guid guid, Type type) {
-    //      lock (locker) {
-    //        guid2Type.Add(guid, type);
-    //        type2Guid.Add(type, guid);
-    //      }
-    //    }
-    //public void RegisterTypeAndFullName(Type type) {
+    public void RegisterType(Guid guid, Type type) {
+      lock (locker) {
+        guid2Type.Add(guid, type);
+        type2Guid.Add(type, guid);
+      }
+    }
+    //public void RegisterTypeAndFullName(MemberSelection type) {
     //  lock (locker) {
     //    var key = type.AssemblyQualifiedName ?? type.Name;
@@ -242,10 +239,10 @@
       return transformer2Guid[transformer];
     }
-    //public Type GetType(string guid) {
-    //  return guid2Type[guid];
-    //}
-    //public string GetGuid(Type type) {
-    //  return type2Guid[type];
-    //}
+    public Type GetType(Guid guid) {
+      return guid2Type[guid];
+    }
+    public Guid GetGuid(Type type) {
+      return type2Guid[type];
+    }
     public TypeInfo GetTypeInfo(Type type) {
       lock (locker) {
Index: branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/TypeInfo.cs
===================================================================
--- branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/TypeInfo.cs	(revision 14594)
+++ branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/TypeInfo.cs	(revision 14711)
@@ -33,5 +33,5 @@
     public Type Type { get; private set; }
     public ITransformer Transformer { get; private set; }
-    public StorableClassAttribute StorableClassAttribute { get; private set; }
+    public StorableTypeAttribute StorableTypeAttribute { get; private set; }
     public IEnumerable<ComponentInfo> Fields { get; private set; }
     public IEnumerable<ComponentInfo> Properties { get; private set; }
@@ -57,6 +57,6 @@
     private void Reflect() {
       var type = Type;
-      StorableClassAttribute = StorableClassAttribute.GetStorableClassAttribute(type);
-      if (StorableClassAttribute != null) {
+      StorableTypeAttribute = StorableTypeAttribute.GetStorableTypeAttribute(type);
+      if (StorableTypeAttribute != null) {
         // traverse type hierarchy from base type to sub types
         Stack<Type> types = new Stack<Type>();
@@ -72,8 +72,8 @@
         while (types.Count > 0) {
           type = types.Pop();
-          if (StorableClassAttribute.Type != StorableClassType.AllProperties) {
+          if (StorableTypeAttribute.MemberSelection != StorableMemberSelection.AllProperties) {
             var fieldInfos = type.GetFields(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic)
                                  .Where(x => !x.Name.StartsWith("<") && !x.Name.EndsWith("k__BackingField")); // exclude backing fields
-            if (StorableClassAttribute.Type == StorableClassType.MarkedOnly)
+            if (StorableTypeAttribute.MemberSelection == StorableMemberSelection.MarkedOnly)
               fieldInfos = fieldInfos.Where(x => StorableAttribute.IsStorable(x)).ToArray();
             foreach (var field in fieldInfos) {
@@ -84,8 +84,8 @@
           }
 
-          if (StorableClassAttribute.Type != StorableClassType.AllFields) {
+          if (StorableTypeAttribute.MemberSelection != StorableMemberSelection.AllFields) {
             var propertyInfos = type.GetProperties(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic).
                         Where(x => x.GetIndexParameters().Length == 0);  // exclude indexed properties
-            if (StorableClassAttribute.Type == StorableClassType.MarkedOnly)
+            if (StorableTypeAttribute.MemberSelection == StorableMemberSelection.MarkedOnly)
               propertyInfos = propertyInfos.Where(x => StorableAttribute.IsStorable(x)).ToArray();
             foreach (var property in propertyInfos) {
Index: branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Transformers/StorableClassTransformer.cs
===================================================================
--- branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Transformers/StorableClassTransformer.cs	(revision 14594)
+++ branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Transformers/StorableClassTransformer.cs	(revision 14711)
@@ -30,5 +30,6 @@
   internal sealed class StorableClassBoxTransformer : BoxTransformer<object> {
     public override bool CanTransformType(Type type) {
-      return StorableClassAttribute.IsStorableClass(type) || type.BaseType != null && CanTransformType(type.BaseType);
+      return StorableTypeAttribute.IsStorableType(type) && !type.IsValueType || // don't transform structs
+        type.BaseType != null && CanTransformType(type.BaseType);
     }
 
Index: branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Transformers/Transformers.cs
===================================================================
--- branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Transformers/Transformers.cs	(revision 14594)
+++ branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Transformers/Transformers.cs	(revision 14711)
@@ -32,4 +32,5 @@
 using Google.ProtocolBuffers;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence {
@@ -548,8 +549,10 @@
       foreach (var t in components) {
         string name = mapper.GetString(t.Key);
-        MemberInfo[] mis = type.GetMember(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+        MemberInfo[] mis = type.GetMember(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);        
         if (mis.Length != 1)
           throw new Exception("ambiguous struct member name " + name);
         MemberInfo mi = mis[0];
+        if(StorableAttribute.IsStorable(mi))
+          throw new PersistenceException("Don't use stroable attributes for structs as all fields are serialized automatically.");
         if (mi.MemberType == MemberTypes.Field)
           ((FieldInfo)mi).SetValue(obj, mapper.GetObject(t.Value));
@@ -916,5 +919,5 @@
         var comparer = propertyInfo.GetValue(value);
         var comparerType = comparer.GetType();
-        if (Default.CompositeSerializers.Storable.StorableClassAttribute.IsStorableClass(comparerType))
+        if (Default.CompositeSerializers.Storable.StorableTypeAttribute.IsStorableType(comparerType))
           uIntArrayBox.AddValues(mapper.GetBoxId(comparer));
         else if (comparerType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy).Any())
@@ -986,5 +989,5 @@
 
       var comparerType = comparer.GetType();
-      if (Default.CompositeSerializers.Storable.StorableClassAttribute.IsStorableClass(comparerType))
+      if (Default.CompositeSerializers.Storable.StorableTypeAttribute.IsStorableType(comparerType))
         dictionaryBox.SetComparerId(mapper.GetBoxId(comparer));
       else if (comparerType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy).Any())
