diff --git a/include/ObjectRegistry.h b/include/ObjectRegistry.h
new file mode 100644
index 0000000000000000000000000000000000000000..d330feefc7b75fa6e32a5748e468070fdee3d4b8
--- /dev/null
+++ b/include/ObjectRegistry.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2006, NIF File Format Library and Tools
+All rights reserved.  Please see niflib.h for license. */
+
+#include <map>
+#include <string>
+#include "obj/Niobject.h"
+
+namespace Niflib {
+
+using namespace std;
+typedef NiObject * (*obj_factory_func)();
+
+/*!
+ * Stores the mapping between object names and factory function pointers to create them
+ */
+class ObjectRegistry {
+public:
+	/*!
+	 * Registers a new type of NiObject for use by the Read functions.
+	 * \param[in] type_name The textual name of the object that will appear in the NIF file.  For example: "NiNode"
+	 * \param[in] create_func The Create function of the NiObject that will be called during file reading to initialize new objects of the types encountered in the file.
+	 */
+	NIFLIB_API static void RegisterObject( const string & type_name, obj_factory_func create_func );
+
+	/*! 
+	 * NIFLIB_HIDDEN function.  For internal use only.
+	 * Called during file reads to create objects of a named type.
+	 */
+	NIFLIB_HIDDEN static NiObject * CreateObject( const string & type_name );
+
+private:
+	static map<string, obj_factory_func> object_map;
+};
+
+} //End namespace Niflib
\ No newline at end of file
diff --git a/include/niflib.h b/include/niflib.h
index 4520af407f2e3a29c5ce085dda1841c95b9b6780..e57f78c91b803c08977ef36feb288a6627975a49 100644
--- a/include/niflib.h
+++ b/include/niflib.h
@@ -213,9 +213,6 @@ NIFLIB_API Ref<NiNode> FindCommonAncestor( const vector< Ref<NiAVObject> > & obj
  */
 NIFLIB_API list< Ref<NiNode> > ListAncestors( NiAVObject * leaf );
 
-/*! NIFLIB_HIDDEN function.  For internal use only. */
-NIFLIB_HIDDEN Ref<NiObject> CreateObject( string obj_type );
-
 /*!
  * Returns whether the requested version is explicitly supported.  This does
  * not mean that the file will not open, rather it means that we have not
diff --git a/niflib.vcproj b/niflib.vcproj
index b54dfb79a5be3f461606f7765bb17266b5382718..3dbfb45654f79e887d0a7a7ffbb5a287bcd57698 100644
--- a/niflib.vcproj
+++ b/niflib.vcproj
@@ -341,6 +341,10 @@
 					/>
 				</FileConfiguration>
 			</File>
+			<File
+				RelativePath=".\src\ObjectRegistry.cpp"
+				>
+			</File>
 			<File
 				RelativePath=".\src\Type.cpp"
 				>
@@ -1563,6 +1567,10 @@
 				RelativePath=".\include\niflib.h"
 				>
 			</File>
+			<File
+				RelativePath=".\include\ObjectRegistry.h"
+				>
+			</File>
 			<File
 				RelativePath=".\include\Ref.h"
 				>
diff --git a/src/ObjectRegistry.cpp b/src/ObjectRegistry.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..033eb956e4ba29208e409f1bad9e45b0e30a2af5
--- /dev/null
+++ b/src/ObjectRegistry.cpp
@@ -0,0 +1,27 @@
+/* Copyright (c) 2006, NIF File Format Library and Tools
+All rights reserved.  Please see niflib.h for license. */
+
+#include "../include/ObjectRegistry.h"
+
+namespace Niflib {
+
+void ObjectRegistry::RegisterObject( const string & type_name, obj_factory_func create_func ) {
+	object_map[type_name] = create_func;
+}
+
+NiObject * ObjectRegistry::CreateObject( const string & type_name ) {
+	NiObject * object = NULL;
+
+	map<string, obj_factory_func>::iterator it;
+	it = object_map.find(type_name);
+
+	if ( it != object_map.end() ) {
+		//Requested type has been registered
+		return it->second();
+	} else {
+		//An unknown type has been encountered
+		return NULL; //Return null
+	}
+}
+
+} //End namespace Niflib
\ No newline at end of file
diff --git a/src/niflib.cpp b/src/niflib.cpp
index 5a434a0b66d4fcb9a46fd3440886ec629ca93601..bf790484aa2fedbb236206e75e751404e01d795b 100644
--- a/src/niflib.cpp
+++ b/src/niflib.cpp
@@ -9,6 +9,7 @@ All rights reserved.  Please see niflib.h for license. */
 
 #include "../include/niflib.h"
 #include "../include/NIF_IO.h"
+#include "../include/ObjectRegistry.h"
 #include "../include/kfm.h"
 #include "../include/obj/NiObject.h"
 #include "../include/obj/NiNode.h"
@@ -36,11 +37,6 @@ All rights reserved.  Please see niflib.h for license. */
 
 namespace Niflib {
 
-//Stores the mapping between object names and factory function pointers to create them
-typedef NiObject * (*obj_factory_func)();
-bool global_object_map_init = false;
-map<string, obj_factory_func> global_object_map;
-
 //Utility Functions
 void EnumerateObjects( NiObject * root, map<Type*,unsigned int> & type_map, map<NiObjectRef, unsigned int> & link_map, bool reverse = false );
 NiObjectRef FindRoot( vector<NiObjectRef> const & objects );
@@ -59,23 +55,6 @@ static void SplitNifTree( NiObject * root_object, NiObject * xnif_root, list<NiO
 
 //--Function Bodies--//
 
-NiObjectRef CreateObject( string obj_type ) {
-	NiObject * object = NULL;
-
-	map<string, obj_factory_func>::iterator it;
-	it = global_object_map.find(obj_type);
-
-	if ( it != global_object_map.end() ) {
-		//Requested type has been registered
-		object = it->second();
-	} else {
-		//An unknown type has been encountered
-		return NULL; //Return null
-	}
-	
-	return NiObjectRef(object);
-}
-
 NiObjectRef ReadNifTree( string const & file_name, NifInfo * info ) {
 	//Read object list
 	vector<NiObjectRef> objects = ReadNifList( file_name, info );
@@ -272,7 +251,7 @@ vector<NiObjectRef> ReadNifList( istream & in, NifInfo * info ) {
 		}
 
 		//Create object of the type that was found
-		new_obj = CreateObject(objectType);
+		new_obj = ObjectRegistry::CreateObject(objectType);
 
 		//Check for an unknown object type
 		if ( new_obj == NULL ) {
@@ -935,7 +914,7 @@ void MergeNifTrees( NiNode * target, NiControllerSequence * right, unsigned vers
 
 				//If the controller wasn't found, create one of the right type and attach it
 				if ( ctlr == NULL ) {
-					NiObjectRef new_ctlr = CreateObject( ctlr_type );
+					NiObjectRef new_ctlr = ObjectRegistry::CreateObject( ctlr_type );
 					ctlr = DynamicCast<NiSingleInterpController>( new_ctlr );
 					if ( ctlr == NULL ) {
 						throw runtime_error ("Non-NiSingleInterpController controller found in KF file.");
diff --git a/src/obj/AParticleModifier.cpp b/src/obj/AParticleModifier.cpp
index cf6f07dcd4aacc79d1af3d59fab1fbb163587a7d..1e44289f77d11c4d9a8b4232f4b56a28eb51c5d4 100644
--- a/src/obj/AParticleModifier.cpp
+++ b/src/obj/AParticleModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/AParticleModifier.h"
 #include "../../include/obj/NiParticleSystemController.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["AParticleModifier"] = AParticleModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "AParticleModifier", AParticleModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/AvoidNode.cpp b/src/obj/AvoidNode.cpp
index 1a12619a7c2f3434712128b36ff717f2dd22e036..77f85ce33553f63d70e785ff26786e547024a842 100644
--- a/src/obj/AvoidNode.cpp
+++ b/src/obj/AvoidNode.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/AvoidNode.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["AvoidNode"] = AvoidNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "AvoidNode", AvoidNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/BSBound.cpp b/src/obj/BSBound.cpp
index 254611c02619c9af7459914f9591252f676a15a4..80e4d3eff6f758ab333cf45fcccd62dcb2710b1e 100644
--- a/src/obj/BSBound.cpp
+++ b/src/obj/BSBound.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/BSBound.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["BSBound"] = BSBound::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "BSBound", BSBound::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/BSFurnitureMarker.cpp b/src/obj/BSFurnitureMarker.cpp
index 160d40165c7240c8347e7bcc734e48c251abdf9d..453b9b0b8c54748e547fadec441be19d52d552b5 100644
--- a/src/obj/BSFurnitureMarker.cpp
+++ b/src/obj/BSFurnitureMarker.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/BSFurnitureMarker.h"
 #include "../../include/gen/FurniturePosition.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["BSFurnitureMarker"] = BSFurnitureMarker::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "BSFurnitureMarker", BSFurnitureMarker::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/BSKeyframeController.cpp b/src/obj/BSKeyframeController.cpp
index 152152e07407476f0185eb8462cdc0cc513f9600..b5d36e56f6d2945f33e921d7bfe06c75c49f57a6 100644
--- a/src/obj/BSKeyframeController.cpp
+++ b/src/obj/BSKeyframeController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/BSKeyframeController.h"
 #include "../../include/obj/NiKeyframeData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["BSKeyframeController"] = BSKeyframeController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "BSKeyframeController", BSKeyframeController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/BSPSysArrayEmitter.cpp b/src/obj/BSPSysArrayEmitter.cpp
index 0b9a0585c7ec71a531ba85c3d9df77726db7bf2a..f2d6615d47261851c766ab203421c1fe54d3b9d0 100644
--- a/src/obj/BSPSysArrayEmitter.cpp
+++ b/src/obj/BSPSysArrayEmitter.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/BSPSysArrayEmitter.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["BSPSysArrayEmitter"] = BSPSysArrayEmitter::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "BSPSysArrayEmitter", BSPSysArrayEmitter::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/BSParentVelocityModifier.cpp b/src/obj/BSParentVelocityModifier.cpp
index 84e886e2a8f1665f47236d2afd9ae10eaf94092a..454aaf913f22b2304cfc8c2f8ae3acc9bb30aee2 100644
--- a/src/obj/BSParentVelocityModifier.cpp
+++ b/src/obj/BSParentVelocityModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/BSParentVelocityModifier.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["BSParentVelocityModifier"] = BSParentVelocityModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "BSParentVelocityModifier", BSParentVelocityModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/BSWindModifier.cpp b/src/obj/BSWindModifier.cpp
index 86c6f9e0cf29d437f8d814bfa75c459201769279..23b566be9d8c9f162440b025f047b2789dfe54e6 100644
--- a/src/obj/BSWindModifier.cpp
+++ b/src/obj/BSWindModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/BSWindModifier.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["BSWindModifier"] = BSWindModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "BSWindModifier", BSWindModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/BSXFlags.cpp b/src/obj/BSXFlags.cpp
index 6af9d6acc65e999d8bd3b4e0a4b6daca12b26d1b..66b7760b1acce628bfa583bc27acd0ef358fbcb7 100644
--- a/src/obj/BSXFlags.cpp
+++ b/src/obj/BSXFlags.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/BSXFlags.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["BSXFlags"] = BSXFlags::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "BSXFlags", BSXFlags::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/FxButton.cpp b/src/obj/FxButton.cpp
index 51f49376d8df2b1fd88923847e37906a081a1371..65ac6e670dfb39957688a4f4f38292aa9f1a1c99 100644
--- a/src/obj/FxButton.cpp
+++ b/src/obj/FxButton.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/FxButton.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["FxButton"] = FxButton::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "FxButton", FxButton::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/FxRadioButton.cpp b/src/obj/FxRadioButton.cpp
index d6d8af0ff8fccde61ffd20e57d5ba3e1e3b03cfe..e9c30aaac3d9d85716a84c9fb4f572363b61b291 100644
--- a/src/obj/FxRadioButton.cpp
+++ b/src/obj/FxRadioButton.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/FxRadioButton.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["FxRadioButton"] = FxRadioButton::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "FxRadioButton", FxRadioButton::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/FxWidget.cpp b/src/obj/FxWidget.cpp
index 383403845fe0f5f465612570aa70ee6f3641bd59..5cdb7f9a9a38d231b517f673c8323dd1a55f1a4e 100644
--- a/src/obj/FxWidget.cpp
+++ b/src/obj/FxWidget.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/FxWidget.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["FxWidget"] = FxWidget::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "FxWidget", FxWidget::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiAVObject.cpp b/src/obj/NiAVObject.cpp
index cef4ad85950bf217d5de4be50b6c0e25cbe55f6e..10c834c855e114a486ba625716683c269fdba7f1 100644
--- a/src/obj/NiAVObject.cpp
+++ b/src/obj/NiAVObject.cpp
@@ -12,6 +12,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiAVObject.h"
 #include "../../include/gen/BoundingBox.h"
@@ -59,8 +60,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiAVObject"] = NiAVObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiAVObject", NiAVObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiAVObjectPalette.cpp b/src/obj/NiAVObjectPalette.cpp
index 046ba7ea9eb7682b437988eaf5866c225716e7b4..bb08ec95a7f437ed7276a26d6cf911a71448a6b0 100644
--- a/src/obj/NiAVObjectPalette.cpp
+++ b/src/obj/NiAVObjectPalette.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiAVObjectPalette.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiAVObjectPalette"] = NiAVObjectPalette::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiAVObjectPalette", NiAVObjectPalette::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiAlphaController.cpp b/src/obj/NiAlphaController.cpp
index a1726601058928bfd2e0d4b3732cebbf8b4f656d..7078380f9b22c5c400f252c29cb70a1ef6d80d9e 100644
--- a/src/obj/NiAlphaController.cpp
+++ b/src/obj/NiAlphaController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiAlphaController.h"
 #include "../../include/obj/NiFloatData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiAlphaController"] = NiAlphaController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiAlphaController", NiAlphaController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiAlphaProperty.cpp b/src/obj/NiAlphaProperty.cpp
index d474220583f75d4e9aa6c81d0bad814d93e58be6..e5969492c307225d972f9ff8ce61a7390787b9a7 100644
--- a/src/obj/NiAlphaProperty.cpp
+++ b/src/obj/NiAlphaProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiAlphaProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiAlphaProperty"] = NiAlphaProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiAlphaProperty", NiAlphaProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiAmbientLight.cpp b/src/obj/NiAmbientLight.cpp
index 00a6b97407aa0f538edb235a2b037354513c3cd5..6acfbc165dcfb2de3715532e9df6f71f2ecb6142 100644
--- a/src/obj/NiAmbientLight.cpp
+++ b/src/obj/NiAmbientLight.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiAmbientLight.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiAmbientLight"] = NiAmbientLight::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiAmbientLight", NiAmbientLight::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiAutoNormalParticles.cpp b/src/obj/NiAutoNormalParticles.cpp
index 3761fce0af092d341ee41e56b3cd88876cebda6d..fca65596367f65bf1669a359ad07c577dd5a48ba 100644
--- a/src/obj/NiAutoNormalParticles.cpp
+++ b/src/obj/NiAutoNormalParticles.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiAutoNormalParticles.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiAutoNormalParticles"] = NiAutoNormalParticles::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiAutoNormalParticles", NiAutoNormalParticles::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiAutoNormalParticlesData.cpp b/src/obj/NiAutoNormalParticlesData.cpp
index 5a37fb8a38a3799f9f0818733adeb3f3997a0e05..6160b4c1803bdd05c67836236d51d511709d2261 100644
--- a/src/obj/NiAutoNormalParticlesData.cpp
+++ b/src/obj/NiAutoNormalParticlesData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiAutoNormalParticlesData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiAutoNormalParticlesData"] = NiAutoNormalParticlesData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiAutoNormalParticlesData", NiAutoNormalParticlesData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSAnimationNode.cpp b/src/obj/NiBSAnimationNode.cpp
index a432f96454a53e3f99d84e74f3c7b84192687cff..c6df3d672b7f846e711bded7ca9e51722d82883f 100644
--- a/src/obj/NiBSAnimationNode.cpp
+++ b/src/obj/NiBSAnimationNode.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSAnimationNode.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSAnimationNode"] = NiBSAnimationNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSAnimationNode", NiBSAnimationNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSBoneLODController.cpp b/src/obj/NiBSBoneLODController.cpp
index 4ad4a229a65f075c8c5132ac07a97acaee0bec78..528ff282bfd0f699684d97cc2ae15d5c56509750 100644
--- a/src/obj/NiBSBoneLODController.cpp
+++ b/src/obj/NiBSBoneLODController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSBoneLODController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSBoneLODController"] = NiBSBoneLODController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSBoneLODController", NiBSBoneLODController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSPArrayController.cpp b/src/obj/NiBSPArrayController.cpp
index 18b56f754645c317f749e7f9f6088c5a08f9823b..8ac4a6b44e107efb2c2d9a4a47e5e70248364432 100644
--- a/src/obj/NiBSPArrayController.cpp
+++ b/src/obj/NiBSPArrayController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSPArrayController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSPArrayController"] = NiBSPArrayController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSPArrayController", NiBSPArrayController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSParticleNode.cpp b/src/obj/NiBSParticleNode.cpp
index 6a4fdd1b0c070cb89a355b24caf72ac53ffc28e2..58517d72ead7f3b37cdafea4dbb44a35b204f6db 100644
--- a/src/obj/NiBSParticleNode.cpp
+++ b/src/obj/NiBSParticleNode.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSParticleNode.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSParticleNode"] = NiBSParticleNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSParticleNode", NiBSParticleNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineBasisData.cpp b/src/obj/NiBSplineBasisData.cpp
index 9ad56109489218769c46dc8c6aac92e555d242bc..08ddbdbe8215235b3fc8207cd0ae931a39c77469 100644
--- a/src/obj/NiBSplineBasisData.cpp
+++ b/src/obj/NiBSplineBasisData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineBasisData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineBasisData"] = NiBSplineBasisData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineBasisData", NiBSplineBasisData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineCompFloatInterpolator.cpp b/src/obj/NiBSplineCompFloatInterpolator.cpp
index 3666250d679221fd0d9b84a02f6cb88c30deb377..3f41f2ca73f3340826ed2b4e318f339a31931128 100644
--- a/src/obj/NiBSplineCompFloatInterpolator.cpp
+++ b/src/obj/NiBSplineCompFloatInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineCompFloatInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineCompFloatInterpolator"] = NiBSplineCompFloatInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineCompFloatInterpolator", NiBSplineCompFloatInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineCompPoint3Interpolator.cpp b/src/obj/NiBSplineCompPoint3Interpolator.cpp
index 1f3e8b592fc63465ef2b49f2757ba7db2e1c4ef4..f8396f274fdcc87955c059a13e4613d6af2831f3 100644
--- a/src/obj/NiBSplineCompPoint3Interpolator.cpp
+++ b/src/obj/NiBSplineCompPoint3Interpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineCompPoint3Interpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineCompPoint3Interpolator"] = NiBSplineCompPoint3Interpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineCompPoint3Interpolator", NiBSplineCompPoint3Interpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineCompTransformInterpolator.cpp b/src/obj/NiBSplineCompTransformInterpolator.cpp
index 2d003834b0cab1794c225751d9b023d0826121ad..29332ff137c32820a9964bc1d38cecd2ba54d9da 100644
--- a/src/obj/NiBSplineCompTransformInterpolator.cpp
+++ b/src/obj/NiBSplineCompTransformInterpolator.cpp
@@ -18,6 +18,7 @@ static const int SizeofScale = 1;
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineCompTransformInterpolator.h"
 using namespace Niflib;
@@ -50,8 +51,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineCompTransformInterpolator"] = NiBSplineCompTransformInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineCompTransformInterpolator", NiBSplineCompTransformInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineData.cpp b/src/obj/NiBSplineData.cpp
index 47d5f87631b17f607edde05ea1bf69d0521dd3e4..716edb09e9673e4885a172eec74d66aa387ba81e 100644
--- a/src/obj/NiBSplineData.cpp
+++ b/src/obj/NiBSplineData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineData"] = NiBSplineData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineData", NiBSplineData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineFloatInterpolator.cpp b/src/obj/NiBSplineFloatInterpolator.cpp
index e4607bc4cb58c487bc10f94b0154048ce8025d01..241dc1303b03ded04ccc497a64fec70cdcb64a92 100644
--- a/src/obj/NiBSplineFloatInterpolator.cpp
+++ b/src/obj/NiBSplineFloatInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineFloatInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineFloatInterpolator"] = NiBSplineFloatInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineFloatInterpolator", NiBSplineFloatInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineInterpolator.cpp b/src/obj/NiBSplineInterpolator.cpp
index 27a486d8a2232bfac616a5eb9491282043bda699..abd688cefef033d53448ac87531b8def39f799bb 100644
--- a/src/obj/NiBSplineInterpolator.cpp
+++ b/src/obj/NiBSplineInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineInterpolator.h"
 #include "../../include/obj/NiBSplineData.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineInterpolator"] = NiBSplineInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineInterpolator", NiBSplineInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplinePoint3Interpolator.cpp b/src/obj/NiBSplinePoint3Interpolator.cpp
index 65f0342ff158bfc4f1516da95e2a128a4cea9fb8..60abf7b20c384c68d793424d1411aa97c562ea29 100644
--- a/src/obj/NiBSplinePoint3Interpolator.cpp
+++ b/src/obj/NiBSplinePoint3Interpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplinePoint3Interpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplinePoint3Interpolator"] = NiBSplinePoint3Interpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplinePoint3Interpolator", NiBSplinePoint3Interpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBSplineTransformInterpolator.cpp b/src/obj/NiBSplineTransformInterpolator.cpp
index b4415fe1f51c258f2e27cf0db71f7126897c6df6..7868b573256fdca924a9d6fb0ee1997b653f9104 100644
--- a/src/obj/NiBSplineTransformInterpolator.cpp
+++ b/src/obj/NiBSplineTransformInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBSplineTransformInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBSplineTransformInterpolator"] = NiBSplineTransformInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBSplineTransformInterpolator", NiBSplineTransformInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBillboardNode.cpp b/src/obj/NiBillboardNode.cpp
index 6624ed9a7bdad19297efd16ab352c79123ee7e28..879d3b68ac5047a7e7b6a35c66642eeaba74c536 100644
--- a/src/obj/NiBillboardNode.cpp
+++ b/src/obj/NiBillboardNode.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBillboardNode.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBillboardNode"] = NiBillboardNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBillboardNode", NiBillboardNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBinaryExtraData.cpp b/src/obj/NiBinaryExtraData.cpp
index e0f5c40ea630b919356b043762fbdc7b05e6c616..ba3ff098d8ec16c54b378b5c52804d3d36e03869 100644
--- a/src/obj/NiBinaryExtraData.cpp
+++ b/src/obj/NiBinaryExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBinaryExtraData.h"
 #include "../../include/gen/ByteArray.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBinaryExtraData"] = NiBinaryExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBinaryExtraData", NiBinaryExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBinaryVoxelData.cpp b/src/obj/NiBinaryVoxelData.cpp
index 054aabfb60f5d6057e98ef67f6ee2a0a17971788..7b98e2e09017c22175436345ebeac1c8bdc0a5da 100644
--- a/src/obj/NiBinaryVoxelData.cpp
+++ b/src/obj/NiBinaryVoxelData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBinaryVoxelData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBinaryVoxelData"] = NiBinaryVoxelData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBinaryVoxelData", NiBinaryVoxelData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBinaryVoxelExtraData.cpp b/src/obj/NiBinaryVoxelExtraData.cpp
index 5eff1b339492d30024acf287b5974a3391aef31c..118b61c8db6e0c31b8fd467d72e0f3b9e7598044 100644
--- a/src/obj/NiBinaryVoxelExtraData.cpp
+++ b/src/obj/NiBinaryVoxelExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBinaryVoxelExtraData.h"
 #include "../../include/obj/NiBinaryVoxelData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBinaryVoxelExtraData"] = NiBinaryVoxelExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBinaryVoxelExtraData", NiBinaryVoxelExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBlendBoolInterpolator.cpp b/src/obj/NiBlendBoolInterpolator.cpp
index 23e8da39ffa2ef184ca1c1de3b97b51012d996fc..90d0dfef86b202d93ce6062872f2748e2b0cfa06 100644
--- a/src/obj/NiBlendBoolInterpolator.cpp
+++ b/src/obj/NiBlendBoolInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBlendBoolInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBlendBoolInterpolator"] = NiBlendBoolInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBlendBoolInterpolator", NiBlendBoolInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBlendFloatInterpolator.cpp b/src/obj/NiBlendFloatInterpolator.cpp
index 49dca8b08684d9346d709d4c701ab749a6944524..6876010cd14ba31bc8dbaa4c476d6e257b5e7f8c 100644
--- a/src/obj/NiBlendFloatInterpolator.cpp
+++ b/src/obj/NiBlendFloatInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBlendFloatInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBlendFloatInterpolator"] = NiBlendFloatInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBlendFloatInterpolator", NiBlendFloatInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBlendInterpolator.cpp b/src/obj/NiBlendInterpolator.cpp
index 18e329acce9507f58e1d113c86747d857c2721fb..6153f61cf47822617f59bedc928b6d3533c60a18 100644
--- a/src/obj/NiBlendInterpolator.cpp
+++ b/src/obj/NiBlendInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBlendInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBlendInterpolator"] = NiBlendInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBlendInterpolator", NiBlendInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBlendPoint3Interpolator.cpp b/src/obj/NiBlendPoint3Interpolator.cpp
index d10ebc1276ee6ca40ecc5cf389561249716ed46a..c1479c4a3b55cb2c2199e68adc637366fbfff0cf 100644
--- a/src/obj/NiBlendPoint3Interpolator.cpp
+++ b/src/obj/NiBlendPoint3Interpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBlendPoint3Interpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBlendPoint3Interpolator"] = NiBlendPoint3Interpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBlendPoint3Interpolator", NiBlendPoint3Interpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBlendTransformInterpolator.cpp b/src/obj/NiBlendTransformInterpolator.cpp
index c32ccbd9f1f09e7a7ad40c5bb60f4bf66df557e8..c9c9b1acf69910d41ab79ed56e23c5aa0361d4e5 100644
--- a/src/obj/NiBlendTransformInterpolator.cpp
+++ b/src/obj/NiBlendTransformInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBlendTransformInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBlendTransformInterpolator"] = NiBlendTransformInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBlendTransformInterpolator", NiBlendTransformInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBone.cpp b/src/obj/NiBone.cpp
index ec52c4dbaaaaa07192fefefa28d8b0368f5aa93a..4d0e47f9577b82d43a86cf241c7b9495735123ba 100644
--- a/src/obj/NiBone.cpp
+++ b/src/obj/NiBone.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBone.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBone"] = NiBone::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBone", NiBone::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBoneLODController.cpp b/src/obj/NiBoneLODController.cpp
index 5e1683a74de02d55fa546b09b1e2becc80842443..5b56e5c374e5e1b4eae98cb3740536ec03a33aa5 100644
--- a/src/obj/NiBoneLODController.cpp
+++ b/src/obj/NiBoneLODController.cpp
@@ -12,6 +12,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBoneLODController.h"
 #include "../../include/gen/NodeGroup.h"
@@ -51,8 +52,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBoneLODController"] = NiBoneLODController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBoneLODController", NiBoneLODController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBoolData.cpp b/src/obj/NiBoolData.cpp
index 9596c12c4d4a394aa911926d42918e998a2ded81..a7ec06bb4bbffe0adabb88feaf363b56366b3772 100644
--- a/src/obj/NiBoolData.cpp
+++ b/src/obj/NiBoolData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBoolData.h"
 #include "../../include/gen/KeyGroup.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBoolData"] = NiBoolData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBoolData", NiBoolData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBoolInterpController.cpp b/src/obj/NiBoolInterpController.cpp
index 758d93629b27e6291ddbb6028c59d3027f6ab744..c0f305c461ece1fdf6b618344a80fc091ce1d1e3 100644
--- a/src/obj/NiBoolInterpController.cpp
+++ b/src/obj/NiBoolInterpController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBoolInterpController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBoolInterpController"] = NiBoolInterpController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBoolInterpController", NiBoolInterpController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBoolInterpolator.cpp b/src/obj/NiBoolInterpolator.cpp
index 8fe524bf7b52429ee2289fb6a1cabb32a58d6afa..edd57ad7a725f994c4634be0f3d95389f303751d 100644
--- a/src/obj/NiBoolInterpolator.cpp
+++ b/src/obj/NiBoolInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBoolInterpolator.h"
 #include "../../include/obj/NiBoolData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBoolInterpolator"] = NiBoolInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBoolInterpolator", NiBoolInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBoolTimelineInterpolator.cpp b/src/obj/NiBoolTimelineInterpolator.cpp
index 826fc438be4c85d51e4b5df025b6188acb7f61e6..a9983bd61a2de8d799411b7569be1076d79b0ea2 100644
--- a/src/obj/NiBoolTimelineInterpolator.cpp
+++ b/src/obj/NiBoolTimelineInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBoolTimelineInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBoolTimelineInterpolator"] = NiBoolTimelineInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBoolTimelineInterpolator", NiBoolTimelineInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiBooleanExtraData.cpp b/src/obj/NiBooleanExtraData.cpp
index 789d465d94b1a29241afc6d855a9691d0226c314..2e372d869e53921b361f41483b9580e30565319a 100644
--- a/src/obj/NiBooleanExtraData.cpp
+++ b/src/obj/NiBooleanExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiBooleanExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiBooleanExtraData"] = NiBooleanExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiBooleanExtraData", NiBooleanExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiCamera.cpp b/src/obj/NiCamera.cpp
index a57df07a2b7b9e8aa790eff17eede138324ca50c..536c6b8ed6d7c24893632b1a292bd77676477ae2 100644
--- a/src/obj/NiCamera.cpp
+++ b/src/obj/NiCamera.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiCamera.h"
 #include "../../include/obj/NiObject.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiCamera"] = NiCamera::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiCamera", NiCamera::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiClod.cpp b/src/obj/NiClod.cpp
index 251d2508c348a7e3ca345e5d7140031c9c3b3d9a..8a8d64ff67cd8570fbf5cff260f8bf36a74b7b11 100644
--- a/src/obj/NiClod.cpp
+++ b/src/obj/NiClod.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiClod.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiClod"] = NiClod::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiClod", NiClod::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiClodData.cpp b/src/obj/NiClodData.cpp
index 3c35bc21df03c4b21d14397aa06ee1f4f907f9f8..7f6c060a8e2b520592ef298c7bf164befe0cb4a2 100644
--- a/src/obj/NiClodData.cpp
+++ b/src/obj/NiClodData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiClodData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiClodData"] = NiClodData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiClodData", NiClodData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiClodSkinInstance.cpp b/src/obj/NiClodSkinInstance.cpp
index 81ebf5805db45c2a790f7a8e3bcbecbb91715d42..42dab7edda8d2ebad1ff579bb38c3af393407fd0 100644
--- a/src/obj/NiClodSkinInstance.cpp
+++ b/src/obj/NiClodSkinInstance.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiClodSkinInstance.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiClodSkinInstance"] = NiClodSkinInstance::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiClodSkinInstance", NiClodSkinInstance::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiCollisionData.cpp b/src/obj/NiCollisionData.cpp
index 87b324da9aeb8fb20efc320cb5846b31ce1248b7..3402d9cb8f4bf63f180678d9eb2f61c431493fa7 100644
--- a/src/obj/NiCollisionData.cpp
+++ b/src/obj/NiCollisionData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiCollisionData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiCollisionData"] = NiCollisionData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiCollisionData", NiCollisionData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiCollisionObject.cpp b/src/obj/NiCollisionObject.cpp
index 74b140959c25b1db5d46b732c19d7587fc3b0e37..ce6ae5982cc21362a7f47902500a29a857083508 100644
--- a/src/obj/NiCollisionObject.cpp
+++ b/src/obj/NiCollisionObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiCollisionObject.h"
 #include "../../include/obj/NiAVObject.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiCollisionObject"] = NiCollisionObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiCollisionObject", NiCollisionObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiColorData.cpp b/src/obj/NiColorData.cpp
index d7cb5259f2b393692ff188857550e68a21947321..5cca66236b0b116dd3ba3819d7660527ae3fc4c6 100644
--- a/src/obj/NiColorData.cpp
+++ b/src/obj/NiColorData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiColorData.h"
 #include "../../include/gen/KeyGroup.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiColorData"] = NiColorData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiColorData", NiColorData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiColorExtraData.cpp b/src/obj/NiColorExtraData.cpp
index ae1ab91e2e2535135bae7ecf6143e2aac2b175a5..b4903136c96375fd08db9314ea80c19980e0d253 100644
--- a/src/obj/NiColorExtraData.cpp
+++ b/src/obj/NiColorExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiColorExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiColorExtraData"] = NiColorExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiColorExtraData", NiColorExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiControllerManager.cpp b/src/obj/NiControllerManager.cpp
index a1a95760dffd80034286682da7191215e6f3721f..0f28aa45a4515a5ee8cba1df998e45f3deaa560a 100644
--- a/src/obj/NiControllerManager.cpp
+++ b/src/obj/NiControllerManager.cpp
@@ -12,6 +12,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiControllerManager.h"
 #include "../../include/obj/NiControllerSequence.h"
@@ -46,8 +47,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiControllerManager"] = NiControllerManager::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiControllerManager", NiControllerManager::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiControllerSequence.cpp b/src/obj/NiControllerSequence.cpp
index e2b842eb8a130e4fd2a4924b7b2460785094eefc..2c2182974a18dafcad55bd9f5deadc9771782df9 100644
--- a/src/obj/NiControllerSequence.cpp
+++ b/src/obj/NiControllerSequence.cpp
@@ -15,6 +15,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiControllerSequence.h"
 #include "../../include/obj/NiTextKeyExtraData.h"
@@ -50,8 +51,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiControllerSequence"] = NiControllerSequence::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiControllerSequence", NiControllerSequence::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiDefaultAVObjectPalette.cpp b/src/obj/NiDefaultAVObjectPalette.cpp
index b2a7edefd10f6d5fb48fbfc15196c9e38f2e05be..714b12d8bd7c81559ea1d44ee670b2185786e0f9 100644
--- a/src/obj/NiDefaultAVObjectPalette.cpp
+++ b/src/obj/NiDefaultAVObjectPalette.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiDefaultAVObjectPalette.h"
 #include "../../include/gen/AVObject.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiDefaultAVObjectPalette"] = NiDefaultAVObjectPalette::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiDefaultAVObjectPalette", NiDefaultAVObjectPalette::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiDirectionalLight.cpp b/src/obj/NiDirectionalLight.cpp
index 3677c65661f6ccbd66ac04be2f6c8cfb2de6545d..1ccfdeafa2d6abaccb073405d8ad1869e1cc8511 100644
--- a/src/obj/NiDirectionalLight.cpp
+++ b/src/obj/NiDirectionalLight.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiDirectionalLight.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiDirectionalLight"] = NiDirectionalLight::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiDirectionalLight", NiDirectionalLight::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiDitherProperty.cpp b/src/obj/NiDitherProperty.cpp
index 3aa1236686e8054dba6aed43289e37f4deb1f386..b51535606e9b7db3652dc59e3f62459182646253 100644
--- a/src/obj/NiDitherProperty.cpp
+++ b/src/obj/NiDitherProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiDitherProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiDitherProperty"] = NiDitherProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiDitherProperty", NiDitherProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiDynamicEffect.cpp b/src/obj/NiDynamicEffect.cpp
index c7880ff1558265ebc972d0f745e16ca5e451e211..be771fd2f68cb8796c9eaca4c36c202009b70f64 100644
--- a/src/obj/NiDynamicEffect.cpp
+++ b/src/obj/NiDynamicEffect.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiDynamicEffect.h"
 #include "../../include/obj/NiAVObject.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiDynamicEffect"] = NiDynamicEffect::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiDynamicEffect", NiDynamicEffect::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiExtraData.cpp b/src/obj/NiExtraData.cpp
index 5e5f7aa9c3227f3373a0b4d2e632ab96ee713bd1..1cb9a689dc8434e96fd033b9f44bdadc6c0c4439 100644
--- a/src/obj/NiExtraData.cpp
+++ b/src/obj/NiExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiExtraData"] = NiExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiExtraData", NiExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiExtraDataController.cpp b/src/obj/NiExtraDataController.cpp
index 44109f6e4b9e1fbf2c485d68594db946b6ca231c..cb6a2726b0291d03e2f5858b5e53e6cddd53286a 100644
--- a/src/obj/NiExtraDataController.cpp
+++ b/src/obj/NiExtraDataController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiExtraDataController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiExtraDataController"] = NiExtraDataController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiExtraDataController", NiExtraDataController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFlipController.cpp b/src/obj/NiFlipController.cpp
index 6e34abc492b2d51d5acb8614aa7430acad58090e..57cbb3d9ddb3d1f1a169055ba867e9b6d84bb5f0 100644
--- a/src/obj/NiFlipController.cpp
+++ b/src/obj/NiFlipController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFlipController.h"
 #include "../../include/obj/NiSourceTexture.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFlipController"] = NiFlipController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFlipController", NiFlipController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFloatData.cpp b/src/obj/NiFloatData.cpp
index e97a5cc636c0f08329289f0314fbda7df6272756..6663f85f4a3289047ef06cbbdbb6a4fbf1b03fb5 100644
--- a/src/obj/NiFloatData.cpp
+++ b/src/obj/NiFloatData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFloatData.h"
 #include "../../include/gen/KeyGroup.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFloatData"] = NiFloatData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFloatData", NiFloatData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFloatExtraData.cpp b/src/obj/NiFloatExtraData.cpp
index 0a1609e1b1e3ffe7f0c1e3e9f9ccade706601ce2..04cb9d6b8b3c75f1c8ccb2ae54fe3cb7cef16ff0 100644
--- a/src/obj/NiFloatExtraData.cpp
+++ b/src/obj/NiFloatExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFloatExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFloatExtraData"] = NiFloatExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFloatExtraData", NiFloatExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFloatExtraDataController.cpp b/src/obj/NiFloatExtraDataController.cpp
index 45ab9b1e0dd96301cfe959c4052f7e9e45c1dd2f..458eaac5ea229b50eea42019dc75a1febebf7d16 100644
--- a/src/obj/NiFloatExtraDataController.cpp
+++ b/src/obj/NiFloatExtraDataController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFloatExtraDataController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFloatExtraDataController"] = NiFloatExtraDataController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFloatExtraDataController", NiFloatExtraDataController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFloatInterpController.cpp b/src/obj/NiFloatInterpController.cpp
index 9fe2f90aa8515d73b1bdc816da7dba9cae368d48..1024dc0b8c9104c362acf7702d4b57a39b4c7eb0 100644
--- a/src/obj/NiFloatInterpController.cpp
+++ b/src/obj/NiFloatInterpController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFloatInterpController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFloatInterpController"] = NiFloatInterpController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFloatInterpController", NiFloatInterpController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFloatInterpolator.cpp b/src/obj/NiFloatInterpolator.cpp
index 2dc28e0656cf10695d78eb54b9c7844d4a1d11b1..b466cf885f31acd20e171ac63f1a8c1056f93357 100644
--- a/src/obj/NiFloatInterpolator.cpp
+++ b/src/obj/NiFloatInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFloatInterpolator.h"
 #include "../../include/obj/NiFloatData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFloatInterpolator"] = NiFloatInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFloatInterpolator", NiFloatInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFloatsExtraData.cpp b/src/obj/NiFloatsExtraData.cpp
index 48c17b44c177e1b6ed3bbe3551fd36f032326e51..3685e1425367b1e31af29edc6ff5dd4afab932f3 100644
--- a/src/obj/NiFloatsExtraData.cpp
+++ b/src/obj/NiFloatsExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFloatsExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFloatsExtraData"] = NiFloatsExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFloatsExtraData", NiFloatsExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiFogProperty.cpp b/src/obj/NiFogProperty.cpp
index 179c07d349ef8378c5a2cc3f8b4032d8fbefd9fa..f69a156c4046658c871b2b9a4b077c680fd278bf 100644
--- a/src/obj/NiFogProperty.cpp
+++ b/src/obj/NiFogProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiFogProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiFogProperty"] = NiFogProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiFogProperty", NiFogProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiGeomMorpherController.cpp b/src/obj/NiGeomMorpherController.cpp
index 7ad8ddadc72ea8df66b004fed8bee47069be9eec..f69abc37009d7d60410f4c66e3edd402e2a9d519 100644
--- a/src/obj/NiGeomMorpherController.cpp
+++ b/src/obj/NiGeomMorpherController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiGeomMorpherController.h"
 #include "../../include/obj/NiMorphData.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiGeomMorpherController"] = NiGeomMorpherController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiGeomMorpherController", NiGeomMorpherController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiGeometry.cpp b/src/obj/NiGeometry.cpp
index 9018e0de6090340424ebc67d04fdd114417b5a58..32ede96e868fde33190ad63aa05a2d2c4df4abbb 100644
--- a/src/obj/NiGeometry.cpp
+++ b/src/obj/NiGeometry.cpp
@@ -14,6 +14,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiGeometry.h"
 #include "../../include/obj/NiGeometryData.h"
@@ -49,8 +50,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiGeometry"] = NiGeometry::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiGeometry", NiGeometry::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiGeometryData.cpp b/src/obj/NiGeometryData.cpp
index db06751cc93b0a47c5419c8ec1406098b7de0b6e..c9c0c1ea6a1ad6300ef2ce1f3796075484fa6ddc 100644
--- a/src/obj/NiGeometryData.cpp
+++ b/src/obj/NiGeometryData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiGeometryData.h"
 #include "../../include/obj/NiObject.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiGeometryData"] = NiGeometryData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiGeometryData", NiGeometryData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiGravity.cpp b/src/obj/NiGravity.cpp
index 359ed3deb7cd4475d1db3376c7d9d62be3b570e8..6028bf17f0c5bcdf1d24944c0567591924a69718 100644
--- a/src/obj/NiGravity.cpp
+++ b/src/obj/NiGravity.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiGravity.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiGravity"] = NiGravity::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiGravity", NiGravity::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiImage.cpp b/src/obj/NiImage.cpp
index 9ec15b4cc3f6593f871124ba8c822aa21727f495..e92f34c8262e3accb244285b252c4953c18304d7 100644
--- a/src/obj/NiImage.cpp
+++ b/src/obj/NiImage.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiImage.h"
 #include "../../include/obj/NiRawImageData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiImage"] = NiImage::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiImage", NiImage::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiIntegerExtraData.cpp b/src/obj/NiIntegerExtraData.cpp
index 7ae0e1fd7f5b88bea7a6b1c453a09336c6253215..aba40b8c9284860068ce5c964cce75721d7b0903 100644
--- a/src/obj/NiIntegerExtraData.cpp
+++ b/src/obj/NiIntegerExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiIntegerExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiIntegerExtraData"] = NiIntegerExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiIntegerExtraData", NiIntegerExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiIntegersExtraData.cpp b/src/obj/NiIntegersExtraData.cpp
index 2972e963a9d622595f832d34c8eef4a7c9353f60..b04fd91f7543baaf34eaffbb1aa5590ab8aab96d 100644
--- a/src/obj/NiIntegersExtraData.cpp
+++ b/src/obj/NiIntegersExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiIntegersExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiIntegersExtraData"] = NiIntegersExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiIntegersExtraData", NiIntegersExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiInterpController.cpp b/src/obj/NiInterpController.cpp
index c26645b62ee70586bad331aebbaee706fa0e60b1..e0b950980dcd2c84f195ded0868303472400921f 100644
--- a/src/obj/NiInterpController.cpp
+++ b/src/obj/NiInterpController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiInterpController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiInterpController"] = NiInterpController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiInterpController", NiInterpController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiInterpolator.cpp b/src/obj/NiInterpolator.cpp
index 90dcfe06499bc6ff80155a23827784f94ce28f72..6dd2cd92a8f94122e98f713bb02635585baa51a1 100644
--- a/src/obj/NiInterpolator.cpp
+++ b/src/obj/NiInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiInterpolator"] = NiInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiInterpolator", NiInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiKeyBasedInterpolator.cpp b/src/obj/NiKeyBasedInterpolator.cpp
index f8b76bf5bf2758f32b917da4943448a55a73c74c..e17ecce55cff287d1e8ede46e25ce670fd16ce58 100644
--- a/src/obj/NiKeyBasedInterpolator.cpp
+++ b/src/obj/NiKeyBasedInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiKeyBasedInterpolator.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiKeyBasedInterpolator"] = NiKeyBasedInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiKeyBasedInterpolator", NiKeyBasedInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiKeyframeController.cpp b/src/obj/NiKeyframeController.cpp
index 6d709bd596c271963571b74591077d4cbf46dfd9..d1b3d86ae068189288aed563ba017336be2d02a7 100644
--- a/src/obj/NiKeyframeController.cpp
+++ b/src/obj/NiKeyframeController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiKeyframeController.h"
 #include "../../include/obj/NiKeyframeData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiKeyframeController"] = NiKeyframeController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiKeyframeController", NiKeyframeController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiKeyframeData.cpp b/src/obj/NiKeyframeData.cpp
index 1e145de28242686e03a13744bf3a887be176c5a6..a9335ed5fcda1eea89b9a44746ccffd786fd6956 100644
--- a/src/obj/NiKeyframeData.cpp
+++ b/src/obj/NiKeyframeData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiKeyframeData.h"
 #include "../../include/gen/KeyGroup.h"
@@ -46,8 +47,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiKeyframeData"] = NiKeyframeData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiKeyframeData", NiKeyframeData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiLODData.cpp b/src/obj/NiLODData.cpp
index 690649a1e34177616c134045224b9a52c975e428..fae71e1cd98fea089a5addc5de766f8f04717220 100644
--- a/src/obj/NiLODData.cpp
+++ b/src/obj/NiLODData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiLODData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiLODData"] = NiLODData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiLODData", NiLODData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiLODNode.cpp b/src/obj/NiLODNode.cpp
index 082ec978c4246fb1f0788da6ca432a15dc542e17..ef95d3d905a9f726eede7272ede96c9f062a6dab 100644
--- a/src/obj/NiLODNode.cpp
+++ b/src/obj/NiLODNode.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiLODNode.h"
 #include "../../include/gen/LODRange.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiLODNode"] = NiLODNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiLODNode", NiLODNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiLight.cpp b/src/obj/NiLight.cpp
index a80428da42ca30398c3be01e3bef660683ed899a..458a5e2eaa54ebf3332e1c4437f8109ff509f9a2 100644
--- a/src/obj/NiLight.cpp
+++ b/src/obj/NiLight.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiLight.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiLight"] = NiLight::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiLight", NiLight::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiLightColorController.cpp b/src/obj/NiLightColorController.cpp
index 2d048f1bb94b135ecaec2010ed38eda67252c3dc..82447d5e551804a42ccab6a92de8bc2f9c8b2d0a 100644
--- a/src/obj/NiLightColorController.cpp
+++ b/src/obj/NiLightColorController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiLightColorController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiLightColorController"] = NiLightColorController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiLightColorController", NiLightColorController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiLightDimmerController.cpp b/src/obj/NiLightDimmerController.cpp
index 46c0e9e7bd6e73090e442e3eb052761e716093ec..d0b16f762a9faa426356fbb5ce93300b2fe7e4e5 100644
--- a/src/obj/NiLightDimmerController.cpp
+++ b/src/obj/NiLightDimmerController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiLightDimmerController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiLightDimmerController"] = NiLightDimmerController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiLightDimmerController", NiLightDimmerController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiLookAtController.cpp b/src/obj/NiLookAtController.cpp
index 675403fb3099114136ac4f9cf604d4b6998f15b9..80969a630c5928f84ecc4b5e48307aba5f13058b 100644
--- a/src/obj/NiLookAtController.cpp
+++ b/src/obj/NiLookAtController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiLookAtController.h"
 #include "../../include/obj/NiNode.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiLookAtController"] = NiLookAtController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiLookAtController", NiLookAtController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiLookAtInterpolator.cpp b/src/obj/NiLookAtInterpolator.cpp
index b7c8dd657cd2431860e7ac953c7bfb1bcaae56c8..735ec098881bf1cbd9ec6d2d3f9d13eb454118c9 100644
--- a/src/obj/NiLookAtInterpolator.cpp
+++ b/src/obj/NiLookAtInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiLookAtInterpolator.h"
 #include "../../include/obj/NiNode.h"
@@ -46,8 +47,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiLookAtInterpolator"] = NiLookAtInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiLookAtInterpolator", NiLookAtInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiMaterialColorController.cpp b/src/obj/NiMaterialColorController.cpp
index 10993a968bcefcae85ae3d8c47319e93e576caef..a1f00d9b7e003e4d5cafbe111d630399bfa2784d 100644
--- a/src/obj/NiMaterialColorController.cpp
+++ b/src/obj/NiMaterialColorController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiMaterialColorController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiMaterialColorController"] = NiMaterialColorController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiMaterialColorController", NiMaterialColorController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiMaterialProperty.cpp b/src/obj/NiMaterialProperty.cpp
index c2ee56ee5e8f66f787a71cb0815c2258b6ffe027..27083f2fdd39b491c1886c74d3dadf523ff5b6f3 100644
--- a/src/obj/NiMaterialProperty.cpp
+++ b/src/obj/NiMaterialProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiMaterialProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiMaterialProperty"] = NiMaterialProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiMaterialProperty", NiMaterialProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiMeshPSysData.cpp b/src/obj/NiMeshPSysData.cpp
index 02dce6c3bec5453987c35517f05114ee73727e70..41fa21e83bdbd30233547097b7aee4973706ea5e 100644
--- a/src/obj/NiMeshPSysData.cpp
+++ b/src/obj/NiMeshPSysData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiMeshPSysData.h"
 #include "../../include/obj/NiObject.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiMeshPSysData"] = NiMeshPSysData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiMeshPSysData", NiMeshPSysData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiMeshParticleSystem.cpp b/src/obj/NiMeshParticleSystem.cpp
index a4c2c937556d8c6879acb5ce7a757ea4c329446f..5ada87513f7c41cd3bbf4fc3b9639066648b7978 100644
--- a/src/obj/NiMeshParticleSystem.cpp
+++ b/src/obj/NiMeshParticleSystem.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiMeshParticleSystem.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiMeshParticleSystem"] = NiMeshParticleSystem::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiMeshParticleSystem", NiMeshParticleSystem::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiMorphData.cpp b/src/obj/NiMorphData.cpp
index 11e22b00389dbdb0bbc6b214b109c9484efeb3e8..4ed0112b6d53e843f5a11c512d57af2e1c4c2ad5 100644
--- a/src/obj/NiMorphData.cpp
+++ b/src/obj/NiMorphData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiMorphData.h"
 #include "../../include/gen/Morph.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiMorphData"] = NiMorphData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiMorphData", NiMorphData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiMultiTargetTransformController.cpp b/src/obj/NiMultiTargetTransformController.cpp
index af1d7935c6be2b139cd2d8adddfea06bd5a74860..5f5fc0fdb5736fab2b3b4f68b21820ef4ab07cec 100644
--- a/src/obj/NiMultiTargetTransformController.cpp
+++ b/src/obj/NiMultiTargetTransformController.cpp
@@ -12,6 +12,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiMultiTargetTransformController.h"
 #include "../../include/obj/NiNode.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiMultiTargetTransformController"] = NiMultiTargetTransformController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiMultiTargetTransformController", NiMultiTargetTransformController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiMultiTextureProperty.cpp b/src/obj/NiMultiTextureProperty.cpp
index 11d4c754796fde9840ff3b04008e049fa77beb2d..1e959fbafba646ed2288cbb112ea45fb432203f6 100644
--- a/src/obj/NiMultiTextureProperty.cpp
+++ b/src/obj/NiMultiTextureProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiMultiTextureProperty.h"
 #include "../../include/gen/MultiTextureElement.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiMultiTextureProperty"] = NiMultiTextureProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiMultiTextureProperty", NiMultiTextureProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiNode.cpp b/src/obj/NiNode.cpp
index 5c774682b2813b6779493c3ea1b6e50a5a86f335..640cb62871bfffebeb76b83f48f011d6a61591a4 100644
--- a/src/obj/NiNode.cpp
+++ b/src/obj/NiNode.cpp
@@ -14,6 +14,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiNode.h"
 #include "../../include/obj/NiAVObject.h"
@@ -61,8 +62,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiNode"] = NiNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiNode", NiNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiObject.cpp b/src/obj/NiObject.cpp
index bc23c0383dcd811c04c7eba7fd0d6f8a45e4390f..cece301574b4696bc419a053afea90e5416fe3c4 100644
--- a/src/obj/NiObject.cpp
+++ b/src/obj/NiObject.cpp
@@ -12,6 +12,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiObject.h"
 using namespace Niflib;
@@ -48,8 +49,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiObject"] = NiObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiObject", NiObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
@@ -160,7 +161,7 @@ NiObjectRef NiObject::Clone( unsigned int version, unsigned int user_version ) {
 	stringstream tmp;
 
 	//Create a new object of the same type
-	NiObjectRef clone = CreateObject( this->GetType().GetTypeName() );
+	NiObjectRef clone = ObjectRegistry::CreateObject( this->GetType().GetTypeName() );
 
 	//Dummy map
 	map<NiObjectRef,unsigned int> link_map;
diff --git a/src/obj/NiObjectNET.cpp b/src/obj/NiObjectNET.cpp
index f248b86f466aa2fd037a457273b53efbe1cea8a3..281d0e67b7e06e4bb708e419d85f5f88525d275f 100644
--- a/src/obj/NiObjectNET.cpp
+++ b/src/obj/NiObjectNET.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiObjectNET.h"
 #include "../../include/obj/NiExtraData.h"
@@ -50,8 +51,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiObjectNET"] = NiObjectNET::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiObjectNET", NiObjectNET::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysAgeDeathModifier.cpp b/src/obj/NiPSysAgeDeathModifier.cpp
index f2f3a8cc13f02fa47204cdddf89ff7112a970cb0..c320fbe5963d1590695d6b5e3a87d573005031af 100644
--- a/src/obj/NiPSysAgeDeathModifier.cpp
+++ b/src/obj/NiPSysAgeDeathModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysAgeDeathModifier.h"
 #include "../../include/obj/NiPSysSpawnModifier.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysAgeDeathModifier"] = NiPSysAgeDeathModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysAgeDeathModifier", NiPSysAgeDeathModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysBombModifier.cpp b/src/obj/NiPSysBombModifier.cpp
index 3c37d5770869e7486d6eacfc52ef835be2c463b8..2e2e9a136bda458c5ca1f05f0dd61c1017a45eab 100644
--- a/src/obj/NiPSysBombModifier.cpp
+++ b/src/obj/NiPSysBombModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysBombModifier.h"
 #include "../../include/obj/NiNode.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysBombModifier"] = NiPSysBombModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysBombModifier", NiPSysBombModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysBoundUpdateModifier.cpp b/src/obj/NiPSysBoundUpdateModifier.cpp
index 5615c9d78d9cff5124b8009e5697708be7f3f477..9bc50ed425978688e7ad6216a9440d2c46d23875 100644
--- a/src/obj/NiPSysBoundUpdateModifier.cpp
+++ b/src/obj/NiPSysBoundUpdateModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysBoundUpdateModifier.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysBoundUpdateModifier"] = NiPSysBoundUpdateModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysBoundUpdateModifier", NiPSysBoundUpdateModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysBoxEmitter.cpp b/src/obj/NiPSysBoxEmitter.cpp
index 6f1ad84dc612df71957305924cc95f9b2e66a31e..d8ed4b13d86f0f08a805d727c9b1b0c8950ef283 100644
--- a/src/obj/NiPSysBoxEmitter.cpp
+++ b/src/obj/NiPSysBoxEmitter.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysBoxEmitter.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysBoxEmitter"] = NiPSysBoxEmitter::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysBoxEmitter", NiPSysBoxEmitter::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysCollider.cpp b/src/obj/NiPSysCollider.cpp
index 412f5eb2ed4c29a6d3c8bd70521e2c8fe82e6fee..01c5acbdcc69e9698e19b3dedbef5a0c70c4f6c0 100644
--- a/src/obj/NiPSysCollider.cpp
+++ b/src/obj/NiPSysCollider.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysCollider.h"
 #include "../../include/obj/NiPSysSpawnModifier.h"
@@ -46,8 +47,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysCollider"] = NiPSysCollider::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysCollider", NiPSysCollider::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysColliderManager.cpp b/src/obj/NiPSysColliderManager.cpp
index 4c53e5b5ce332f6c8040371ce2e114d628343a04..685c447f1e232818781089949b66d2ec6eadabfc 100644
--- a/src/obj/NiPSysColliderManager.cpp
+++ b/src/obj/NiPSysColliderManager.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysColliderManager.h"
 #include "../../include/obj/NiPSysPlanarCollider.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysColliderManager"] = NiPSysColliderManager::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysColliderManager", NiPSysColliderManager::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysColorModifier.cpp b/src/obj/NiPSysColorModifier.cpp
index b18f375f31869c8e15e56a8a7c925138662203d0..1f44adade6c7db2c0b0b0ac83dae82da0c7a4549 100644
--- a/src/obj/NiPSysColorModifier.cpp
+++ b/src/obj/NiPSysColorModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysColorModifier.h"
 #include "../../include/obj/NiColorData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysColorModifier"] = NiPSysColorModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysColorModifier", NiPSysColorModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysCylinderEmitter.cpp b/src/obj/NiPSysCylinderEmitter.cpp
index 0f77e7e0e8de8eac08133e93001e9b5c9e9e5b2c..4fe63557d3541b5b28c2d7f7c2263a25297279d4 100644
--- a/src/obj/NiPSysCylinderEmitter.cpp
+++ b/src/obj/NiPSysCylinderEmitter.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysCylinderEmitter.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysCylinderEmitter"] = NiPSysCylinderEmitter::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysCylinderEmitter", NiPSysCylinderEmitter::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysData.cpp b/src/obj/NiPSysData.cpp
index a57179ed840effe6cda8cab449ff690b0c26f6e8..6a27a00cf07a967c656ca9d5f187ac82e150ba48 100644
--- a/src/obj/NiPSysData.cpp
+++ b/src/obj/NiPSysData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysData"] = NiPSysData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysData", NiPSysData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysDragModifier.cpp b/src/obj/NiPSysDragModifier.cpp
index 5820d519a36d8df2940ba7e5c72dc3f91999c09e..46576d2cb09221e6ec5a8696efc9441cebbe89b1 100644
--- a/src/obj/NiPSysDragModifier.cpp
+++ b/src/obj/NiPSysDragModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysDragModifier.h"
 #include "../../include/obj/NiObject.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysDragModifier"] = NiPSysDragModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysDragModifier", NiPSysDragModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitter.cpp b/src/obj/NiPSysEmitter.cpp
index e52666f7076e8b131837c6e989f8806c40e2d134..b1fc2d87ac6d004234ae91ba883c73dafc61c23b 100644
--- a/src/obj/NiPSysEmitter.cpp
+++ b/src/obj/NiPSysEmitter.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitter.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitter"] = NiPSysEmitter::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitter", NiPSysEmitter::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitterCtlr.cpp b/src/obj/NiPSysEmitterCtlr.cpp
index 9c383159c22eab8ebb4798292dcb5f9058d80695..c37ad67fecea97de3ad0bc7dfc5a4d116d2dec22 100644
--- a/src/obj/NiPSysEmitterCtlr.cpp
+++ b/src/obj/NiPSysEmitterCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitterCtlr.h"
 #include "../../include/obj/NiPSysEmitterCtlrData.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitterCtlr"] = NiPSysEmitterCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitterCtlr", NiPSysEmitterCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitterCtlrData.cpp b/src/obj/NiPSysEmitterCtlrData.cpp
index 56d51f04c58dba9db71c843fad28152b7564a747..1989876b6f11ea87eb15ebd53f386d5f98f763e3 100644
--- a/src/obj/NiPSysEmitterCtlrData.cpp
+++ b/src/obj/NiPSysEmitterCtlrData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitterCtlrData.h"
 #include "../../include/gen/KeyGroup.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitterCtlrData"] = NiPSysEmitterCtlrData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitterCtlrData", NiPSysEmitterCtlrData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitterDeclinationCtlr.cpp b/src/obj/NiPSysEmitterDeclinationCtlr.cpp
index 70032b155b658ef6534f4482b93cbb4a7b1b79e8..8c662b081675a6053b4957006951e067b2a7f573 100644
--- a/src/obj/NiPSysEmitterDeclinationCtlr.cpp
+++ b/src/obj/NiPSysEmitterDeclinationCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitterDeclinationCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitterDeclinationCtlr"] = NiPSysEmitterDeclinationCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitterDeclinationCtlr", NiPSysEmitterDeclinationCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp b/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp
index f46a5b8a2e05fc1443528730f1629e8f74a021cd..2be970f5786779ac6cb460d568df206be198190c 100644
--- a/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp
+++ b/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitterDeclinationVarCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitterDeclinationVarCtlr"] = NiPSysEmitterDeclinationVarCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitterDeclinationVarCtlr", NiPSysEmitterDeclinationVarCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp b/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp
index 8b9c0426ffc47206880f1ec2669ecb0aaed2c682..8d82322b3e4c09cff6b767b0c7bd5b265c1a6ae5 100644
--- a/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp
+++ b/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitterInitialRadiusCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitterInitialRadiusCtlr"] = NiPSysEmitterInitialRadiusCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitterInitialRadiusCtlr", NiPSysEmitterInitialRadiusCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitterLifeSpanCtlr.cpp b/src/obj/NiPSysEmitterLifeSpanCtlr.cpp
index 37eb730a07ad12d5d60a451f281077c2e6cc1a4a..dbff256c12301f2e45cf295fa8f97d07cfdacfa9 100644
--- a/src/obj/NiPSysEmitterLifeSpanCtlr.cpp
+++ b/src/obj/NiPSysEmitterLifeSpanCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitterLifeSpanCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitterLifeSpanCtlr"] = NiPSysEmitterLifeSpanCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitterLifeSpanCtlr", NiPSysEmitterLifeSpanCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysEmitterSpeedCtlr.cpp b/src/obj/NiPSysEmitterSpeedCtlr.cpp
index 9c1f01b4d8ecd7d5b9d6131cb3cfb987d734497e..978bce7a75345ee72bbfd8d7e46a8c9af30689c8 100644
--- a/src/obj/NiPSysEmitterSpeedCtlr.cpp
+++ b/src/obj/NiPSysEmitterSpeedCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysEmitterSpeedCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysEmitterSpeedCtlr"] = NiPSysEmitterSpeedCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysEmitterSpeedCtlr", NiPSysEmitterSpeedCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysGravityModifier.cpp b/src/obj/NiPSysGravityModifier.cpp
index d952c03221e4097360e7be83f5a1d198ad4abcaf..99a659c4a74c7897077d6f6e9d130148c0f15d22 100644
--- a/src/obj/NiPSysGravityModifier.cpp
+++ b/src/obj/NiPSysGravityModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysGravityModifier.h"
 #include "../../include/obj/NiNode.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysGravityModifier"] = NiPSysGravityModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysGravityModifier", NiPSysGravityModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysGravityStrengthCtlr.cpp b/src/obj/NiPSysGravityStrengthCtlr.cpp
index 3198cb07221fb094ac79868cc43c0e602876b7c5..5c1dd3c2ab46c6846c90b03a724b246c1ea12ad8 100644
--- a/src/obj/NiPSysGravityStrengthCtlr.cpp
+++ b/src/obj/NiPSysGravityStrengthCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysGravityStrengthCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysGravityStrengthCtlr"] = NiPSysGravityStrengthCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysGravityStrengthCtlr", NiPSysGravityStrengthCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysGrowFadeModifier.cpp b/src/obj/NiPSysGrowFadeModifier.cpp
index 664f2508712f13cd97016687d902672e0f6fca47..096f2eab3540c97f14c9ef4776e32e949dce2bd3 100644
--- a/src/obj/NiPSysGrowFadeModifier.cpp
+++ b/src/obj/NiPSysGrowFadeModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysGrowFadeModifier.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysGrowFadeModifier"] = NiPSysGrowFadeModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysGrowFadeModifier", NiPSysGrowFadeModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysMeshEmitter.cpp b/src/obj/NiPSysMeshEmitter.cpp
index 2c499a14ed0b76ab71c4675dd806f5e1d9fdedf9..c4ead69bb53d3784c41378b2c89918463cb9a8e3 100644
--- a/src/obj/NiPSysMeshEmitter.cpp
+++ b/src/obj/NiPSysMeshEmitter.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysMeshEmitter.h"
 #include "../../include/obj/NiTriBasedGeom.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysMeshEmitter"] = NiPSysMeshEmitter::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysMeshEmitter", NiPSysMeshEmitter::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysMeshUpdateModifier.cpp b/src/obj/NiPSysMeshUpdateModifier.cpp
index ae92a42ce9ef4573838562fbb696bdb537d03600..156d3e2433780fb17b36e10a7950106ba3f823b4 100644
--- a/src/obj/NiPSysMeshUpdateModifier.cpp
+++ b/src/obj/NiPSysMeshUpdateModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysMeshUpdateModifier.h"
 #include "../../include/obj/NiNode.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysMeshUpdateModifier"] = NiPSysMeshUpdateModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysMeshUpdateModifier", NiPSysMeshUpdateModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysModifier.cpp b/src/obj/NiPSysModifier.cpp
index 77c601a75bf120ad94112b067f6ab227ea01e9ff..7ac436051deb9e1ce11862d5e9aa411dcc87c92e 100644
--- a/src/obj/NiPSysModifier.cpp
+++ b/src/obj/NiPSysModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysModifier.h"
 #include "../../include/obj/NiParticleSystem.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysModifier"] = NiPSysModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysModifier", NiPSysModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysModifierActiveCtlr.cpp b/src/obj/NiPSysModifierActiveCtlr.cpp
index 654a30e6224d964b79c9a9555be52cfe8ded9a10..93b15e10bc358a7af62c9520d30aa80f59b321af 100644
--- a/src/obj/NiPSysModifierActiveCtlr.cpp
+++ b/src/obj/NiPSysModifierActiveCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysModifierActiveCtlr.h"
 #include "../../include/obj/NiVisData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysModifierActiveCtlr"] = NiPSysModifierActiveCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysModifierActiveCtlr", NiPSysModifierActiveCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysModifierBoolCtlr.cpp b/src/obj/NiPSysModifierBoolCtlr.cpp
index 252bcb5e7d012751adf0816628e4b572c25cafbe..fe5f7eec4fe854214b2a7437d2321b80d29984d7 100644
--- a/src/obj/NiPSysModifierBoolCtlr.cpp
+++ b/src/obj/NiPSysModifierBoolCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysModifierBoolCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysModifierBoolCtlr"] = NiPSysModifierBoolCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysModifierBoolCtlr", NiPSysModifierBoolCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysModifierCtlr.cpp b/src/obj/NiPSysModifierCtlr.cpp
index f1eba0c970427e4ac680c6897b00216c6e6dcf11..ccc9f3f99f0511bf42031cf212363e76d5701071 100644
--- a/src/obj/NiPSysModifierCtlr.cpp
+++ b/src/obj/NiPSysModifierCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysModifierCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysModifierCtlr"] = NiPSysModifierCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysModifierCtlr", NiPSysModifierCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysModifierFloatCtlr.cpp b/src/obj/NiPSysModifierFloatCtlr.cpp
index 721ec80235e7a33726a111b788da405c486ab133..34acd2b73234dc85eddb487b3e3ea8d34dbda782 100644
--- a/src/obj/NiPSysModifierFloatCtlr.cpp
+++ b/src/obj/NiPSysModifierFloatCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysModifierFloatCtlr.h"
 #include "../../include/obj/NiFloatData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysModifierFloatCtlr"] = NiPSysModifierFloatCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysModifierFloatCtlr", NiPSysModifierFloatCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysPlanarCollider.cpp b/src/obj/NiPSysPlanarCollider.cpp
index 825086aa244bd01260e1b3a8871e0b1497b16348..19abe6a1bf7db97c150d48b3a6e055eb1eae9c8b 100644
--- a/src/obj/NiPSysPlanarCollider.cpp
+++ b/src/obj/NiPSysPlanarCollider.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysPlanarCollider.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysPlanarCollider"] = NiPSysPlanarCollider::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysPlanarCollider", NiPSysPlanarCollider::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysPositionModifier.cpp b/src/obj/NiPSysPositionModifier.cpp
index 5eac172b173ac9e3b233efa2118e1629a2c0e281..4365a83821b28597eb74a1acc500df306011013a 100644
--- a/src/obj/NiPSysPositionModifier.cpp
+++ b/src/obj/NiPSysPositionModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysPositionModifier.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysPositionModifier"] = NiPSysPositionModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysPositionModifier", NiPSysPositionModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysResetOnLoopCtlr.cpp b/src/obj/NiPSysResetOnLoopCtlr.cpp
index 2fbbd40fb5040d44af1fb7988eb64726096633e9..94600424f250b430baf00a4743f76e85f71a0d6e 100644
--- a/src/obj/NiPSysResetOnLoopCtlr.cpp
+++ b/src/obj/NiPSysResetOnLoopCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysResetOnLoopCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysResetOnLoopCtlr"] = NiPSysResetOnLoopCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysResetOnLoopCtlr", NiPSysResetOnLoopCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysRotationModifier.cpp b/src/obj/NiPSysRotationModifier.cpp
index 9a0954b9a6f7ca927a304d865a709db7f9e3992b..22374212a33f28d4db64279097f18d79eed10d3b 100644
--- a/src/obj/NiPSysRotationModifier.cpp
+++ b/src/obj/NiPSysRotationModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysRotationModifier.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysRotationModifier"] = NiPSysRotationModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysRotationModifier", NiPSysRotationModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysSpawnModifier.cpp b/src/obj/NiPSysSpawnModifier.cpp
index b2ff533510dc937a210a36a8a8390810966104e5..f7327ea95e76bfa3ba299e7d956a316facd65aa3 100644
--- a/src/obj/NiPSysSpawnModifier.cpp
+++ b/src/obj/NiPSysSpawnModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysSpawnModifier.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysSpawnModifier"] = NiPSysSpawnModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysSpawnModifier", NiPSysSpawnModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysSphereEmitter.cpp b/src/obj/NiPSysSphereEmitter.cpp
index 040da760cca89fc0fd432ac8dbd6f2bc164ba6e3..cfef1081ed4bf6cd873c2fd878dcded2db83884f 100644
--- a/src/obj/NiPSysSphereEmitter.cpp
+++ b/src/obj/NiPSysSphereEmitter.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysSphereEmitter.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysSphereEmitter"] = NiPSysSphereEmitter::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysSphereEmitter", NiPSysSphereEmitter::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysSphericalCollider.cpp b/src/obj/NiPSysSphericalCollider.cpp
index 7c57bb3c20a6a85017044e37dd4b93f984135350..8a8be6dcc42131dfed483a5c0eec97ec36b4e5d2 100644
--- a/src/obj/NiPSysSphericalCollider.cpp
+++ b/src/obj/NiPSysSphericalCollider.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysSphericalCollider.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysSphericalCollider"] = NiPSysSphericalCollider::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysSphericalCollider", NiPSysSphericalCollider::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysUpdateCtlr.cpp b/src/obj/NiPSysUpdateCtlr.cpp
index 45bee883962845a6307db55f00a680a98bbdd0c6..446547679dda15099a749d678ed568f09ca90256 100644
--- a/src/obj/NiPSysUpdateCtlr.cpp
+++ b/src/obj/NiPSysUpdateCtlr.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysUpdateCtlr.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysUpdateCtlr"] = NiPSysUpdateCtlr::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysUpdateCtlr", NiPSysUpdateCtlr::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPSysVolumeEmitter.cpp b/src/obj/NiPSysVolumeEmitter.cpp
index 96677d61c42a5e2d230363699e3b106ebe1a46eb..13ef428189358d68f928129c3fa4cf2d20109a66 100644
--- a/src/obj/NiPSysVolumeEmitter.cpp
+++ b/src/obj/NiPSysVolumeEmitter.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPSysVolumeEmitter.h"
 #include "../../include/obj/NiNode.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPSysVolumeEmitter"] = NiPSysVolumeEmitter::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPSysVolumeEmitter", NiPSysVolumeEmitter::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPalette.cpp b/src/obj/NiPalette.cpp
index dc12c6696381ea79f0bdf301d1d34fd7e12fda68..e5649b70e98eee8b4efd9f422b2d7add02cc9538 100644
--- a/src/obj/NiPalette.cpp
+++ b/src/obj/NiPalette.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPalette.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPalette"] = NiPalette::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPalette", NiPalette::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleBomb.cpp b/src/obj/NiParticleBomb.cpp
index 9e49fb270803f167c751f689611639ee38d25266..62e769fae7fc6bd7e4f0d72e1ddd7a915e670775 100644
--- a/src/obj/NiParticleBomb.cpp
+++ b/src/obj/NiParticleBomb.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleBomb.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleBomb"] = NiParticleBomb::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleBomb", NiParticleBomb::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleColorModifier.cpp b/src/obj/NiParticleColorModifier.cpp
index 9862b7ad9cb4347ed39b786f382d1a7ee497bc47..4f86fd6953bb82a15ba960b5d9170879e60f722c 100644
--- a/src/obj/NiParticleColorModifier.cpp
+++ b/src/obj/NiParticleColorModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleColorModifier.h"
 #include "../../include/obj/NiColorData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleColorModifier"] = NiParticleColorModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleColorModifier", NiParticleColorModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleGrowFade.cpp b/src/obj/NiParticleGrowFade.cpp
index 5126fd27a24f862b71dd8612988377e17a371f70..2fc7019eef9da410240f72155a4e5996e45535c6 100644
--- a/src/obj/NiParticleGrowFade.cpp
+++ b/src/obj/NiParticleGrowFade.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleGrowFade.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleGrowFade"] = NiParticleGrowFade::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleGrowFade", NiParticleGrowFade::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleMeshModifier.cpp b/src/obj/NiParticleMeshModifier.cpp
index a4b0b3c784468b73bbe17e4c4e459a0c956b0c91..ab2313ef5c89e31d804dc81446172ee54dff915f 100644
--- a/src/obj/NiParticleMeshModifier.cpp
+++ b/src/obj/NiParticleMeshModifier.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleMeshModifier.h"
 #include "../../include/obj/NiAVObject.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleMeshModifier"] = NiParticleMeshModifier::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleMeshModifier", NiParticleMeshModifier::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleMeshes.cpp b/src/obj/NiParticleMeshes.cpp
index 022432ea2a7d4b75ea044063ea4a6798e67d1db1..061c56af5acc8e4cbae9e289eb861b565db23fd3 100644
--- a/src/obj/NiParticleMeshes.cpp
+++ b/src/obj/NiParticleMeshes.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleMeshes.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleMeshes"] = NiParticleMeshes::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleMeshes", NiParticleMeshes::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleMeshesData.cpp b/src/obj/NiParticleMeshesData.cpp
index 60f5449ceffa79debd764203d9868905e1a7988b..9bf842e5aff7ebe2781869af541942c5783a8e74 100644
--- a/src/obj/NiParticleMeshesData.cpp
+++ b/src/obj/NiParticleMeshesData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleMeshesData.h"
 #include "../../include/obj/NiAVObject.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleMeshesData"] = NiParticleMeshesData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleMeshesData", NiParticleMeshesData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleRotation.cpp b/src/obj/NiParticleRotation.cpp
index 9f7c0171706f26249fdf51ae081c5e65c3c7c178..42b6e021ab7c14280ae14e148c5198350b879f98 100644
--- a/src/obj/NiParticleRotation.cpp
+++ b/src/obj/NiParticleRotation.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleRotation.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleRotation"] = NiParticleRotation::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleRotation", NiParticleRotation::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleSystem.cpp b/src/obj/NiParticleSystem.cpp
index 0350935a03431fa2cc9dbde89d80fd51a591884f..05466bf42f0f32c2081fc91c2125bfec85a597bc 100644
--- a/src/obj/NiParticleSystem.cpp
+++ b/src/obj/NiParticleSystem.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleSystem.h"
 #include "../../include/obj/NiPSysModifier.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleSystem"] = NiParticleSystem::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleSystem", NiParticleSystem::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticleSystemController.cpp b/src/obj/NiParticleSystemController.cpp
index 81414a852087778caa383215f0225761053f14dc..90a9e8f915f65d8404075e314dea27275d3b8893 100644
--- a/src/obj/NiParticleSystemController.cpp
+++ b/src/obj/NiParticleSystemController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticleSystemController.h"
 #include "../../include/gen/Particle.h"
@@ -48,8 +49,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticleSystemController"] = NiParticleSystemController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticleSystemController", NiParticleSystemController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticles.cpp b/src/obj/NiParticles.cpp
index c32d5c3d20df4412b17a7ab92fe161d93ff893a2..c529bcfc4924ee48b6d28e80468168e7368d647b 100644
--- a/src/obj/NiParticles.cpp
+++ b/src/obj/NiParticles.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticles.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticles"] = NiParticles::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticles", NiParticles::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiParticlesData.cpp b/src/obj/NiParticlesData.cpp
index 77755137bf4405d7ce16cd5cb85a1744e24cc805..eaa3fb707020230980cb057da3526a90dca2cfbc 100644
--- a/src/obj/NiParticlesData.cpp
+++ b/src/obj/NiParticlesData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiParticlesData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiParticlesData"] = NiParticlesData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiParticlesData", NiParticlesData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPathController.cpp b/src/obj/NiPathController.cpp
index 4d8723cba13105bdb6b8dc78a8092eef7b181a69..db48f3698e33e3c8f818a59ad41f936062f79232 100644
--- a/src/obj/NiPathController.cpp
+++ b/src/obj/NiPathController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPathController.h"
 #include "../../include/obj/NiPosData.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPathController"] = NiPathController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPathController", NiPathController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPathInterpolator.cpp b/src/obj/NiPathInterpolator.cpp
index eb94abc4e146605b8985a1d64c1af1e78c1b216d..0b64d3e6e44bf84a57f0b30ab46d5a98d97655a5 100644
--- a/src/obj/NiPathInterpolator.cpp
+++ b/src/obj/NiPathInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPathInterpolator.h"
 #include "../../include/obj/NiPosData.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPathInterpolator"] = NiPathInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPathInterpolator", NiPathInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPixelData.cpp b/src/obj/NiPixelData.cpp
index a3e06ff9c3c2fb8c0177b2dd1709c22e55191d8d..11a798e9b29e9969f27e216863aae64cbd1835b8 100644
--- a/src/obj/NiPixelData.cpp
+++ b/src/obj/NiPixelData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPixelData.h"
 #include "../../include/gen/MipMap.h"
@@ -46,8 +47,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPixelData"] = NiPixelData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPixelData", NiPixelData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPlanarCollider.cpp b/src/obj/NiPlanarCollider.cpp
index c16b7c6f2854d23511c11ead74d3b9fc9aaace69..f7482c6640c19839189f3f74375d68dba83ee0d0 100644
--- a/src/obj/NiPlanarCollider.cpp
+++ b/src/obj/NiPlanarCollider.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPlanarCollider.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPlanarCollider"] = NiPlanarCollider::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPlanarCollider", NiPlanarCollider::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPoint3InterpController.cpp b/src/obj/NiPoint3InterpController.cpp
index 3d9e321cc031ef0ddaaa861fcfc86972722ebb7a..86c8bcbd99da51a77653fb1548df2fb1cb398f1a 100644
--- a/src/obj/NiPoint3InterpController.cpp
+++ b/src/obj/NiPoint3InterpController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPoint3InterpController.h"
 #include "../../include/obj/NiPosData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPoint3InterpController"] = NiPoint3InterpController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPoint3InterpController", NiPoint3InterpController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPoint3Interpolator.cpp b/src/obj/NiPoint3Interpolator.cpp
index 2dff6ce65ef4ad3f72c34ea9b82609f1f390ad24..155445326791d37dce7254a2f6633e7f6ed00a40 100644
--- a/src/obj/NiPoint3Interpolator.cpp
+++ b/src/obj/NiPoint3Interpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPoint3Interpolator.h"
 #include "../../include/obj/NiPosData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPoint3Interpolator"] = NiPoint3Interpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPoint3Interpolator", NiPoint3Interpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPointLight.cpp b/src/obj/NiPointLight.cpp
index 697e4463304e422735b913d2651ec07aa5577b38..a3b6651ace97b1770492644603d0785a300b526a 100644
--- a/src/obj/NiPointLight.cpp
+++ b/src/obj/NiPointLight.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPointLight.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPointLight"] = NiPointLight::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPointLight", NiPointLight::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiPosData.cpp b/src/obj/NiPosData.cpp
index ee02576e36c0af1ae25fbfbd56886c324496840d..58126833a7c71dc98b49c8b796619840d7f9d158 100644
--- a/src/obj/NiPosData.cpp
+++ b/src/obj/NiPosData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiPosData.h"
 #include "../../include/gen/KeyGroup.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiPosData"] = NiPosData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiPosData", NiPosData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiProperty.cpp b/src/obj/NiProperty.cpp
index ce799510baf603c16fa3330b5b29ce5d0164aa10..92e282f8a42d0aa19a3a54273d181d16ac96e82b 100644
--- a/src/obj/NiProperty.cpp
+++ b/src/obj/NiProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiProperty"] = NiProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiProperty", NiProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiRangeLODData.cpp b/src/obj/NiRangeLODData.cpp
index ce6f77718f12da50652f27c976e8400eda81ec77..23421fae757e545471e602d0e454addd1173e789 100644
--- a/src/obj/NiRangeLODData.cpp
+++ b/src/obj/NiRangeLODData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiRangeLODData.h"
 #include "../../include/gen/LODRange.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiRangeLODData"] = NiRangeLODData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiRangeLODData", NiRangeLODData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiRawImageData.cpp b/src/obj/NiRawImageData.cpp
index 96e3e75c68b8f1c71481293b9e5dbd4c58609505..c1b48c4c60439eee1b215f8fc30212de5a5e9882 100644
--- a/src/obj/NiRawImageData.cpp
+++ b/src/obj/NiRawImageData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiRawImageData.h"
 #include "../../include/gen/ByteColor3.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiRawImageData"] = NiRawImageData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiRawImageData", NiRawImageData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiRollController.cpp b/src/obj/NiRollController.cpp
index 99d2421c5c27e984756fc9dd7cbcc29df5d280bb..81829eb4298a461cd8f71af73ee9b809be283e2c 100644
--- a/src/obj/NiRollController.cpp
+++ b/src/obj/NiRollController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiRollController.h"
 #include "../../include/obj/NiFloatData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiRollController"] = NiRollController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiRollController", NiRollController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiRotatingParticles.cpp b/src/obj/NiRotatingParticles.cpp
index d68578f91cc76d9940561f7240a7e0d06be0722f..f0758974998cd5f2a6f7a3233032022310dc13a8 100644
--- a/src/obj/NiRotatingParticles.cpp
+++ b/src/obj/NiRotatingParticles.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiRotatingParticles.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiRotatingParticles"] = NiRotatingParticles::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiRotatingParticles", NiRotatingParticles::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiRotatingParticlesData.cpp b/src/obj/NiRotatingParticlesData.cpp
index 17b06e62aa51863435c0ab604b4612ca896c2225..d15f89237f60084fe1825f3e695f77ed269e41a6 100644
--- a/src/obj/NiRotatingParticlesData.cpp
+++ b/src/obj/NiRotatingParticlesData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiRotatingParticlesData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiRotatingParticlesData"] = NiRotatingParticlesData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiRotatingParticlesData", NiRotatingParticlesData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiScreenLODData.cpp b/src/obj/NiScreenLODData.cpp
index e37d836955cbbe706fd917d2b8510b8f8f0e6706..b33ad5de50c4ab794b2b9d652ac943a8ea5fad6a 100644
--- a/src/obj/NiScreenLODData.cpp
+++ b/src/obj/NiScreenLODData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiScreenLODData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiScreenLODData"] = NiScreenLODData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiScreenLODData", NiScreenLODData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSequence.cpp b/src/obj/NiSequence.cpp
index ba60babfb987ad559bcffc96cc089e5401ccf522..d9da9fb22a889119fb687a9f9839ab73688d3a0b 100644
--- a/src/obj/NiSequence.cpp
+++ b/src/obj/NiSequence.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSequence.h"
 #include "../../include/gen/ControllerLink.h"
@@ -49,8 +50,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSequence"] = NiSequence::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSequence", NiSequence::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSequenceStreamHelper.cpp b/src/obj/NiSequenceStreamHelper.cpp
index 34494cf64255dde4723d6080c844769ee9a9d4ed..28e79dea2494233faeaa764129d146bb70a55542 100644
--- a/src/obj/NiSequenceStreamHelper.cpp
+++ b/src/obj/NiSequenceStreamHelper.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSequenceStreamHelper.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSequenceStreamHelper"] = NiSequenceStreamHelper::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSequenceStreamHelper", NiSequenceStreamHelper::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiShadeProperty.cpp b/src/obj/NiShadeProperty.cpp
index c844c3502ceca077a06e0c2511c0d5c5b937ec3c..cacb29012c41c8f7b9453599680def805588204a 100644
--- a/src/obj/NiShadeProperty.cpp
+++ b/src/obj/NiShadeProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiShadeProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiShadeProperty"] = NiShadeProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiShadeProperty", NiShadeProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSingleInterpController.cpp b/src/obj/NiSingleInterpController.cpp
index c6b018673968e46f8dbeeddb314a054d64307b5a..93e3e229865ca6ab88042205fe311ced3a972309 100644
--- a/src/obj/NiSingleInterpController.cpp
+++ b/src/obj/NiSingleInterpController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSingleInterpController.h"
 #include "../../include/obj/NiInterpolator.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSingleInterpController"] = NiSingleInterpController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSingleInterpController", NiSingleInterpController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSkinData.cpp b/src/obj/NiSkinData.cpp
index e13bbbf05f2a0b2c19d785acf4ba46100f19be43..4456c398bc172dfca1b95db418f5482e1fbc16ad 100644
--- a/src/obj/NiSkinData.cpp
+++ b/src/obj/NiSkinData.cpp
@@ -14,6 +14,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSkinData.h"
 #include "../../include/gen/SkinData.h"
@@ -50,8 +51,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSkinData"] = NiSkinData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSkinData", NiSkinData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSkinInstance.cpp b/src/obj/NiSkinInstance.cpp
index c4848a1302d0d0217d6e5526d520eb74d04c24b4..7520f1fd8acc58fddf47d5efb671baa4f4d291f2 100644
--- a/src/obj/NiSkinInstance.cpp
+++ b/src/obj/NiSkinInstance.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSkinInstance.h"
 #include "../../include/obj/NiSkinData.h"
@@ -58,8 +59,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSkinInstance"] = NiSkinInstance::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSkinInstance", NiSkinInstance::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSkinPartition.cpp b/src/obj/NiSkinPartition.cpp
index 818f9134412ea8720a98291882d0b8d0f2d4a3b1..399205e472ad16d7c2d83f5525aa6e9e56f3ccc9 100644
--- a/src/obj/NiSkinPartition.cpp
+++ b/src/obj/NiSkinPartition.cpp
@@ -39,6 +39,7 @@ typedef vector<SkinPartition> PartitionList;
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSkinPartition.h"
 #include "../../include/gen/SkinPartition.h"
@@ -72,8 +73,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSkinPartition"] = NiSkinPartition::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSkinPartition", NiSkinPartition::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSourceTexture.cpp b/src/obj/NiSourceTexture.cpp
index f5f1b0331e270569ca0f14078363c9347daf4b2a..e0041dca4fc334f9c5a0d55fe8f70e21375c9927 100644
--- a/src/obj/NiSourceTexture.cpp
+++ b/src/obj/NiSourceTexture.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSourceTexture.h"
 #include "../../include/obj/NiObject.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSourceTexture"] = NiSourceTexture::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSourceTexture", NiSourceTexture::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSpecularProperty.cpp b/src/obj/NiSpecularProperty.cpp
index db298968ba0dce2f14e4d1459ee684637c4343b8..c2e4076f696e9c73689a57d32bbce2b63b1903f4 100644
--- a/src/obj/NiSpecularProperty.cpp
+++ b/src/obj/NiSpecularProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSpecularProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSpecularProperty"] = NiSpecularProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSpecularProperty", NiSpecularProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSphericalCollider.cpp b/src/obj/NiSphericalCollider.cpp
index 4b770ef09da82de0911aba7ba93b5b1c6fccf74d..73bfbc829bc1c99acab959232af5c0e91c229314 100644
--- a/src/obj/NiSphericalCollider.cpp
+++ b/src/obj/NiSphericalCollider.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSphericalCollider.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSphericalCollider"] = NiSphericalCollider::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSphericalCollider", NiSphericalCollider::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSpotLight.cpp b/src/obj/NiSpotLight.cpp
index 2d03d7fd48b0c720f4ebd1a21633c4480d8e8986..73c9c42211b1610162a99fe1b4667feeccdd69b7 100644
--- a/src/obj/NiSpotLight.cpp
+++ b/src/obj/NiSpotLight.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSpotLight.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSpotLight"] = NiSpotLight::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSpotLight", NiSpotLight::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiStencilProperty.cpp b/src/obj/NiStencilProperty.cpp
index e45806ece6643ee5a2d76985a01575a53191b627..77532e1f5a907035568609ca0ac54f4bc68c3d1b 100644
--- a/src/obj/NiStencilProperty.cpp
+++ b/src/obj/NiStencilProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiStencilProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiStencilProperty"] = NiStencilProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiStencilProperty", NiStencilProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiStringExtraData.cpp b/src/obj/NiStringExtraData.cpp
index 21c90f32e1e02262f8b8cf09a66e70210df37773..ade5735091aae950c5bc729aab51855c1ff24872 100644
--- a/src/obj/NiStringExtraData.cpp
+++ b/src/obj/NiStringExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiStringExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiStringExtraData"] = NiStringExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiStringExtraData", NiStringExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiStringPalette.cpp b/src/obj/NiStringPalette.cpp
index b6d5d7126e3f33227bb97b23667980c78e5c7f31..9e180c2285a0009c82ac3145f4c2208691c44383 100644
--- a/src/obj/NiStringPalette.cpp
+++ b/src/obj/NiStringPalette.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiStringPalette.h"
 #include "../../include/gen/StringPalette.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiStringPalette"] = NiStringPalette::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiStringPalette", NiStringPalette::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiStringsExtraData.cpp b/src/obj/NiStringsExtraData.cpp
index e3b2826b2d751eb42787a555039ecdf269486f5d..a9618020a64c9e0599bd57bf477de8a6ee529165 100644
--- a/src/obj/NiStringsExtraData.cpp
+++ b/src/obj/NiStringsExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiStringsExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiStringsExtraData"] = NiStringsExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiStringsExtraData", NiStringsExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiSwitchNode.cpp b/src/obj/NiSwitchNode.cpp
index 76180777ff0cba48b148e9ccdb9bae7b053464aa..153fcdeccf4690fef3300ee058f6445fd5d84838 100644
--- a/src/obj/NiSwitchNode.cpp
+++ b/src/obj/NiSwitchNode.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiSwitchNode.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiSwitchNode"] = NiSwitchNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiSwitchNode", NiSwitchNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTextKeyExtraData.cpp b/src/obj/NiTextKeyExtraData.cpp
index f17970c26afe8ef91f8e31baa1b848ae65caf023..2c066ddb50544d23c71e20b61acbb6110c86158e 100644
--- a/src/obj/NiTextKeyExtraData.cpp
+++ b/src/obj/NiTextKeyExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTextKeyExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTextKeyExtraData"] = NiTextKeyExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTextKeyExtraData", NiTextKeyExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTexture.cpp b/src/obj/NiTexture.cpp
index a7aa6cbfb6c2ccd8153efb89cdd02b6e1c2e7deb..3dd99f3d006c93442809075281e32447c32cfd13 100644
--- a/src/obj/NiTexture.cpp
+++ b/src/obj/NiTexture.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTexture.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTexture"] = NiTexture::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTexture", NiTexture::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTextureEffect.cpp b/src/obj/NiTextureEffect.cpp
index 4fdd03d5588f8083862cdb7ee803dffa6fbdde01..0a43836cb61022f1aeff048da691e5feef642251 100644
--- a/src/obj/NiTextureEffect.cpp
+++ b/src/obj/NiTextureEffect.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTextureEffect.h"
 #include "../../include/obj/NiSourceTexture.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTextureEffect"] = NiTextureEffect::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTextureEffect", NiTextureEffect::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTextureModeProperty.cpp b/src/obj/NiTextureModeProperty.cpp
index 5951d16d4e1b7043ef2e559ae8e26da7b1f0ad4c..e5dca9b0d17a42ba716a003fcde7a0fe9870dd3f 100644
--- a/src/obj/NiTextureModeProperty.cpp
+++ b/src/obj/NiTextureModeProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTextureModeProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTextureModeProperty"] = NiTextureModeProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTextureModeProperty", NiTextureModeProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTextureProperty.cpp b/src/obj/NiTextureProperty.cpp
index ee3554ec6774bb42628d6982572821599fe45daf..2be4acef048cb1ec830ac97eb82e2a5afd433c6c 100644
--- a/src/obj/NiTextureProperty.cpp
+++ b/src/obj/NiTextureProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTextureProperty.h"
 #include "../../include/obj/NiImage.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTextureProperty"] = NiTextureProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTextureProperty", NiTextureProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTextureTransformController.cpp b/src/obj/NiTextureTransformController.cpp
index c528bc6c2d5a315c16f2a1536352650b54f76712..dd87a51e6f5ee64dbd755a1e011ea67af5ba9ccf 100644
--- a/src/obj/NiTextureTransformController.cpp
+++ b/src/obj/NiTextureTransformController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTextureTransformController.h"
 #include "../../include/obj/NiFloatData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTextureTransformController"] = NiTextureTransformController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTextureTransformController", NiTextureTransformController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTexturingProperty.cpp b/src/obj/NiTexturingProperty.cpp
index 5ccd92fe4ea8279e9e77809d2ce0f3cc7667205d..b34bc1daa2e80a1f343874517a4f07d24006f488 100644
--- a/src/obj/NiTexturingProperty.cpp
+++ b/src/obj/NiTexturingProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTexturingProperty.h"
 #include "../../include/gen/TexDesc.h"
@@ -66,8 +67,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTexturingProperty"] = NiTexturingProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTexturingProperty", NiTexturingProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTimeController.cpp b/src/obj/NiTimeController.cpp
index f718864cf7ab0246f16e3d0e45da1f959ad2e0ed..d346f9750409f6d10f9e7ab2f9f0a4bdc3a5c2e8 100644
--- a/src/obj/NiTimeController.cpp
+++ b/src/obj/NiTimeController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTimeController.h"
 #include "../../include/obj/NiObjectNET.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTimeController"] = NiTimeController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTimeController", NiTimeController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTransformController.cpp b/src/obj/NiTransformController.cpp
index 5dac92a399b0cf107db7008889d55000da67ab21..16d71ecc14864b74bee989e49193ca72e173d8a4 100644
--- a/src/obj/NiTransformController.cpp
+++ b/src/obj/NiTransformController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTransformController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTransformController"] = NiTransformController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTransformController", NiTransformController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTransformData.cpp b/src/obj/NiTransformData.cpp
index bafef508de9cd179797df738310afbf4e870579d..6e64d1faa6cea326c159da7d2e6a78d24e60b54f 100644
--- a/src/obj/NiTransformData.cpp
+++ b/src/obj/NiTransformData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTransformData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTransformData"] = NiTransformData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTransformData", NiTransformData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTransformInterpolator.cpp b/src/obj/NiTransformInterpolator.cpp
index b20bfb185c8ce8eff4e56998aea7b77569150104..135b5797a267946600264c020485464d45ed9c2b 100644
--- a/src/obj/NiTransformInterpolator.cpp
+++ b/src/obj/NiTransformInterpolator.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTransformInterpolator.h"
 #include "../../include/obj/NiTransformData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTransformInterpolator"] = NiTransformInterpolator::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTransformInterpolator", NiTransformInterpolator::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTriBasedGeom.cpp b/src/obj/NiTriBasedGeom.cpp
index 3224d54cd692843cb87b9b88f79c61b3117842c6..8ca51cf583fa1aa9b24c5acd1ef7d38291564a36 100644
--- a/src/obj/NiTriBasedGeom.cpp
+++ b/src/obj/NiTriBasedGeom.cpp
@@ -16,6 +16,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTriBasedGeom.h"
 using namespace Niflib;
@@ -48,8 +49,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTriBasedGeom"] = NiTriBasedGeom::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTriBasedGeom", NiTriBasedGeom::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTriBasedGeomData.cpp b/src/obj/NiTriBasedGeomData.cpp
index b80fad7d32111886ab5efdff5b1853ad7b04e13d..06ab5534fa8ef49fd6f71bc8ef3bd3e9f4eaad4c 100644
--- a/src/obj/NiTriBasedGeomData.cpp
+++ b/src/obj/NiTriBasedGeomData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTriBasedGeomData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTriBasedGeomData"] = NiTriBasedGeomData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTriBasedGeomData", NiTriBasedGeomData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTriShape.cpp b/src/obj/NiTriShape.cpp
index 15a1f92d045ae61cb4a624b66a7ecc0fc2394c96..484a2c4ee54ddbe7151f0777239b80bb4e44e6ea 100644
--- a/src/obj/NiTriShape.cpp
+++ b/src/obj/NiTriShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTriShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTriShape"] = NiTriShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTriShape", NiTriShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTriShapeData.cpp b/src/obj/NiTriShapeData.cpp
index e188b0a76c1420fdbdf24dbac90c2e44b954bbcd..cd3c4717b763009d01c87aa1698ae59d0a060ae6 100644
--- a/src/obj/NiTriShapeData.cpp
+++ b/src/obj/NiTriShapeData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTriShapeData.h"
 #include "../../include/gen/MatchGroup.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTriShapeData"] = NiTriShapeData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTriShapeData", NiTriShapeData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTriShapeSkinController.cpp b/src/obj/NiTriShapeSkinController.cpp
index 28a7b7eb72c89eb0dd18fdb12b6ccf02b411bf29..91831091a72307ed926114f4d0619728e8c0ea2b 100644
--- a/src/obj/NiTriShapeSkinController.cpp
+++ b/src/obj/NiTriShapeSkinController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTriShapeSkinController.h"
 #include "../../include/gen/OldSkinData.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTriShapeSkinController"] = NiTriShapeSkinController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTriShapeSkinController", NiTriShapeSkinController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTriStrips.cpp b/src/obj/NiTriStrips.cpp
index cf90f218488a59f40df06565f70537081616e57a..a9bb80c21cacd004decf617c6f5a66c4914065c7 100644
--- a/src/obj/NiTriStrips.cpp
+++ b/src/obj/NiTriStrips.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTriStrips.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTriStrips"] = NiTriStrips::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTriStrips", NiTriStrips::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiTriStripsData.cpp b/src/obj/NiTriStripsData.cpp
index 3001ce366f309f06ba9ab07d9e186fa049908251..512dbd5a19927630b50e8c6f5ab3b76eb949fd22 100644
--- a/src/obj/NiTriStripsData.cpp
+++ b/src/obj/NiTriStripsData.cpp
@@ -24,6 +24,7 @@ typedef	std::list<TriStrip> TriStrips;
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiTriStripsData.h"
 using namespace Niflib;
@@ -56,8 +57,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiTriStripsData"] = NiTriStripsData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiTriStripsData", NiTriStripsData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiUVController.cpp b/src/obj/NiUVController.cpp
index 83455ca3e37a531598f60460904c4bc1d88469d7..87e631dd0f52a83be2be15ea8e9467680dc3e462 100644
--- a/src/obj/NiUVController.cpp
+++ b/src/obj/NiUVController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiUVController.h"
 #include "../../include/obj/NiUVData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiUVController"] = NiUVController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiUVController", NiUVController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiUVData.cpp b/src/obj/NiUVData.cpp
index c107fa42a9c90b36c1c437b4f11be068c47fe170..f52175cc1d2cae6f6ca15d3f8f2863b18372b7c1 100644
--- a/src/obj/NiUVData.cpp
+++ b/src/obj/NiUVData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiUVData.h"
 #include "../../include/gen/KeyGroup.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiUVData"] = NiUVData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiUVData", NiUVData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiVectorExtraData.cpp b/src/obj/NiVectorExtraData.cpp
index ffda4f8d09b6a7ea5baac8a0084a854ebd158559..192e5ebdff6627c24894217e5bd862d70bac4fb0 100644
--- a/src/obj/NiVectorExtraData.cpp
+++ b/src/obj/NiVectorExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiVectorExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiVectorExtraData"] = NiVectorExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiVectorExtraData", NiVectorExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiVertWeightsExtraData.cpp b/src/obj/NiVertWeightsExtraData.cpp
index 9640160eba04172e22a584f294478397e7dcad15..9c5d728b0ae03efdd0761b9f5c51fcde53c07019 100644
--- a/src/obj/NiVertWeightsExtraData.cpp
+++ b/src/obj/NiVertWeightsExtraData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiVertWeightsExtraData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiVertWeightsExtraData"] = NiVertWeightsExtraData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiVertWeightsExtraData", NiVertWeightsExtraData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiVertexColorProperty.cpp b/src/obj/NiVertexColorProperty.cpp
index f954977173b8e6997fc8a33559da306ef48734c5..5d29d756a47ade05a5dd07df74c3cc5bf11b5ba7 100644
--- a/src/obj/NiVertexColorProperty.cpp
+++ b/src/obj/NiVertexColorProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiVertexColorProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiVertexColorProperty"] = NiVertexColorProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiVertexColorProperty", NiVertexColorProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiVisController.cpp b/src/obj/NiVisController.cpp
index 9d7e79b333a758c60951b2ee6c18c7b46da30716..bce2216bfa81c8bd1d4890c421ad787b916d2810 100644
--- a/src/obj/NiVisController.cpp
+++ b/src/obj/NiVisController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiVisController.h"
 #include "../../include/obj/NiVisData.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiVisController"] = NiVisController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiVisController", NiVisController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiVisData.cpp b/src/obj/NiVisData.cpp
index cc38b323c94144c1e01bf20f3de51883c944ff00..e0167449c6f5af75b81f60210d681ccd7df53c46 100644
--- a/src/obj/NiVisData.cpp
+++ b/src/obj/NiVisData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiVisData.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiVisData"] = NiVisData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiVisData", NiVisData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiWireframeProperty.cpp b/src/obj/NiWireframeProperty.cpp
index 2f2fd0e2ea14416b70656864f3bac266fdbbc624..e82d7fb5635bc0cf15b32ddf7655e8b7e055319a 100644
--- a/src/obj/NiWireframeProperty.cpp
+++ b/src/obj/NiWireframeProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiWireframeProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiWireframeProperty"] = NiWireframeProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiWireframeProperty", NiWireframeProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/NiZBufferProperty.cpp b/src/obj/NiZBufferProperty.cpp
index 1faf321f37ad4163ca1d11bf79c62d1f45690ea2..b5deea7420ed12d26332e72796cec2930dc6ce05 100644
--- a/src/obj/NiZBufferProperty.cpp
+++ b/src/obj/NiZBufferProperty.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/NiZBufferProperty.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["NiZBufferProperty"] = NiZBufferProperty::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "NiZBufferProperty", NiZBufferProperty::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/RootCollisionNode.cpp b/src/obj/RootCollisionNode.cpp
index 9702fd3a1cb3daaf2ac63c8aaf115d1ebfc05901..75dad32735cfa6801682841b8a0652effad21eff 100644
--- a/src/obj/RootCollisionNode.cpp
+++ b/src/obj/RootCollisionNode.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/RootCollisionNode.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["RootCollisionNode"] = RootCollisionNode::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "RootCollisionNode", RootCollisionNode::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkBlendCollisionObject.cpp b/src/obj/bhkBlendCollisionObject.cpp
index cab1dc9ce35da9d3e6b55cdb0528d3dac2f7979e..f94277196233f84535b9a192cde7459da7cd5522 100644
--- a/src/obj/bhkBlendCollisionObject.cpp
+++ b/src/obj/bhkBlendCollisionObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkBlendCollisionObject.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkBlendCollisionObject"] = bhkBlendCollisionObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkBlendCollisionObject", bhkBlendCollisionObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkBlendController.cpp b/src/obj/bhkBlendController.cpp
index 0787e1c63eb4dd747568c2062a2c67000e07334f..31c774fbff57f6c91b410b8e92e706054d68db83 100644
--- a/src/obj/bhkBlendController.cpp
+++ b/src/obj/bhkBlendController.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkBlendController.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkBlendController"] = bhkBlendController::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkBlendController", bhkBlendController::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkBoxShape.cpp b/src/obj/bhkBoxShape.cpp
index f48cf8fe0d0b11bf6da430637ce7dd0796dcfeb4..0a0168d6be96615f07ca5bc1bc711b7c94738360 100644
--- a/src/obj/bhkBoxShape.cpp
+++ b/src/obj/bhkBoxShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkBoxShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkBoxShape"] = bhkBoxShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkBoxShape", bhkBoxShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkBvTreeShape.cpp b/src/obj/bhkBvTreeShape.cpp
index c577bd0ae535e26e538617c4f115b3182acde874..011a8b18b1c891bfa1db53f5432241c1b2619139 100644
--- a/src/obj/bhkBvTreeShape.cpp
+++ b/src/obj/bhkBvTreeShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkBvTreeShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkBvTreeShape"] = bhkBvTreeShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkBvTreeShape", bhkBvTreeShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkCapsuleShape.cpp b/src/obj/bhkCapsuleShape.cpp
index 6fc1bdafbd3787f3ec243b6f9872a4d446e76631..9f32343f2b3b1cf9edcaeffad89bbdc7165889d1 100644
--- a/src/obj/bhkCapsuleShape.cpp
+++ b/src/obj/bhkCapsuleShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkCapsuleShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkCapsuleShape"] = bhkCapsuleShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkCapsuleShape", bhkCapsuleShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkCollisionObject.cpp b/src/obj/bhkCollisionObject.cpp
index 4f0271726f4b156a2c2e01b3fa9c5302e67609af..227e62f5f34aa4dc6c889ae352a5ac0eb10b3bb8 100644
--- a/src/obj/bhkCollisionObject.cpp
+++ b/src/obj/bhkCollisionObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkCollisionObject.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkCollisionObject"] = bhkCollisionObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkCollisionObject", bhkCollisionObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkConstraint.cpp b/src/obj/bhkConstraint.cpp
index f32170eff429eb1033e1598b8fe197c29cb2510a..7a9b80fe0d25abb293abb9eef698c6f7a76169d3 100644
--- a/src/obj/bhkConstraint.cpp
+++ b/src/obj/bhkConstraint.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkConstraint.h"
 #include "../../include/obj/bhkEntity.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkConstraint"] = bhkConstraint::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkConstraint", bhkConstraint::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkConvexShape.cpp b/src/obj/bhkConvexShape.cpp
index 0e75e217fdf9d888a92edd607956bf32bcc78daa..ee06652f265bf60330ca3a3fb46ccffafc80cef6 100644
--- a/src/obj/bhkConvexShape.cpp
+++ b/src/obj/bhkConvexShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkConvexShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkConvexShape"] = bhkConvexShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkConvexShape", bhkConvexShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkConvexTransformShape.cpp b/src/obj/bhkConvexTransformShape.cpp
index ad351729cb38b3ab85fbc22f4d0cd0254fdd663b..9365dab0f7ff22539cb93212d1305b008ec54a8a 100644
--- a/src/obj/bhkConvexTransformShape.cpp
+++ b/src/obj/bhkConvexTransformShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkConvexTransformShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkConvexTransformShape"] = bhkConvexTransformShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkConvexTransformShape", bhkConvexTransformShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkConvexVerticesShape.cpp b/src/obj/bhkConvexVerticesShape.cpp
index ad2a7a48c8e627f08615b136f51c33d0bec52f8b..92efd373ef9ef7129c01dfa98cfd6f6daf691129 100644
--- a/src/obj/bhkConvexVerticesShape.cpp
+++ b/src/obj/bhkConvexVerticesShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkConvexVerticesShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkConvexVerticesShape"] = bhkConvexVerticesShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkConvexVerticesShape", bhkConvexVerticesShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkEntity.cpp b/src/obj/bhkEntity.cpp
index 0fbb1f68a98948002b91235d7cf3c4064d02cb9e..f98175c0b7cc314553325343b9f7c69f8a3a7b8a 100644
--- a/src/obj/bhkEntity.cpp
+++ b/src/obj/bhkEntity.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkEntity.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkEntity"] = bhkEntity::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkEntity", bhkEntity::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkHingeConstraint.cpp b/src/obj/bhkHingeConstraint.cpp
index 2183741741f26b35651974c26186e77052fbf7fb..8793c04165a2a4a18be173a40ee659c2594015e1 100644
--- a/src/obj/bhkHingeConstraint.cpp
+++ b/src/obj/bhkHingeConstraint.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkHingeConstraint.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkHingeConstraint"] = bhkHingeConstraint::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkHingeConstraint", bhkHingeConstraint::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkLimitedHingeConstraint.cpp b/src/obj/bhkLimitedHingeConstraint.cpp
index 6e50759cb33cdd8ae38d9548db23b2f4d1397063..26ff69a17842c0c2a85a1f1fd92f25db62f16b1a 100644
--- a/src/obj/bhkLimitedHingeConstraint.cpp
+++ b/src/obj/bhkLimitedHingeConstraint.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkLimitedHingeConstraint.h"
 #include "../../include/gen/LimitedHingeDescriptor.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkLimitedHingeConstraint"] = bhkLimitedHingeConstraint::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkLimitedHingeConstraint", bhkLimitedHingeConstraint::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkListShape.cpp b/src/obj/bhkListShape.cpp
index 81c552b0011450191f8826737b55fabf5251aea7..6e5b9dbce1f4f3eef7efad2f196b3f1d0610c6d1 100644
--- a/src/obj/bhkListShape.cpp
+++ b/src/obj/bhkListShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkListShape.h"
 #include "../../include/obj/bhkShape.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkListShape"] = bhkListShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkListShape", bhkListShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkMalleableConstraint.cpp b/src/obj/bhkMalleableConstraint.cpp
index 0c698c62741e11081113170c9d76311f6b8d1a86..05bce48031b0799ea6e899eb6a259ec7fac9eb1f 100644
--- a/src/obj/bhkMalleableConstraint.cpp
+++ b/src/obj/bhkMalleableConstraint.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkMalleableConstraint.h"
 #include "../../include/gen/RagdollDescriptor.h"
@@ -46,8 +47,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkMalleableConstraint"] = bhkMalleableConstraint::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkMalleableConstraint", bhkMalleableConstraint::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkMoppBvTreeShape.cpp b/src/obj/bhkMoppBvTreeShape.cpp
index 17a3c6235cd66fa94a9492b81ac9c322a63b2169..ad21d1efd016153def2301a64a4f102b7e753570 100644
--- a/src/obj/bhkMoppBvTreeShape.cpp
+++ b/src/obj/bhkMoppBvTreeShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkMoppBvTreeShape.h"
 #include "../../include/obj/bhkShape.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkMoppBvTreeShape"] = bhkMoppBvTreeShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkMoppBvTreeShape", bhkMoppBvTreeShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkMultiSphereShape.cpp b/src/obj/bhkMultiSphereShape.cpp
index 3c9bb1ebc56cd50c36de060b010efcd49670e22b..7f85ed89b220434fd5cf1b6671f5b3252b96d80c 100644
--- a/src/obj/bhkMultiSphereShape.cpp
+++ b/src/obj/bhkMultiSphereShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkMultiSphereShape.h"
 #include "../../include/gen/Sphere.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkMultiSphereShape"] = bhkMultiSphereShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkMultiSphereShape", bhkMultiSphereShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkNiCollisionObject.cpp b/src/obj/bhkNiCollisionObject.cpp
index cee64dd53fd922485f98e4a6cabd7edb0a50e4bb..5b7ac31db1ff5b979a0d1d8fc64f1d6f51437096 100644
--- a/src/obj/bhkNiCollisionObject.cpp
+++ b/src/obj/bhkNiCollisionObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkNiCollisionObject.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkNiCollisionObject"] = bhkNiCollisionObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkNiCollisionObject", bhkNiCollisionObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkNiTriStripsShape.cpp b/src/obj/bhkNiTriStripsShape.cpp
index 79315546c4548a9b13d7485892a26ac420e2e8b4..f97387d1d8804b680c5c2277108ba8c441c90f19 100644
--- a/src/obj/bhkNiTriStripsShape.cpp
+++ b/src/obj/bhkNiTriStripsShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkNiTriStripsShape.h"
 #include "../../include/gen/OblivionColFilter.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkNiTriStripsShape"] = bhkNiTriStripsShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkNiTriStripsShape", bhkNiTriStripsShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkPCollisionObject.cpp b/src/obj/bhkPCollisionObject.cpp
index 74d96696abb655134a0480631da0c07aa85f6b6f..99bd88c726a1ab79926b2e777d3cd5a5609f24fc 100644
--- a/src/obj/bhkPCollisionObject.cpp
+++ b/src/obj/bhkPCollisionObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkPCollisionObject.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkPCollisionObject"] = bhkPCollisionObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkPCollisionObject", bhkPCollisionObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkPackedNiTriStripsShape.cpp b/src/obj/bhkPackedNiTriStripsShape.cpp
index fdfe85c44ef3009b76c9dc3b64793f57ead39620..eeedb116689567d03cf3706bd046e1a6bf92e766 100644
--- a/src/obj/bhkPackedNiTriStripsShape.cpp
+++ b/src/obj/bhkPackedNiTriStripsShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkPackedNiTriStripsShape.h"
 #include "../../include/gen/OblivionSubShape.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkPackedNiTriStripsShape"] = bhkPackedNiTriStripsShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkPackedNiTriStripsShape", bhkPackedNiTriStripsShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkPhantom.cpp b/src/obj/bhkPhantom.cpp
index 7c4a6cf5d2f13eb437444dd8f8c106fb0a792b9c..e298608f02048eb7f0a325db39cb3b0734f2c21b 100644
--- a/src/obj/bhkPhantom.cpp
+++ b/src/obj/bhkPhantom.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkPhantom.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkPhantom"] = bhkPhantom::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkPhantom", bhkPhantom::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkPrismaticConstraint.cpp b/src/obj/bhkPrismaticConstraint.cpp
index 54b0f3a32ed345872b39dcf38134bc9d97c61968..f397e12f191797ce48d8cdf5d40ce74deca04f49 100644
--- a/src/obj/bhkPrismaticConstraint.cpp
+++ b/src/obj/bhkPrismaticConstraint.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkPrismaticConstraint.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkPrismaticConstraint"] = bhkPrismaticConstraint::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkPrismaticConstraint", bhkPrismaticConstraint::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkRagdollConstraint.cpp b/src/obj/bhkRagdollConstraint.cpp
index cb495dab20e42e7e5a397d68e75302f0e23541fa..a00293efe702d2cc10cb36489eb1c20f454a6d06 100644
--- a/src/obj/bhkRagdollConstraint.cpp
+++ b/src/obj/bhkRagdollConstraint.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkRagdollConstraint.h"
 #include "../../include/gen/RagdollDescriptor.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkRagdollConstraint"] = bhkRagdollConstraint::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkRagdollConstraint", bhkRagdollConstraint::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkRefObject.cpp b/src/obj/bhkRefObject.cpp
index 9f7b78123f120f88cbcff70702a41c53b3fbd5fc..f3c627bf5a666f7fd5cfc1b2e276986b6ff7ad0b 100644
--- a/src/obj/bhkRefObject.cpp
+++ b/src/obj/bhkRefObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkRefObject.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkRefObject"] = bhkRefObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkRefObject", bhkRefObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkRigidBody.cpp b/src/obj/bhkRigidBody.cpp
index 29ad51c756cb05de93787ac109d61a4e4b3d0fba..b17574e67481d921300b17abdcd9058fc59bf33c 100644
--- a/src/obj/bhkRigidBody.cpp
+++ b/src/obj/bhkRigidBody.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkRigidBody.h"
 #include "../../include/gen/QuaternionXYZW.h"
@@ -45,8 +46,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkRigidBody"] = bhkRigidBody::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkRigidBody", bhkRigidBody::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkRigidBodyT.cpp b/src/obj/bhkRigidBodyT.cpp
index 1c7d7512c34c1daac752e211cd6d6eda09466ad7..4533c290b947fd604300391225420ab3895b0cbc 100644
--- a/src/obj/bhkRigidBodyT.cpp
+++ b/src/obj/bhkRigidBodyT.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkRigidBodyT.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkRigidBodyT"] = bhkRigidBodyT::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkRigidBodyT", bhkRigidBodyT::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkSPCollisionObject.cpp b/src/obj/bhkSPCollisionObject.cpp
index ee4786d7322b2f565a359c933a36021ca952c8e9..d824ea9c737e0ed2a5af040ca7b86f4de840ece0 100644
--- a/src/obj/bhkSPCollisionObject.cpp
+++ b/src/obj/bhkSPCollisionObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkSPCollisionObject.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkSPCollisionObject"] = bhkSPCollisionObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkSPCollisionObject", bhkSPCollisionObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkSerializable.cpp b/src/obj/bhkSerializable.cpp
index ca0451e351f2f3cd618996212c0330c3e5741946..94f0aa77eec1ec0be242eb0425b5147f59710fe1 100644
--- a/src/obj/bhkSerializable.cpp
+++ b/src/obj/bhkSerializable.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkSerializable.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkSerializable"] = bhkSerializable::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkSerializable", bhkSerializable::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkShape.cpp b/src/obj/bhkShape.cpp
index f0b96a6fba7790383139c95cc157bb12dd0817e2..26629ba715f2f47276f83d2d7065774a56677d4e 100644
--- a/src/obj/bhkShape.cpp
+++ b/src/obj/bhkShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkShape"] = bhkShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkShape", bhkShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkShapeCollection.cpp b/src/obj/bhkShapeCollection.cpp
index a25ad12a350a79d3ae577de41b1ff1765ee4488d..d072bb5b4c568c075339ecc670f7230196ba1daf 100644
--- a/src/obj/bhkShapeCollection.cpp
+++ b/src/obj/bhkShapeCollection.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkShapeCollection.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkShapeCollection"] = bhkShapeCollection::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkShapeCollection", bhkShapeCollection::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkShapePhantom.cpp b/src/obj/bhkShapePhantom.cpp
index cfed30e7b2aa08ce7435eb1333cdc48eefbce7c5..8c918792277019381224722798f922438d114b4c 100644
--- a/src/obj/bhkShapePhantom.cpp
+++ b/src/obj/bhkShapePhantom.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkShapePhantom.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkShapePhantom"] = bhkShapePhantom::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkShapePhantom", bhkShapePhantom::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkSimpleShapePhantom.cpp b/src/obj/bhkSimpleShapePhantom.cpp
index a72a621690471300fb36f87715c15fd07aacd6de..9109873fd3bdbf0b59eb805014005406dd62bd4a 100644
--- a/src/obj/bhkSimpleShapePhantom.cpp
+++ b/src/obj/bhkSimpleShapePhantom.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkSimpleShapePhantom.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkSimpleShapePhantom"] = bhkSimpleShapePhantom::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkSimpleShapePhantom", bhkSimpleShapePhantom::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkSphereRepShape.cpp b/src/obj/bhkSphereRepShape.cpp
index 1b9f4e7c7214c70be101e0ee44c424677ce5b048..892fa316583b6a41fc4796caaa7330614a36dfad 100644
--- a/src/obj/bhkSphereRepShape.cpp
+++ b/src/obj/bhkSphereRepShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkSphereRepShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkSphereRepShape"] = bhkSphereRepShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkSphereRepShape", bhkSphereRepShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkSphereShape.cpp b/src/obj/bhkSphereShape.cpp
index 57882041db38d28dd190ff8fff788f833dfafb63..33d337559dc708deaa457fe900193ec903755c91 100644
--- a/src/obj/bhkSphereShape.cpp
+++ b/src/obj/bhkSphereShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkSphereShape.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkSphereShape"] = bhkSphereShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkSphereShape", bhkSphereShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkStiffSpringConstraint.cpp b/src/obj/bhkStiffSpringConstraint.cpp
index d23bf1a098afb25b098e48b4540f2a11b5a3c9bd..d1b7e7f85a018a73952ea779cad8e2702720f317 100644
--- a/src/obj/bhkStiffSpringConstraint.cpp
+++ b/src/obj/bhkStiffSpringConstraint.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkStiffSpringConstraint.h"
 using namespace Niflib;
@@ -43,8 +44,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkStiffSpringConstraint"] = bhkStiffSpringConstraint::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkStiffSpringConstraint", bhkStiffSpringConstraint::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkTransformShape.cpp b/src/obj/bhkTransformShape.cpp
index 6496c6cb1c70e5e53d7c6397c207a79904485baa..d99747a75dfb006439957bddcabdf74b01a0a811 100644
--- a/src/obj/bhkTransformShape.cpp
+++ b/src/obj/bhkTransformShape.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkTransformShape.h"
 #include "../../include/obj/bhkShape.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkTransformShape"] = bhkTransformShape::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkTransformShape", bhkTransformShape::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/bhkWorldObject.cpp b/src/obj/bhkWorldObject.cpp
index a003098c137edf96ee6962a8065334e17be2b7dc..13d6d56a194c8c395981b9356febc1809288e432 100644
--- a/src/obj/bhkWorldObject.cpp
+++ b/src/obj/bhkWorldObject.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/bhkWorldObject.h"
 #include "../../include/obj/bhkShape.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["bhkWorldObject"] = bhkWorldObject::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "bhkWorldObject", bhkWorldObject::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;
diff --git a/src/obj/hkPackedNiTriStripsData.cpp b/src/obj/hkPackedNiTriStripsData.cpp
index 0f19ae626fde30514ff316974cc4d2263c1c666c..0211194c231c6260ab10cf2ca923bcf38b337ef5 100644
--- a/src/obj/hkPackedNiTriStripsData.cpp
+++ b/src/obj/hkPackedNiTriStripsData.cpp
@@ -11,6 +11,7 @@ All rights reserved.  Please see niflib.h for license. */
 //--END CUSTOM CODE--//
 
 #include "../../include/FixLink.h"
+#include "../../include/ObjectRegistry.h"
 #include "../../include/NIF_IO.h"
 #include "../../include/obj/hkPackedNiTriStripsData.h"
 #include "../../include/gen/hkTriangle.h"
@@ -44,8 +45,8 @@ namespace Niflib {
 	static bool obj_initialized = Initialization();
 
 	static bool Initialization() {
-		//Add the function to the global object map
-		global_object_map["hkPackedNiTriStripsData"] = hkPackedNiTriStripsData::Create;
+		//Register this object type with Niflib
+		ObjectRegistry::RegisterObject( "hkPackedNiTriStripsData", hkPackedNiTriStripsData::Create );
 
 		//Do this stuff just to make sure the compiler doesn't optimize this function and the static bool away.
 		obj_initialized = true;