diff --git a/SConstruct b/SConstruct
index a1fad259a97c5d0f20051eac7900bd7a31ba7d9d..9d1bd35fddd687409a3e7c32dc6e4301dd586e3e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -14,7 +14,7 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
     python_lib = ['python%d.%d' % sys.version_info[0:2]]
     python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
     python_include = [sysconfig.get_python_inc ()]
-    cppflags = '-fPIC -Wall -ggdb'
+    cppflags = '-fPIC -Wall'
 elif sys.platform == 'cygwin':
     python_lib = ['python%d.%d' % sys.version_info[0:2]]
     python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
@@ -31,10 +31,6 @@ else:
 
 env = Environment(ENV = os.environ)
 
-# force MD5 signatures to check for rebuilds
-
-SourceSignatures('MD5')
-
 # detect SWIG
 try:
     env['SWIG']
@@ -48,9 +44,9 @@ You can get it from http://www.swig.org/"""
 
 # build niflib and python wrapper
 
-objfiles = 'obj/NiObject.cpp obj/AKeyedData.cpp obj/AParticleModifier.cpp obj/bhkRefObject.cpp obj/bhkSerializable.cpp obj/AbhkConstraint.cpp obj/AbhkRagdollConstraint.cpp obj/bhkShape.cpp obj/AbhkShapeCollection.cpp obj/bhkSphereRepShape.cpp obj/bhkConvexShape.cpp obj/bhkWorldObject.cpp obj/bhkEntity.cpp obj/NiCollisionObject.cpp obj/NiExtraData.cpp obj/NiInterpolator.cpp obj/NiBlendInterpolator.cpp obj/NiBSplineInterpolator.cpp obj/NiObjectNET.cpp obj/NiAVObject.cpp obj/NiDynamicEffect.cpp obj/NiLight.cpp obj/NiProperty.cpp obj/NiPSysModifier.cpp obj/NiPSysEmitter.cpp obj/NiPSysVolumeEmitter.cpp obj/NiTimeController.cpp obj/ABoneLODController.cpp obj/NiSingleInterpolatorController.cpp obj/APSysCtlr.cpp obj/NiTriBasedGeom.cpp obj/NiTriBasedGeomData.cpp obj/APSysData.cpp obj/bhkBlendCollisionObject.cpp obj/bhkBlendController.cpp obj/bhkBoxShape.cpp obj/bhkCapsuleShape.cpp obj/bhkCollisionObject.cpp obj/bhkConvexVerticesShape.cpp obj/bhkHingeConstraint.cpp obj/bhkLimitedHingeConstraint.cpp obj/bhkListShape.cpp obj/bhkMalleableConstraint.cpp obj/bhkMoppBvTreeShape.cpp obj/bhkMultiSphereShape.cpp obj/bhkNiTriStripsShape.cpp obj/bhkPackedNiTriStripsShape.cpp obj/bhkPrismaticConstraint.cpp obj/bhkRagdollConstraint.cpp obj/bhkRigidBody.cpp obj/bhkRigidBodyT.cpp obj/bhkSimpleShapePhantom.cpp obj/bhkSPCollisionObject.cpp obj/bhkSphereShape.cpp obj/bhkStiffSpringConstraint.cpp obj/bhkTransformShape.cpp obj/bhkConvexTransformShape.cpp obj/BSBound.cpp obj/BSFurnitureMarker.cpp obj/BSParentVelocityModifier.cpp obj/BSPSysArrayEmitter.cpp obj/BSXFlags.cpp obj/hkPackedNiTriStripsData.cpp obj/NiAlphaController.cpp obj/NiAlphaProperty.cpp obj/NiAmbientLight.cpp obj/NiAutoNormalParticlesData.cpp obj/NiBinaryExtraData.cpp obj/NiBlendBoolInterpolator.cpp obj/NiBlendFloatInterpolator.cpp obj/NiBlendPoint3Interpolator.cpp obj/NiBlendTransformInterpolator.cpp obj/NiBoneLODController.cpp obj/NiBoolData.cpp obj/NiBooleanExtraData.cpp obj/NiBoolInterpolator.cpp obj/NiBoolTimelineInterpolator.cpp obj/NiBSBoneLODController.cpp obj/NiBSplineBasisData.cpp obj/NiBSplineCompFloatInterpolator.cpp obj/NiBSplineCompPoint3Interpolator.cpp obj/NiBSplineCompTransformInterpolator.cpp obj/NiBSplineData.cpp obj/NiCamera.cpp obj/NiCollisionData.cpp obj/NiColorData.cpp obj/NiColorExtraData.cpp obj/NiControllerManager.cpp obj/NiControllerSequence.cpp obj/NiDefaultAVObjectPalette.cpp obj/NiDirectionalLight.cpp obj/NiDitherProperty.cpp obj/NiFlipController.cpp obj/NiFloatData.cpp obj/NiFloatExtraData.cpp obj/NiFloatExtraDataController.cpp obj/NiFloatInterpolator.cpp obj/NiFloatsExtraData.cpp obj/NiFogProperty.cpp obj/NiGeomMorpherController.cpp obj/NiGravity.cpp obj/NiIntegerExtraData.cpp obj/NiIntegersExtraData.cpp obj/NiKeyframeController.cpp obj/BSKeyframeController.cpp obj/NiKeyframeData.cpp obj/NiLightColorController.cpp obj/NiLightDimmerController.cpp obj/NiLookAtController.cpp obj/NiLookAtInterpolator.cpp obj/NiMaterialColorController.cpp obj/NiMaterialProperty.cpp obj/NiMeshPSysData.cpp obj/NiMorphData.cpp obj/NiMultiTargetTransformController.cpp obj/NiNode.cpp obj/AvoidNode.cpp obj/FxWidget.cpp obj/FxButton.cpp obj/FxRadioButton.cpp obj/NiBillboardNode.cpp obj/NiBSAnimationNode.cpp obj/NiBSParticleNode.cpp obj/NiLODNode.cpp obj/NiPalette.cpp obj/NiParticleBomb.cpp obj/NiParticleColorModifier.cpp obj/NiParticleGrowFade.cpp obj/NiParticleMeshModifier.cpp obj/NiParticleRotation.cpp obj/NiParticles.cpp obj/NiAutoNormalParticles.cpp obj/NiParticleMeshes.cpp obj/NiParticlesData.cpp obj/NiParticleMeshesData.cpp obj/NiParticleSystem.cpp obj/NiMeshParticleSystem.cpp obj/NiParticleSystemController.cpp obj/NiBSPArrayController.cpp obj/NiPathController.cpp obj/NiPathInterpolator.cpp obj/NiPixelData.cpp obj/NiPlanarCollider.cpp obj/NiPoint3Interpolator.cpp obj/NiPointLight.cpp obj/NiPosData.cpp obj/NiPSysAgeDeathModifier.cpp obj/NiPSysBombModifier.cpp obj/NiPSysBoundUpdateModifier.cpp obj/NiPSysBoxEmitter.cpp obj/NiPSysColliderManager.cpp obj/NiPSysColorModifier.cpp obj/NiPSysCylinderEmitter.cpp obj/NiPSysData.cpp obj/NiPSysDragModifier.cpp obj/NiPSysEmitterCtlr.cpp obj/NiPSysEmitterCtlrData.cpp obj/NiPSysEmitterDeclinationCtlr.cpp obj/NiPSysEmitterDeclinationVarCtlr.cpp obj/NiPSysEmitterInitialRadiusCtlr.cpp obj/NiPSysEmitterLifeSpanCtlr.cpp obj/NiPSysEmitterSpeedCtlr.cpp obj/NiPSysGravityModifier.cpp obj/NiPSysGravityStrengthCtlr.cpp obj/NiPSysGrowFadeModifier.cpp obj/NiPSysMeshEmitter.cpp obj/NiPSysMeshUpdateModifier.cpp obj/NiPSysModifierActiveCtlr.cpp obj/NiPSysPlanarCollider.cpp obj/NiPSysPositionModifier.cpp obj/NiPSysResetOnLoopCtlr.cpp obj/NiPSysRotationModifier.cpp obj/NiPSysSpawnModifier.cpp obj/NiPSysSphereEmitter.cpp obj/NiPSysUpdateCtlr.cpp obj/NiRangeLODData.cpp obj/NiRotatingParticles.cpp obj/NiRotatingParticlesData.cpp obj/NiScreenLODData.cpp obj/NiSequenceStreamHelper.cpp obj/NiShadeProperty.cpp obj/NiSkinData.cpp obj/NiSkinInstance.cpp obj/NiSkinPartition.cpp obj/NiSourceTexture.cpp obj/NiSpecularProperty.cpp obj/NiSphericalCollider.cpp obj/NiSpotLight.cpp obj/NiStencilProperty.cpp obj/NiStringExtraData.cpp obj/NiStringPalette.cpp obj/NiStringsExtraData.cpp obj/NiTextKeyExtraData.cpp obj/NiTextureEffect.cpp obj/NiTextureTransformController.cpp obj/NiTexturingProperty.cpp obj/NiTransformController.cpp obj/NiTransformData.cpp obj/NiTransformInterpolator.cpp obj/NiTriShape.cpp obj/NiTriShapeData.cpp obj/NiTriStrips.cpp obj/NiTriStripsData.cpp obj/NiUVController.cpp obj/NiUVData.cpp obj/NiVectorExtraData.cpp obj/NiVertexColorProperty.cpp obj/NiVertWeightsExtraData.cpp obj/NiVisController.cpp obj/NiVisData.cpp obj/NiWireframeProperty.cpp obj/NiZBufferProperty.cpp obj/RootCollisionNode.cpp '
+objfiles = 'gen/Bones.cpp gen/ByteArray.cpp gen/Footer.cpp gen/LODRange.cpp gen/MatchGroup.cpp gen/MipMap.cpp gen/NodeGroup.cpp gen/QuaternionXYZW.cpp gen/ShortString.cpp gen/SkinShape.cpp gen/SkinShapeGroup.cpp gen/SkinWeight.cpp gen/AVObject.cpp gen/ControllerLink.cpp gen/Header.cpp gen/StringPalette.cpp gen/TBC.cpp gen/TexDesc.cpp gen/ShaderTexDesc.cpp gen/TexSource.cpp gen/SkinPartition.cpp gen/BoundingBox.cpp gen/FurniturePosition.cpp gen/hkTriangle.cpp gen/Morph.cpp gen/Particle.cpp gen/SkinData.cpp gen/RagDollDescriptor.cpp gen/LimitedHingeDescriptor.cpp obj/NiObject.cpp obj/AKeyedData.cpp obj/AParticleModifier.cpp obj/bhkRefObject.cpp obj/bhkSerializable.cpp obj/AbhkConstraint.cpp obj/AbhkRagdollConstraint.cpp obj/bhkShape.cpp obj/AbhkShapeCollection.cpp obj/bhkSphereRepShape.cpp obj/bhkConvexShape.cpp obj/bhkWorldObject.cpp obj/bhkEntity.cpp obj/NiCollisionObject.cpp obj/NiExtraData.cpp obj/NiInterpolator.cpp obj/NiBlendInterpolator.cpp obj/NiBSplineInterpolator.cpp obj/NiObjectNET.cpp obj/NiAVObject.cpp obj/NiDynamicEffect.cpp obj/NiLight.cpp obj/NiProperty.cpp obj/NiPSysModifier.cpp obj/NiPSysEmitter.cpp obj/NiPSysVolumeEmitter.cpp obj/NiTimeController.cpp obj/ABoneLODController.cpp obj/NiSingleInterpolatorController.cpp obj/APSysCtlr.cpp obj/NiTriBasedGeom.cpp obj/NiTriBasedGeomData.cpp obj/APSysData.cpp obj/bhkBlendCollisionObject.cpp obj/bhkBlendController.cpp obj/bhkBoxShape.cpp obj/bhkCapsuleShape.cpp obj/bhkCollisionObject.cpp obj/bhkConvexVerticesShape.cpp obj/bhkHingeConstraint.cpp obj/bhkLimitedHingeConstraint.cpp obj/bhkListShape.cpp obj/bhkMalleableConstraint.cpp obj/bhkMoppBvTreeShape.cpp obj/bhkMultiSphereShape.cpp obj/bhkNiTriStripsShape.cpp obj/bhkPackedNiTriStripsShape.cpp obj/bhkPrismaticConstraint.cpp obj/bhkRagdollConstraint.cpp obj/bhkRigidBody.cpp obj/bhkRigidBodyT.cpp obj/bhkSimpleShapePhantom.cpp obj/bhkSPCollisionObject.cpp obj/bhkSphereShape.cpp obj/bhkStiffSpringConstraint.cpp obj/bhkTransformShape.cpp obj/bhkConvexTransformShape.cpp obj/BSBound.cpp obj/BSFurnitureMarker.cpp obj/BSParentVelocityModifier.cpp obj/BSPSysArrayEmitter.cpp obj/BSXFlags.cpp obj/hkPackedNiTriStripsData.cpp obj/NiAlphaController.cpp obj/NiAlphaProperty.cpp obj/NiAmbientLight.cpp obj/NiAutoNormalParticlesData.cpp obj/NiBinaryExtraData.cpp obj/NiBlendBoolInterpolator.cpp obj/NiBlendFloatInterpolator.cpp obj/NiBlendPoint3Interpolator.cpp obj/NiBlendTransformInterpolator.cpp obj/NiBoneLODController.cpp obj/NiBoolData.cpp obj/NiBooleanExtraData.cpp obj/NiBoolInterpolator.cpp obj/NiBoolTimelineInterpolator.cpp obj/NiBSBoneLODController.cpp obj/NiBSplineBasisData.cpp obj/NiBSplineCompFloatInterpolator.cpp obj/NiBSplineCompPoint3Interpolator.cpp obj/NiBSplineCompTransformInterpolator.cpp obj/NiBSplineData.cpp obj/NiCamera.cpp obj/NiCollisionData.cpp obj/NiColorData.cpp obj/NiColorExtraData.cpp obj/NiControllerManager.cpp obj/NiControllerSequence.cpp obj/NiDefaultAVObjectPalette.cpp obj/NiDirectionalLight.cpp obj/NiDitherProperty.cpp obj/NiFlipController.cpp obj/NiFloatData.cpp obj/NiFloatExtraData.cpp obj/NiFloatExtraDataController.cpp obj/NiFloatInterpolator.cpp obj/NiFloatsExtraData.cpp obj/NiFogProperty.cpp obj/NiGeomMorpherController.cpp obj/NiGravity.cpp obj/NiIntegerExtraData.cpp obj/NiIntegersExtraData.cpp obj/NiKeyframeController.cpp obj/BSKeyframeController.cpp obj/NiKeyframeData.cpp obj/NiLightColorController.cpp obj/NiLightDimmerController.cpp obj/NiLookAtController.cpp obj/NiLookAtInterpolator.cpp obj/NiMaterialColorController.cpp obj/NiMaterialProperty.cpp obj/NiMeshPSysData.cpp obj/NiMorphData.cpp obj/NiMultiTargetTransformController.cpp obj/NiNode.cpp obj/AvoidNode.cpp obj/FxWidget.cpp obj/FxButton.cpp obj/FxRadioButton.cpp obj/NiBillboardNode.cpp obj/NiBSAnimationNode.cpp obj/NiBSParticleNode.cpp obj/NiLODNode.cpp obj/NiPalette.cpp obj/NiParticleBomb.cpp obj/NiParticleColorModifier.cpp obj/NiParticleGrowFade.cpp obj/NiParticleMeshModifier.cpp obj/NiParticleRotation.cpp obj/NiParticles.cpp obj/NiAutoNormalParticles.cpp obj/NiParticleMeshes.cpp obj/NiParticlesData.cpp obj/NiParticleMeshesData.cpp obj/NiParticleSystem.cpp obj/NiMeshParticleSystem.cpp obj/NiParticleSystemController.cpp obj/NiBSPArrayController.cpp obj/NiPathController.cpp obj/NiPathInterpolator.cpp obj/NiPixelData.cpp obj/NiPlanarCollider.cpp obj/NiPoint3Interpolator.cpp obj/NiPointLight.cpp obj/NiPosData.cpp obj/NiPSysAgeDeathModifier.cpp obj/NiPSysBombModifier.cpp obj/NiPSysBoundUpdateModifier.cpp obj/NiPSysBoxEmitter.cpp obj/NiPSysColliderManager.cpp obj/NiPSysColorModifier.cpp obj/NiPSysCylinderEmitter.cpp obj/NiPSysData.cpp obj/NiPSysDragModifier.cpp obj/NiPSysEmitterCtlr.cpp obj/NiPSysEmitterCtlrData.cpp obj/NiPSysEmitterDeclinationCtlr.cpp obj/NiPSysEmitterDeclinationVarCtlr.cpp obj/NiPSysEmitterInitialRadiusCtlr.cpp obj/NiPSysEmitterLifeSpanCtlr.cpp obj/NiPSysEmitterSpeedCtlr.cpp obj/NiPSysGravityModifier.cpp obj/NiPSysGravityStrengthCtlr.cpp obj/NiPSysGrowFadeModifier.cpp obj/NiPSysMeshEmitter.cpp obj/NiPSysMeshUpdateModifier.cpp obj/NiPSysModifierActiveCtlr.cpp obj/NiPSysPlanarCollider.cpp obj/NiPSysPositionModifier.cpp obj/NiPSysResetOnLoopCtlr.cpp obj/NiPSysRotationModifier.cpp obj/NiPSysSpawnModifier.cpp obj/NiPSysSphereEmitter.cpp obj/NiPSysUpdateCtlr.cpp obj/NiRangeLODData.cpp obj/NiRotatingParticles.cpp obj/NiRotatingParticlesData.cpp obj/NiScreenLODData.cpp obj/NiSequenceStreamHelper.cpp obj/NiShadeProperty.cpp obj/NiSkinData.cpp obj/NiSkinInstance.cpp obj/NiSkinPartition.cpp obj/NiSourceTexture.cpp obj/NiSpecularProperty.cpp obj/NiSphericalCollider.cpp obj/NiSpotLight.cpp obj/NiStencilProperty.cpp obj/NiStringExtraData.cpp obj/NiStringPalette.cpp obj/NiStringsExtraData.cpp obj/NiTextKeyExtraData.cpp obj/NiTextureEffect.cpp obj/NiTextureTransformController.cpp obj/NiTexturingProperty.cpp obj/NiTransformController.cpp obj/NiTransformData.cpp obj/NiTransformInterpolator.cpp obj/NiTriShape.cpp obj/NiTriShapeData.cpp obj/NiTriStrips.cpp obj/NiTriStripsData.cpp obj/NiUVController.cpp obj/NiUVData.cpp obj/NiVectorExtraData.cpp obj/NiVertexColorProperty.cpp obj/NiVertWeightsExtraData.cpp obj/NiVisController.cpp obj/NiVisData.cpp obj/NiWireframeProperty.cpp obj/NiZBufferProperty.cpp obj/RootCollisionNode.cpp '
 
-niflib = env.StaticLibrary('niflib', Split('niflib.cpp nif_math.cpp NIF_IO.cpp kfm.cpp docsys_extract.cpp obj/Type.cpp ' + objfiles), CPPPATH = '.', CPPFLAGS = cppflags)
+niflib = env.StaticLibrary('niflib', Split('niflib.cpp nif_math.cpp NIF_IO.cpp kfm.cpp Type.cpp gen/obj_factories.cpp ' + objfiles), CPPPATH = '.', CPPFLAGS = cppflags)
 #nifshlib = env.SharedLibrary('_niflib', 'pyniflib.i', LIBS=['niflib'] + python_lib, LIBPATH=['.'] + python_libpath, SWIGFLAGS = '-c++ -python', CPPPATH = ['.'] + python_include, CPPFLAGS = cppflags, SHLIBPREFIX='')
 # makes sure niflib.lib is built before trying to build _niflib.dll
 #env.Depends(nifshlib, niflib)
diff --git a/gen/AVObject.cpp b/gen/AVObject.cpp
index a07297633aad8b797dc8345a6ca58f39b7e1fbaf..87c360f0de5e59431c9dbfb5f4764b373c9f7964 100644
--- a/gen/AVObject.cpp
+++ b/gen/AVObject.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "AVObject.h"
+#include "gen/AVObject.h"
 #include "obj/NiAVObject.h"
 
 //Constructor
diff --git a/gen/AVObject.h b/gen/AVObject.h
index ac8f31d1568f10225ca0ff03620f81e52fbb4855..1b3e9359e50da20754aeb60de6d205b9f4623373 100644
--- a/gen/AVObject.h
+++ b/gen/AVObject.h
@@ -5,9 +5,6 @@ All rights reserved.  Please see niflib.h for licence. */
 #define _AVOBJECT_H_
 
 #include "NIF_IO.h"
-#include "Ref.h"
-
-//Forward Declarations
 class NiAVObject;
 
 /*!
diff --git a/gen/Bones.cpp b/gen/Bones.cpp
index 21fd250c0d5f18643a2fef8cd19cfe1bda682e73..8df625fc871fb74de03e5d1e3e8ca4a9c78df11d 100644
--- a/gen/Bones.cpp
+++ b/gen/Bones.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "Bones.h"
+#include "gen/Bones.h"
 #include "obj/NiNode.h"
 
 //Constructor
diff --git a/gen/Bones.h b/gen/Bones.h
index 4c7b56f2061756031d2b0c357a4852f80b01a11b..a90e2d0af82af76b1f39bee16db7c1409935984d 100644
--- a/gen/Bones.h
+++ b/gen/Bones.h
@@ -5,9 +5,6 @@ All rights reserved.  Please see niflib.h for licence. */
 #define _BONES_H_
 
 #include "NIF_IO.h"
-#include "Ref.h"
-
-//Forward Declarations
 class NiNode;
 
 /*!
diff --git a/gen/BoundingBox.cpp b/gen/BoundingBox.cpp
index b3608db77fb6b75d18053ce2fab441027e7b5166..11e19c632425164eeccac34408be5d8811ae18fb 100644
--- a/gen/BoundingBox.cpp
+++ b/gen/BoundingBox.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "BoundingBox.h"
+#include "gen/BoundingBox.h"
 
 //Constructor
 BoundingBox::BoundingBox() : unknownInt((uint)1) {};
diff --git a/gen/BoundingBox.h b/gen/BoundingBox.h
index da33d0dae6c3dbbbb0a8800aed853175f0626d18..e60dd8fc2367806687bbd9d8a700098f81b03339 100644
--- a/gen/BoundingBox.h
+++ b/gen/BoundingBox.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Bounding box.
  */
diff --git a/gen/ByteArray.cpp b/gen/ByteArray.cpp
index 4c40b47725aa6f107ec3eddb5d073e92af0229f8..99f8f6e3c5111c0e7715875b02bea08fbb83ae76 100644
--- a/gen/ByteArray.cpp
+++ b/gen/ByteArray.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "ByteArray.h"
+#include "gen/ByteArray.h"
 
 //Constructor
 ByteArray::ByteArray() : dataSize((uint)0), unknownInt((uint)0) {};
diff --git a/gen/ByteArray.h b/gen/ByteArray.h
index 070829b51c581909be09a1f1efbfd0ac920865c4..b33a27c1be7880a819771aad8cb370511c2bef68 100644
--- a/gen/ByteArray.h
+++ b/gen/ByteArray.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * An array of bytes.
  */
diff --git a/gen/ControllerLink.cpp b/gen/ControllerLink.cpp
index a5f0f556f577807304f5a6c4162a7d54258db467..407aa0fbeec9fa90f797a49f652e1c36833f6b49 100644
--- a/gen/ControllerLink.cpp
+++ b/gen/ControllerLink.cpp
@@ -1,11 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "ControllerLink.h"
-#include "obj/NiInterpolator.h"
-#include "obj/NiObject.h"
-#include "obj/NiObject.h"
-#include "obj/NiStringPalette.h"
+#include "gen/ControllerLink.h"
 
 //Constructor
 ControllerLink::ControllerLink() : interpolator(NULL), unknownLink1(NULL), unknownLink2(NULL), unknownShort0((ushort)0), priority_((byte)0), stringPalette(NULL), nodeNameOffset((uint)0), propertyTypeOffset((uint)0), controllerTypeOffset((uint)0), variableOffset1((uint)0), variableOffset2((uint)0) {};
diff --git a/gen/ControllerLink.h b/gen/ControllerLink.h
index 2879343f1241eccfeeb09af12bffe89e5932dc62..0b10c26eec090df94cb21f170f81d70c8d6424e0 100644
--- a/gen/ControllerLink.h
+++ b/gen/ControllerLink.h
@@ -6,12 +6,9 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 #include "Ref.h"
-
-//Forward Declarations
-class NiInterpolator;
-class NiObject;
-class NiObject;
-class NiStringPalette;
+#include "obj/NiInterpolator.h"
+#include "obj/NiObject.h"
+#include "obj/NiStringPalette.h"
 
 /*!
  * In a .kf file, this links to a controllable block, via its name (or
diff --git a/gen/Footer.cpp b/gen/Footer.cpp
index 021be3a540f63cba567dab4bc453d6aa5d50db10..334d8128d1f8af7e5066de2cc8a904ac674d1819 100644
--- a/gen/Footer.cpp
+++ b/gen/Footer.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "Footer.h"
-#include "obj/NiAVObject.h"
+#include "gen/Footer.h"
 
 //Constructor
 Footer::Footer() : numRoots((uint)0) {};
diff --git a/gen/Footer.h b/gen/Footer.h
index 768e3345874140beff6c92bb5b301139cae3af7d..ece18602e22738fff9ebddd98b44a88e9522d688 100644
--- a/gen/Footer.h
+++ b/gen/Footer.h
@@ -6,9 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 #include "Ref.h"
-
-//Forward Declarations
-class NiAVObject;
+#include "obj/NiAVObject.h"
 
 /*!
  * The NIF file footer.
diff --git a/gen/FurniturePosition.cpp b/gen/FurniturePosition.cpp
index 157e5e6352141ad3c77b0eb764eeacb4adb7ef67..d1361c7d75eb8162d7ad4b3f748122ce0b048cd5 100644
--- a/gen/FurniturePosition.cpp
+++ b/gen/FurniturePosition.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "FurniturePosition.h"
+#include "gen/FurniturePosition.h"
 
 //Constructor
 FurniturePosition::FurniturePosition() : unknownShort((ushort)0), positionRef1_((byte)0), positionRef2_((byte)0) {};
diff --git a/gen/FurniturePosition.h b/gen/FurniturePosition.h
index e345b8923c70a8a3ecf92ddaf16b562da5645b89..a9bade19a21c832a9176dc673eafe3bd2ad0679a 100644
--- a/gen/FurniturePosition.h
+++ b/gen/FurniturePosition.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Describes a furniture position?
  */
diff --git a/gen/Header.cpp b/gen/Header.cpp
index 0ddc730fc8da5f4daa7e46a26879c4d6077be3fe..cdc6e0b3c0d15f9bf16dcaaec1fb7a9c179caca2 100644
--- a/gen/Header.cpp
+++ b/gen/Header.cpp
@@ -1,7 +1,10 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "Header.h"
+#include "gen/Header.h"
+#include "gen/ShortString.h"
+#include "gen/ShortString.h"
+#include "gen/ShortString.h"
 
 //Constructor
 Header::Header() : version((uint)0x04000002), endianType((byte)1), userVersion((uint)0), numBlocks((uint)0), unknownInt1((uint)0), unknownInt3((uint)0), numBlockTypes((ushort)0), unknownInt2((uint)0) {};
diff --git a/gen/Header.h b/gen/Header.h
index 64a7758025fe3848234e935c85241ec75124050b..d761429b7221b719ec7bcae023d8a0375c27a8f9 100644
--- a/gen/Header.h
+++ b/gen/Header.h
@@ -6,8 +6,6 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 #include "gen/ShortString.h"
-#include "gen/ShortString.h"
-#include "gen/ShortString.h"
 
 /*!
  * The NIF file header.
diff --git a/gen/KeyGroup.h b/gen/KeyGroup.h
index 402cfce1393f3fb51cb6549eef8403e7d7752bd2..7c8374b8ac21c6dee1787c0a5c9a27882838dd95 100644
--- a/gen/KeyGroup.h
+++ b/gen/KeyGroup.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Array of vector keys (anything that can be interpolated, except
  * rotations).
diff --git a/gen/LODRange.cpp b/gen/LODRange.cpp
index 2e6d9101f00364201c1f8213a2551c6a75767ef9..b66633dbd7214ba4ffcd7098f6cdab6ed34d2a5a 100644
--- a/gen/LODRange.cpp
+++ b/gen/LODRange.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "LODRange.h"
+#include "gen/LODRange.h"
 
 //Constructor
 LODRange::LODRange() : near(0.0f), far(0.0f) {};
diff --git a/gen/LODRange.h b/gen/LODRange.h
index dc251ab20c0e5ddd24c16940088f4f622249181a..da4100e7e6f23e639f93453e32b8fa39cfa529ab 100644
--- a/gen/LODRange.h
+++ b/gen/LODRange.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * The distance range where a specific level of detail applies.
  */
diff --git a/gen/LimitedHingeDescriptor.cpp b/gen/LimitedHingeDescriptor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..12c61d0dd3df8e972b8d64daed81c8f45ca26303
--- /dev/null
+++ b/gen/LimitedHingeDescriptor.cpp
@@ -0,0 +1,10 @@
+/* Copyright (c) 2006, NIF File Format Library and Tools
+All rights reserved.  Please see niflib.h for licence. */
+
+#include "gen/LimitedHingeDescriptor.h"
+
+//Constructor
+LimitedHingeDescriptor::LimitedHingeDescriptor() : minAngle(0.0f), maxAngle(0.0f), maxFriction(0.0f) {};
+
+//Destructor
+LimitedHingeDescriptor::~LimitedHingeDescriptor() {};
diff --git a/gen/LimitedHingeDescriptor.h b/gen/LimitedHingeDescriptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..c9ddb033a7fb40a1ff7e36ff75f4e9544ccb19ba
--- /dev/null
+++ b/gen/LimitedHingeDescriptor.h
@@ -0,0 +1,60 @@
+/* Copyright (c) 2006, NIF File Format Library and Tools
+All rights reserved.  Please see niflib.h for licence. */
+
+#ifndef _LIMITEDHINGEDESCRIPTOR_H_
+#define _LIMITEDHINGEDESCRIPTOR_H_
+
+#include "NIF_IO.h"
+
+
+/*!
+ * 
+ */
+struct LimitedHingeDescriptor {
+  /*! Default Constructor */
+  LimitedHingeDescriptor();
+  /*! Default Destructor */
+  ~LimitedHingeDescriptor();
+  /*!
+   * Unknown.
+   */
+  Float4 pivotA;
+  /*!
+   * Unknown.
+   */
+  Float4 axleA_;
+  /*!
+   * Unknown.
+   */
+  Float4 perp2axleina1;
+  /*!
+   * Unknown.
+   */
+  Float4 perp2axleina2;
+  /*!
+   * Unknown.
+   */
+  Float4 pivotB;
+  /*!
+   * Unknown.
+   */
+  Float4 axleB;
+  /*!
+   * Unknown.
+   */
+  Float4 unknownVector;
+  /*!
+   * Unknown.
+   */
+  float minAngle;
+  /*!
+   * Unknown.
+   */
+  float maxAngle;
+  /*!
+   * Unknown.
+   */
+  float maxFriction;
+};
+
+#endif
diff --git a/gen/MatchGroup.cpp b/gen/MatchGroup.cpp
index 58b46937723cb9e855db86790632dce6d0a53d4b..d7215d19f2a440c89f0213ce6c13e08eb4287fa4 100644
--- a/gen/MatchGroup.cpp
+++ b/gen/MatchGroup.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "MatchGroup.h"
+#include "gen/MatchGroup.h"
 
 //Constructor
 MatchGroup::MatchGroup() : numVertices((ushort)0) {};
diff --git a/gen/MatchGroup.h b/gen/MatchGroup.h
index 1402d327fb32aa769e1606701cd4135eddb5b611..309f30811f0c9ffba404d17c32fea071f7664099 100644
--- a/gen/MatchGroup.h
+++ b/gen/MatchGroup.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Group of vertex indices of vertices that match.
  */
diff --git a/gen/MipMap.cpp b/gen/MipMap.cpp
index cd673a5669f9e41c91e0385a41ac0798d3fc1639..762b39687255bfd8c03b640796b48e8d8ac99111 100644
--- a/gen/MipMap.cpp
+++ b/gen/MipMap.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "MipMap.h"
+#include "gen/MipMap.h"
 
 //Constructor
 MipMap::MipMap() : width((uint)0), height((uint)0), offset((uint)0) {};
diff --git a/gen/MipMap.h b/gen/MipMap.h
index f069585fc68bef6e4d8e18aaa5e708f5c9cb4721..d4cebc3bd56c5e607e196855dd9af7e12d6b5531 100644
--- a/gen/MipMap.h
+++ b/gen/MipMap.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Description of a MipMap within a NiPixelData block.
  */
diff --git a/gen/Morph.cpp b/gen/Morph.cpp
index ef314ed6a70e286b4a159494def7d0f5077d49ed..3dd16552746ce401270d3adce48ce267de8d27c1 100644
--- a/gen/Morph.cpp
+++ b/gen/Morph.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "Morph.h"
+#include "gen/Morph.h"
 
 //Constructor
 Morph::Morph() : numMorphKeys((uint)0), morphInterpolation((KeyType)0), unknownInt((uint)0) {};
diff --git a/gen/Morph.h b/gen/Morph.h
index 02d1abd4f6824421eacf774750c3aaa1060b777b..34d4210387ffb5c509055db34d33864dfa6943c3 100644
--- a/gen/Morph.h
+++ b/gen/Morph.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Geometry morphing data component.
  */
diff --git a/gen/NodeGroup.cpp b/gen/NodeGroup.cpp
index db83353f16dc7a18b991d2b50bb6bbe61c0b8584..bc1eea03c2170f6468832f2f47d8c751e7528b3d 100644
--- a/gen/NodeGroup.cpp
+++ b/gen/NodeGroup.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NodeGroup.h"
-#include "obj/NiNode.h"
+#include "gen/NodeGroup.h"
 
 //Constructor
 NodeGroup::NodeGroup() : numNodes((uint)0) {};
diff --git a/gen/NodeGroup.h b/gen/NodeGroup.h
index a6de42fa6f8403d566db8cf125ffcf8fe16474c1..40112fe69c11d35197ed945b66a3057a3e41cd3f 100644
--- a/gen/NodeGroup.h
+++ b/gen/NodeGroup.h
@@ -6,9 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 #include "Ref.h"
-
-//Forward Declarations
-class NiNode;
+#include "obj/NiNode.h"
 
 /*!
  * A group of NiNodes references.
diff --git a/gen/Particle.cpp b/gen/Particle.cpp
index 5ba5c4579f28245733d43d21dcfacf04ff080259..962f92c02aca65a25e6e83517ac68ff5fa6a0203 100644
--- a/gen/Particle.cpp
+++ b/gen/Particle.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "Particle.h"
+#include "gen/Particle.h"
 
 //Constructor
 Particle::Particle() : lifetime(0.0f), lifespan(0.0f), timestamp(0.0f), unknownShort((ushort)0), vertexId((ushort)0) {};
diff --git a/gen/Particle.h b/gen/Particle.h
index 4cb3eecd6e5e0c622f92edc2e4350c462de93fa8..95d3372eb937eaad1b6c80258b727a3f055b4cbc 100644
--- a/gen/Particle.h
+++ b/gen/Particle.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * particle array entry
  */
diff --git a/gen/QuaternionXYZW.cpp b/gen/QuaternionXYZW.cpp
index 36b23acb780c9a6b500075603279d3e768ea19a5..a0a163ea3df014116016e50d2f6c1ff6e8b541f7 100644
--- a/gen/QuaternionXYZW.cpp
+++ b/gen/QuaternionXYZW.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "QuaternionXYZW.h"
+#include "gen/QuaternionXYZW.h"
 
 //Constructor
 QuaternionXYZW::QuaternionXYZW() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {};
diff --git a/gen/QuaternionXYZW.h b/gen/QuaternionXYZW.h
index daf6063ba82085181dd0628059f74b178556a276..e2e71840288898b7d4e063a6995469b7a4b579ec 100644
--- a/gen/QuaternionXYZW.h
+++ b/gen/QuaternionXYZW.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * A quaternion as it appears in the havok blocks.
  */
diff --git a/gen/RagDollDescriptor.cpp b/gen/RagDollDescriptor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..02878c423ce540c8777cd3fe41b78a19814b3c38
--- /dev/null
+++ b/gen/RagDollDescriptor.cpp
@@ -0,0 +1,10 @@
+/* Copyright (c) 2006, NIF File Format Library and Tools
+All rights reserved.  Please see niflib.h for licence. */
+
+#include "gen/RagDollDescriptor.h"
+
+//Constructor
+RagDollDescriptor::RagDollDescriptor() : coneMinAngle(0.0f), planeMinAngle(0.0f), planeMaxAngle(0.0f), twistMinAngle(0.0f), twistMaxAngle(0.0f), maxFriction(0.0f) {};
+
+//Destructor
+RagDollDescriptor::~RagDollDescriptor() {};
diff --git a/gen/RagDollDescriptor.h b/gen/RagDollDescriptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..26ec387a50b959223bbd84ad1ab1916167946257
--- /dev/null
+++ b/gen/RagDollDescriptor.h
@@ -0,0 +1,68 @@
+/* Copyright (c) 2006, NIF File Format Library and Tools
+All rights reserved.  Please see niflib.h for licence. */
+
+#ifndef _RAGDOLLDESCRIPTOR_H_
+#define _RAGDOLLDESCRIPTOR_H_
+
+#include "NIF_IO.h"
+
+
+/*!
+ * 
+ */
+struct RagDollDescriptor {
+  /*! Default Constructor */
+  RagDollDescriptor();
+  /*! Default Destructor */
+  ~RagDollDescriptor();
+  /*!
+   * Unknown.
+   */
+  Float4 pivotA;
+  /*!
+   * Unknown.
+   */
+  Float4 planeA;
+  /*!
+   * Unknown.
+   */
+  Float4 twistA;
+  /*!
+   * Unknown.
+   */
+  Float4 pivotB;
+  /*!
+   * Unknown.
+   */
+  Float4 planeB;
+  /*!
+   * Unknown.
+   */
+  Float4 twistB;
+  /*!
+   * Unknown.
+   */
+  float coneMinAngle;
+  /*!
+   * Unknown.
+   */
+  float planeMinAngle;
+  /*!
+   * Unknown.
+   */
+  float planeMaxAngle;
+  /*!
+   * Unknown.
+   */
+  float twistMinAngle;
+  /*!
+   * Unknown.
+   */
+  float twistMaxAngle;
+  /*!
+   * Unknown.
+   */
+  float maxFriction;
+};
+
+#endif
diff --git a/gen/RotationKeyArray.h b/gen/RotationKeyArray.h
index 22474fb601a00dcb6999280cf77e97008692e6b5..55d94d4d6b6886735428a019095a4be810c0c104 100644
--- a/gen/RotationKeyArray.h
+++ b/gen/RotationKeyArray.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Rotation key array.
  */
diff --git a/gen/ShaderTexDesc.cpp b/gen/ShaderTexDesc.cpp
index e4e27ad95fe2cdbccb16ae2af6659e9c18376781..5dfdb116a56aa4cea2e9d4189100786a28791dc7 100644
--- a/gen/ShaderTexDesc.cpp
+++ b/gen/ShaderTexDesc.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "ShaderTexDesc.h"
+#include "gen/ShaderTexDesc.h"
+#include "gen/TexDesc.h"
 
 //Constructor
 ShaderTexDesc::ShaderTexDesc() : isUsed(false), unknownInt((uint)0) {};
diff --git a/gen/ShortString.cpp b/gen/ShortString.cpp
index 79d345964d9ce9fb44d1b2d8cac0b62019e14a10..c8babec259d2497b05d53ad2f790d658045a20c6 100644
--- a/gen/ShortString.cpp
+++ b/gen/ShortString.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "ShortString.h"
+#include "gen/ShortString.h"
 
 //Constructor
 ShortString::ShortString() : length((byte)0) {};
diff --git a/gen/ShortString.h b/gen/ShortString.h
index 4ea77d9b994283a9d1b839a75ae9afa20258b522..fca724d68e843f09f499e4dc833e94043c1d0d4d 100644
--- a/gen/ShortString.h
+++ b/gen/ShortString.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Another string format, for short strings.  Specific to Bethesda-
  * specific header tags.
diff --git a/gen/SkinData.cpp b/gen/SkinData.cpp
index 0bfeb9bcad0926add03e717b119b4edc421a1704..901acfa10cf0c974ba33696f9d329e84b8cba563 100644
--- a/gen/SkinData.cpp
+++ b/gen/SkinData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "SkinData.h"
+#include "gen/SkinData.h"
+#include "gen/SkinWeight.h"
 
 //Constructor
 SkinData::SkinData() : scale(0.0f), numVertices((ushort)0) {};
diff --git a/gen/SkinPartition.cpp b/gen/SkinPartition.cpp
index 7ac08c81325590c4240f92cae57740314fefb9e6..881b9512c721232d66fb997743798a703427485f 100644
--- a/gen/SkinPartition.cpp
+++ b/gen/SkinPartition.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "SkinPartition.h"
+#include "gen/SkinPartition.h"
 
 //Constructor
 SkinPartition::SkinPartition() : numVertices((ushort)0), numTriangles((ushort)0), numBones((ushort)0), numStrips((ushort)0), numWeightsPerVertex((ushort)0), hasVertexMap(false), hasVertexWeights(false), hasStrips(false), hasBoneIndices(false) {};
diff --git a/gen/SkinPartition.h b/gen/SkinPartition.h
index 0e0ed88daca9c93c213e633bb08bed4606024ca3..c6507379776b656cfde49e2fd4268e30ef217f25 100644
--- a/gen/SkinPartition.h
+++ b/gen/SkinPartition.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Skinning data for a submesh, optimized for hardware skinning. Part of
  * NiSkinPartition.
diff --git a/gen/SkinShape.cpp b/gen/SkinShape.cpp
index f548711c89c98ae53a904f6053f2929b2c6f94e7..29ff9dab15346f95f66b13b151aa70a2d574d0de 100644
--- a/gen/SkinShape.cpp
+++ b/gen/SkinShape.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "SkinShape.h"
-#include "obj/NiTriShape.h"
-#include "obj/NiSkinInstance.h"
+#include "gen/SkinShape.h"
 
 //Constructor
 SkinShape::SkinShape() : shape(NULL), skinInstance(NULL) {};
diff --git a/gen/SkinShape.h b/gen/SkinShape.h
index 2da3de91feffc97ff9e5ef37b7f60fc4b3c2814d..e413576c894ff241198af0107c3dcba18e4fa8b0 100644
--- a/gen/SkinShape.h
+++ b/gen/SkinShape.h
@@ -6,10 +6,8 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 #include "Ref.h"
-
-//Forward Declarations
-class NiTriShape;
-class NiSkinInstance;
+#include "obj/NiTriShape.h"
+#include "obj/NiSkinInstance.h"
 
 /*!
  * Reference to shape and skin instance.
diff --git a/gen/SkinShapeGroup.cpp b/gen/SkinShapeGroup.cpp
index ff7b2b2c0d08b95d9faa0c87f9bd4a6f1e9f5925..8f6b5eb5994835af62bf5f5d5371429c9b4d8326 100644
--- a/gen/SkinShapeGroup.cpp
+++ b/gen/SkinShapeGroup.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "SkinShapeGroup.h"
+#include "gen/SkinShapeGroup.h"
+#include "gen/SkinShape.h"
 
 //Constructor
 SkinShapeGroup::SkinShapeGroup() : numLinkPairs((uint)0) {};
diff --git a/gen/SkinWeight.cpp b/gen/SkinWeight.cpp
index bb35f75dbf7bd4ad10eaa5cefcd561ef981743fa..05f8c8993fcac909c409921c234c82a69b660a3b 100644
--- a/gen/SkinWeight.cpp
+++ b/gen/SkinWeight.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "SkinWeight.h"
+#include "gen/SkinWeight.h"
 
 //Constructor
 SkinWeight::SkinWeight() : index((ushort)0), weight(0.0f) {};
diff --git a/gen/SkinWeight.h b/gen/SkinWeight.h
index 0863dfecbf2798393be85b1a1b9cf696f7c73f1c..65dfdef972ebb61e57cb4be0152ff4b847e2cc29 100644
--- a/gen/SkinWeight.h
+++ b/gen/SkinWeight.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * A weighted vertex.
  */
diff --git a/gen/StringPalette.cpp b/gen/StringPalette.cpp
index 4eeee30ed9746f320c20419f0e000f8c88673d4e..e3ceb24029b9d1ab2224bec9423d736ceae332bf 100644
--- a/gen/StringPalette.cpp
+++ b/gen/StringPalette.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "StringPalette.h"
+#include "gen/StringPalette.h"
 
 //Constructor
 StringPalette::StringPalette() : length((uint)0) {};
diff --git a/gen/StringPalette.h b/gen/StringPalette.h
index 3d81b8bed8cae2b9019c95785501a1b7ca2f3e49..f0dfb79837d622f57b59943007df3305a1411ef8 100644
--- a/gen/StringPalette.h
+++ b/gen/StringPalette.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * A list of \\0 terminated strings.
  */
diff --git a/gen/TBC.cpp b/gen/TBC.cpp
index b11f4c33ee8644219802690b152481d1b5d1b30d..293f36fbda80793c1f23ab1b863fd54ab392a493 100644
--- a/gen/TBC.cpp
+++ b/gen/TBC.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "TBC.h"
+#include "gen/TBC.h"
 
 //Constructor
 TBC::TBC() : t(0.0f), b(0.0f), c(0.0f) {};
diff --git a/gen/TBC.h b/gen/TBC.h
index 9566fb10af99dd0d8450262ad346433797cd5e5b..c6e2f8bd99fb1b953b6e41652001ae050eeee655 100644
--- a/gen/TBC.h
+++ b/gen/TBC.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * Tension, bias, continuity.
  */
diff --git a/gen/TexDesc.cpp b/gen/TexDesc.cpp
index 00dc165d2b1f1c8d64954f4fef28649c89ff8e67..f0d062729830c887f2c9e0c034ec499b134395a7 100644
--- a/gen/TexDesc.cpp
+++ b/gen/TexDesc.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "TexDesc.h"
-#include "obj/NiSourceTexture.h"
+#include "gen/TexDesc.h"
 
 //Constructor
 TexDesc::TexDesc() : source(NULL), clampMode((TexClampMode)WRAP_S_WRAP_T), filterMode((TexFilterMode)FILTER_TRILERP), textureSet((uint)0), ps2L((ushort)0), ps2K((ushort)0xFFB5), unknown1((ushort)0), hasTextureTransform(false), wRotation(0.0f), transformType_((uint)0) {};
diff --git a/gen/TexDesc.h b/gen/TexDesc.h
index 0d924a1794f09efaccdd51728cbbc5399ab6d4e5..5a5f7e27dea47b1da9e4bb6542304b1d1b1ace0d 100644
--- a/gen/TexDesc.h
+++ b/gen/TexDesc.h
@@ -6,9 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 #include "Ref.h"
-
-//Forward Declarations
-class NiSourceTexture;
+#include "obj/NiSourceTexture.h"
 
 /*!
  * Texture description.
diff --git a/gen/TexSource.cpp b/gen/TexSource.cpp
index 10838fe05562afb9a7e00c6b77e985ff2ad1adb6..abed273faef0b37d0cdfd774f5f45508bd04bdb5 100644
--- a/gen/TexSource.cpp
+++ b/gen/TexSource.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "TexSource.h"
-#include "obj/NiObject.h"
-#include "obj/NiPixelData.h"
+#include "gen/TexSource.h"
 
 //Constructor
 TexSource::TexSource() : useExternal((byte)0), unknownLink(NULL), unknownByte((byte)0), pixelData(NULL) {};
diff --git a/gen/TexSource.h b/gen/TexSource.h
index b0c7b23d99c049028a42b65c7d8fcc208d75c2e0..e9c9933ce2b121a065baa9642fb4fcd6c0d91260 100644
--- a/gen/TexSource.h
+++ b/gen/TexSource.h
@@ -6,10 +6,8 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 #include "Ref.h"
-
-//Forward Declarations
-class NiObject;
-class NiPixelData;
+#include "obj/NiObject.h"
+#include "obj/NiPixelData.h"
 
 /*!
  * A texture source.
diff --git a/gen/hkTriangle.cpp b/gen/hkTriangle.cpp
index e6c99c45bdcfed6e0bf333a2d64eeb6e18dbcb8b..3639d4027be77d4995958f4eca5ef0be5b638ad3 100644
--- a/gen/hkTriangle.cpp
+++ b/gen/hkTriangle.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "hkTriangle.h"
+#include "gen/hkTriangle.h"
 
 //Constructor
 hkTriangle::hkTriangle() : unknownShort((ushort)0) {};
diff --git a/gen/hkTriangle.h b/gen/hkTriangle.h
index cd6fb832a97d17c872b3166daff21cc1c44a0f67..940cf9ffe366d6d01b87b006846161c03d502ac5 100644
--- a/gen/hkTriangle.h
+++ b/gen/hkTriangle.h
@@ -6,6 +6,7 @@ All rights reserved.  Please see niflib.h for licence. */
 
 #include "NIF_IO.h"
 
+
 /*!
  * A triangle with extra data used for physics.
  */
diff --git a/gen/obj_defines.h b/gen/obj_defines.h
index 17c0089016e0b017dfd3eabfae19733f00cc3139..a9afab4401080cf49ec1da4d2a51d97e944b8c1f 100644
--- a/gen/obj_defines.h
+++ b/gen/obj_defines.h
@@ -13,250 +13,6 @@ All rights reserved.  Please see niflib.h for licence. */
 
 using namespace std;
 
-#include "gen/Bones.h"
-#include "gen/ByteArray.h"
-#include "gen/Footer.h"
-#include "gen/LODRange.h"
-#include "gen/MatchGroup.h"
-#include "gen/MipMap.h"
-#include "gen/NodeGroup.h"
-#include "gen/QuaternionXYZW.h"
-#include "gen/ShortString.h"
-#include "gen/SkinShape.h"
-#include "gen/SkinShapeGroup.h"
-#include "gen/SkinWeight.h"
-#include "gen/AVObject.h"
-#include "gen/ControllerLink.h"
-#include "gen/Header.h"
-#include "gen/StringPalette.h"
-#include "gen/TBC.h"
-#include "gen/KeyGroup.h"
-#include "gen/RotationKeyArray.h"
-#include "gen/TexDesc.h"
-#include "gen/ShaderTexDesc.h"
-#include "gen/TexSource.h"
-#include "gen/SkinPartition.h"
-#include "gen/BoundingBox.h"
-#include "gen/FurniturePosition.h"
-#include "gen/hkTriangle.h"
-#include "gen/Morph.h"
-#include "gen/Particle.h"
-#include "gen/SkinData.h"
-
-class NiObject;
-class AKeyedData;
-class AParticleModifier;
-class bhkRefObject;
-class bhkSerializable;
-class AbhkConstraint;
-class AbhkRagdollConstraint;
-class bhkShape;
-class AbhkShapeCollection;
-class bhkSphereRepShape;
-class bhkConvexShape;
-class bhkWorldObject;
-class bhkEntity;
-class NiCollisionObject;
-class NiExtraData;
-class NiInterpolator;
-class NiBlendInterpolator;
-class NiBSplineInterpolator;
-class NiObjectNET;
-class NiAVObject;
-class NiDynamicEffect;
-class NiLight;
-class NiProperty;
-class NiPSysModifier;
-class NiPSysEmitter;
-class NiPSysVolumeEmitter;
-class NiTimeController;
-class ABoneLODController;
-class NiSingleInterpolatorController;
-class APSysCtlr;
-class NiTriBasedGeom;
-class NiTriBasedGeomData;
-class APSysData;
-class bhkBlendCollisionObject;
-class bhkBlendController;
-class bhkBoxShape;
-class bhkCapsuleShape;
-class bhkCollisionObject;
-class bhkConvexVerticesShape;
-class bhkHingeConstraint;
-class bhkLimitedHingeConstraint;
-class bhkListShape;
-class bhkMalleableConstraint;
-class bhkMoppBvTreeShape;
-class bhkMultiSphereShape;
-class bhkNiTriStripsShape;
-class bhkPackedNiTriStripsShape;
-class bhkPrismaticConstraint;
-class bhkRagdollConstraint;
-class bhkRigidBody;
-class bhkRigidBodyT;
-class bhkSimpleShapePhantom;
-class bhkSPCollisionObject;
-class bhkSphereShape;
-class bhkStiffSpringConstraint;
-class bhkTransformShape;
-class bhkConvexTransformShape;
-class BSBound;
-class BSFurnitureMarker;
-class BSParentVelocityModifier;
-class BSPSysArrayEmitter;
-class BSXFlags;
-class hkPackedNiTriStripsData;
-class NiAlphaController;
-class NiAlphaProperty;
-class NiAmbientLight;
-class NiAutoNormalParticlesData;
-class NiBinaryExtraData;
-class NiBlendBoolInterpolator;
-class NiBlendFloatInterpolator;
-class NiBlendPoint3Interpolator;
-class NiBlendTransformInterpolator;
-class NiBoneLODController;
-class NiBoolData;
-class NiBooleanExtraData;
-class NiBoolInterpolator;
-class NiBoolTimelineInterpolator;
-class NiBSBoneLODController;
-class NiBSplineBasisData;
-class NiBSplineCompFloatInterpolator;
-class NiBSplineCompPoint3Interpolator;
-class NiBSplineCompTransformInterpolator;
-class NiBSplineData;
-class NiCamera;
-class NiCollisionData;
-class NiColorData;
-class NiColorExtraData;
-class NiControllerManager;
-class NiControllerSequence;
-class NiDefaultAVObjectPalette;
-class NiDirectionalLight;
-class NiDitherProperty;
-class NiFlipController;
-class NiFloatData;
-class NiFloatExtraData;
-class NiFloatExtraDataController;
-class NiFloatInterpolator;
-class NiFloatsExtraData;
-class NiFogProperty;
-class NiGeomMorpherController;
-class NiGravity;
-class NiIntegerExtraData;
-class NiIntegersExtraData;
-class NiKeyframeController;
-class BSKeyframeController;
-class NiKeyframeData;
-class NiLightColorController;
-class NiLightDimmerController;
-class NiLookAtController;
-class NiLookAtInterpolator;
-class NiMaterialColorController;
-class NiMaterialProperty;
-class NiMeshPSysData;
-class NiMorphData;
-class NiMultiTargetTransformController;
-class NiNode;
-class AvoidNode;
-class FxWidget;
-class FxButton;
-class FxRadioButton;
-class NiBillboardNode;
-class NiBSAnimationNode;
-class NiBSParticleNode;
-class NiLODNode;
-class NiPalette;
-class NiParticleBomb;
-class NiParticleColorModifier;
-class NiParticleGrowFade;
-class NiParticleMeshModifier;
-class NiParticleRotation;
-class NiParticles;
-class NiAutoNormalParticles;
-class NiParticleMeshes;
-class NiParticlesData;
-class NiParticleMeshesData;
-class NiParticleSystem;
-class NiMeshParticleSystem;
-class NiParticleSystemController;
-class NiBSPArrayController;
-class NiPathController;
-class NiPathInterpolator;
-class NiPixelData;
-class NiPlanarCollider;
-class NiPoint3Interpolator;
-class NiPointLight;
-class NiPosData;
-class NiPSysAgeDeathModifier;
-class NiPSysBombModifier;
-class NiPSysBoundUpdateModifier;
-class NiPSysBoxEmitter;
-class NiPSysColliderManager;
-class NiPSysColorModifier;
-class NiPSysCylinderEmitter;
-class NiPSysData;
-class NiPSysDragModifier;
-class NiPSysEmitterCtlr;
-class NiPSysEmitterCtlrData;
-class NiPSysEmitterDeclinationCtlr;
-class NiPSysEmitterDeclinationVarCtlr;
-class NiPSysEmitterInitialRadiusCtlr;
-class NiPSysEmitterLifeSpanCtlr;
-class NiPSysEmitterSpeedCtlr;
-class NiPSysGravityModifier;
-class NiPSysGravityStrengthCtlr;
-class NiPSysGrowFadeModifier;
-class NiPSysMeshEmitter;
-class NiPSysMeshUpdateModifier;
-class NiPSysModifierActiveCtlr;
-class NiPSysPlanarCollider;
-class NiPSysPositionModifier;
-class NiPSysResetOnLoopCtlr;
-class NiPSysRotationModifier;
-class NiPSysSpawnModifier;
-class NiPSysSphereEmitter;
-class NiPSysUpdateCtlr;
-class NiRangeLODData;
-class NiRotatingParticles;
-class NiRotatingParticlesData;
-class NiScreenLODData;
-class NiSequenceStreamHelper;
-class NiShadeProperty;
-class NiSkinData;
-class NiSkinInstance;
-class NiSkinPartition;
-class NiSourceTexture;
-class NiSpecularProperty;
-class NiSphericalCollider;
-class NiSpotLight;
-class NiStencilProperty;
-class NiStringExtraData;
-class NiStringPalette;
-class NiStringsExtraData;
-class NiTextKeyExtraData;
-class NiTextureEffect;
-class NiTextureTransformController;
-class NiTexturingProperty;
-class NiTransformController;
-class NiTransformData;
-class NiTransformInterpolator;
-class NiTriShape;
-class NiTriShapeData;
-class NiTriStrips;
-class NiTriStripsData;
-class NiUVController;
-class NiUVData;
-class NiVectorExtraData;
-class NiVertexColorProperty;
-class NiVertWeightsExtraData;
-class NiVisController;
-class NiVisData;
-class NiWireframeProperty;
-class NiZBufferProperty;
-class RootCollisionNode;
-
 #define NI_OBJECT_MEMBERS \
 
 #define NI_OBJECT_INCLUDE ".h" \
@@ -2273,31 +2029,57 @@ return out.str(); \
 AbhkConstraint::FixLinks( objects, link_stack, version ); \
 
 #define BHK_LIMITED_HINGE_CONSTRAINT_MEMBERS \
-uint unknownInt; \
+LimitedHingeDescriptor limitedHinge; \
 
-#define BHK_LIMITED_HINGE_CONSTRAINT_INCLUDE "AbhkRagdollConstraint.h" \
+#define BHK_LIMITED_HINGE_CONSTRAINT_INCLUDE "AbhkConstraint.h" \
 
-#define BHK_LIMITED_HINGE_CONSTRAINT_PARENT AbhkRagdollConstraint \
+#define BHK_LIMITED_HINGE_CONSTRAINT_PARENT AbhkConstraint \
 
 #define BHK_LIMITED_HINGE_CONSTRAINT_CONSTRUCT \
- : unknownInt((uint)0) \
 
 #define BHK_LIMITED_HINGE_CONSTRAINT_READ \
-AbhkRagdollConstraint::Read( in, link_stack, version ); \
-NifStream( unknownInt, in, version ); \
+AbhkConstraint::Read( in, link_stack, version ); \
+NifStream( limitedHinge.pivotA, in, version ); \
+NifStream( limitedHinge.axleA_, in, version ); \
+NifStream( limitedHinge.perp2axleina1, in, version ); \
+NifStream( limitedHinge.perp2axleina2, in, version ); \
+NifStream( limitedHinge.pivotB, in, version ); \
+NifStream( limitedHinge.axleB, in, version ); \
+NifStream( limitedHinge.unknownVector, in, version ); \
+NifStream( limitedHinge.minAngle, in, version ); \
+NifStream( limitedHinge.maxAngle, in, version ); \
+NifStream( limitedHinge.maxFriction, in, version ); \
 
 #define BHK_LIMITED_HINGE_CONSTRAINT_WRITE \
-AbhkRagdollConstraint::Write( out, link_map, version ); \
-NifStream( unknownInt, out, version ); \
+AbhkConstraint::Write( out, link_map, version ); \
+NifStream( limitedHinge.pivotA, out, version ); \
+NifStream( limitedHinge.axleA_, out, version ); \
+NifStream( limitedHinge.perp2axleina1, out, version ); \
+NifStream( limitedHinge.perp2axleina2, out, version ); \
+NifStream( limitedHinge.pivotB, out, version ); \
+NifStream( limitedHinge.axleB, out, version ); \
+NifStream( limitedHinge.unknownVector, out, version ); \
+NifStream( limitedHinge.minAngle, out, version ); \
+NifStream( limitedHinge.maxAngle, out, version ); \
+NifStream( limitedHinge.maxFriction, out, version ); \
 
 #define BHK_LIMITED_HINGE_CONSTRAINT_STRING \
 stringstream out; \
-out << AbhkRagdollConstraint::asString(); \
-out << "Unknown Int:  " << unknownInt << endl; \
+out << AbhkConstraint::asString(); \
+out << "Pivot A:  " << limitedHinge.pivotA << endl; \
+out << "Axle A ?:  " << limitedHinge.axleA_ << endl; \
+out << "Perp2AxleInA1:  " << limitedHinge.perp2axleina1 << endl; \
+out << "Perp2AxleInA2:  " << limitedHinge.perp2axleina2 << endl; \
+out << "Pivot B:  " << limitedHinge.pivotB << endl; \
+out << "Axle B:  " << limitedHinge.axleB << endl; \
+out << "Unknown Vector:  " << limitedHinge.unknownVector << endl; \
+out << "Min Angle:  " << limitedHinge.minAngle << endl; \
+out << "Max Angle:  " << limitedHinge.maxAngle << endl; \
+out << "Max Friction:  " << limitedHinge.maxFriction << endl; \
 return out.str(); \
 
 #define BHK_LIMITED_HINGE_CONSTRAINT_FIXLINKS \
-AbhkRagdollConstraint::FixLinks( objects, link_stack, version ); \
+AbhkConstraint::FixLinks( objects, link_stack, version ); \
 
 #define BHK_LIST_SHAPE_MEMBERS \
 uint numSubShapes; \
@@ -2383,17 +2165,17 @@ uint unknownInt2; \
 Ref<NiObject > unknownLink1; \
 Ref<NiObject > unknownLink2; \
 uint unknownInt3; \
-float unknownFloats1[3]; \
-float unknownFloats[7][4]; \
-float unknownFloat1; \
-float unknownFloat2; \
+RagDollDescriptor ragdoll; \
+LimitedHingeDescriptor limitedHinge; \
+float tau; \
+float damping; \
 
 #define BHK_MALLEABLE_CONSTRAINT_INCLUDE "AbhkConstraint.h" \
 
 #define BHK_MALLEABLE_CONSTRAINT_PARENT AbhkConstraint \
 
 #define BHK_MALLEABLE_CONSTRAINT_CONSTRUCT \
- : type((uint)0), unknownInt2((uint)0), unknownLink1(NULL), unknownLink2(NULL), unknownInt3((uint)0), unknownFloat1(0.0f), unknownFloat2(0.0f) \
+ : type((uint)0), unknownInt2((uint)0), unknownLink1(NULL), unknownLink2(NULL), unknownInt3((uint)0), tau(0.0f), damping(0.0f) \
 
 #define BHK_MALLEABLE_CONSTRAINT_READ \
 uint block_num; \
@@ -2405,18 +2187,34 @@ link_stack.push_back( block_num ); \
 NifStream( block_num, in, version ); \
 link_stack.push_back( block_num ); \
 NifStream( unknownInt3, in, version ); \
-for (uint i0 = 0; i0 < 3; i0++) { \
-  NifStream( unknownFloats1[i0], in, version ); \
+if ( (type == 7) ) { \
+  NifStream( ragdoll.pivotA, in, version ); \
+  NifStream( ragdoll.planeA, in, version ); \
+  NifStream( ragdoll.twistA, in, version ); \
+  NifStream( ragdoll.pivotB, in, version ); \
+  NifStream( ragdoll.planeB, in, version ); \
+  NifStream( ragdoll.twistB, in, version ); \
+  NifStream( ragdoll.coneMinAngle, in, version ); \
+  NifStream( ragdoll.planeMinAngle, in, version ); \
+  NifStream( ragdoll.planeMaxAngle, in, version ); \
+  NifStream( ragdoll.twistMinAngle, in, version ); \
+  NifStream( ragdoll.twistMaxAngle, in, version ); \
+  NifStream( ragdoll.maxFriction, in, version ); \
 }; \
-for (uint i0 = 0; i0 < 7; i0++) { \
-  for (uint i1 = 0; i1 < 4; i1++) { \
-    NifStream( unknownFloats[i0][i1], in, version ); \
-  }; \
-}; \
-NifStream( unknownFloat1, in, version ); \
 if ( (type == 2) ) { \
-  NifStream( unknownFloat2, in, version ); \
-}; \
+  NifStream( limitedHinge.pivotA, in, version ); \
+  NifStream( limitedHinge.axleA_, in, version ); \
+  NifStream( limitedHinge.perp2axleina1, in, version ); \
+  NifStream( limitedHinge.perp2axleina2, in, version ); \
+  NifStream( limitedHinge.pivotB, in, version ); \
+  NifStream( limitedHinge.axleB, in, version ); \
+  NifStream( limitedHinge.unknownVector, in, version ); \
+  NifStream( limitedHinge.minAngle, in, version ); \
+  NifStream( limitedHinge.maxAngle, in, version ); \
+  NifStream( limitedHinge.maxFriction, in, version ); \
+}; \
+NifStream( tau, in, version ); \
+NifStream( damping, in, version ); \
 
 #define BHK_MALLEABLE_CONSTRAINT_WRITE \
 AbhkConstraint::Write( out, link_map, version ); \
@@ -2425,18 +2223,34 @@ NifStream( unknownInt2, out, version ); \
 NifStream( link_map[StaticCast<NiObject>(unknownLink1)], out, version ); \
 NifStream( link_map[StaticCast<NiObject>(unknownLink2)], out, version ); \
 NifStream( unknownInt3, out, version ); \
-for (uint i0 = 0; i0 < 3; i0++) { \
-  NifStream( unknownFloats1[i0], out, version ); \
+if ( (type == 7) ) { \
+  NifStream( ragdoll.pivotA, out, version ); \
+  NifStream( ragdoll.planeA, out, version ); \
+  NifStream( ragdoll.twistA, out, version ); \
+  NifStream( ragdoll.pivotB, out, version ); \
+  NifStream( ragdoll.planeB, out, version ); \
+  NifStream( ragdoll.twistB, out, version ); \
+  NifStream( ragdoll.coneMinAngle, out, version ); \
+  NifStream( ragdoll.planeMinAngle, out, version ); \
+  NifStream( ragdoll.planeMaxAngle, out, version ); \
+  NifStream( ragdoll.twistMinAngle, out, version ); \
+  NifStream( ragdoll.twistMaxAngle, out, version ); \
+  NifStream( ragdoll.maxFriction, out, version ); \
 }; \
-for (uint i0 = 0; i0 < 7; i0++) { \
-  for (uint i1 = 0; i1 < 4; i1++) { \
-    NifStream( unknownFloats[i0][i1], out, version ); \
-  }; \
-}; \
-NifStream( unknownFloat1, out, version ); \
 if ( (type == 2) ) { \
-  NifStream( unknownFloat2, out, version ); \
-}; \
+  NifStream( limitedHinge.pivotA, out, version ); \
+  NifStream( limitedHinge.axleA_, out, version ); \
+  NifStream( limitedHinge.perp2axleina1, out, version ); \
+  NifStream( limitedHinge.perp2axleina2, out, version ); \
+  NifStream( limitedHinge.pivotB, out, version ); \
+  NifStream( limitedHinge.axleB, out, version ); \
+  NifStream( limitedHinge.unknownVector, out, version ); \
+  NifStream( limitedHinge.minAngle, out, version ); \
+  NifStream( limitedHinge.maxAngle, out, version ); \
+  NifStream( limitedHinge.maxFriction, out, version ); \
+}; \
+NifStream( tau, out, version ); \
+NifStream( damping, out, version ); \
 
 #define BHK_MALLEABLE_CONSTRAINT_STRING \
 stringstream out; \
@@ -2446,18 +2260,34 @@ out << "Unknown Int 2:  " << unknownInt2 << endl; \
 out << "Unknown Link 1:  " << "NiObject" << endl; \
 out << "Unknown Link 2:  " << "NiObject" << endl; \
 out << "Unknown Int 3:  " << unknownInt3 << endl; \
-for (uint i0 = 0; i0 < 3; i0++) { \
-  out << "  Unknown Floats 1[" << i0 << "]:  " << unknownFloats1[i0] << endl; \
-}; \
-for (uint i0 = 0; i0 < 7; i0++) { \
-  for (uint i1 = 0; i1 < 4; i1++) { \
-    out << "    Unknown Floats[" << i0 << "][" << i1 << "]:  " << unknownFloats[i0][i1] << endl; \
-  }; \
+if ( (type == 7) ) { \
+  out << "  Pivot A:  " << ragdoll.pivotA << endl; \
+  out << "  Plane A:  " << ragdoll.planeA << endl; \
+  out << "  Twist A:  " << ragdoll.twistA << endl; \
+  out << "  Pivot B:  " << ragdoll.pivotB << endl; \
+  out << "  Plane B:  " << ragdoll.planeB << endl; \
+  out << "  Twist B:  " << ragdoll.twistB << endl; \
+  out << "  Cone Min Angle:  " << ragdoll.coneMinAngle << endl; \
+  out << "  Plane Min Angle:  " << ragdoll.planeMinAngle << endl; \
+  out << "  Plane Max Angle:  " << ragdoll.planeMaxAngle << endl; \
+  out << "  Twist Min Angle:  " << ragdoll.twistMinAngle << endl; \
+  out << "  Twist Max Angle:  " << ragdoll.twistMaxAngle << endl; \
+  out << "  Max Friction:  " << ragdoll.maxFriction << endl; \
 }; \
-out << "Unknown Float 1:  " << unknownFloat1 << endl; \
 if ( (type == 2) ) { \
-  out << "  Unknown Float 2:  " << unknownFloat2 << endl; \
+  out << "  Pivot A:  " << limitedHinge.pivotA << endl; \
+  out << "  Axle A ?:  " << limitedHinge.axleA_ << endl; \
+  out << "  Perp2AxleInA1:  " << limitedHinge.perp2axleina1 << endl; \
+  out << "  Perp2AxleInA2:  " << limitedHinge.perp2axleina2 << endl; \
+  out << "  Pivot B:  " << limitedHinge.pivotB << endl; \
+  out << "  Axle B:  " << limitedHinge.axleB << endl; \
+  out << "  Unknown Vector:  " << limitedHinge.unknownVector << endl; \
+  out << "  Min Angle:  " << limitedHinge.minAngle << endl; \
+  out << "  Max Angle:  " << limitedHinge.maxAngle << endl; \
+  out << "  Max Friction:  " << limitedHinge.maxFriction << endl; \
 }; \
+out << "Tau:  " << tau << endl; \
+out << "Damping:  " << damping << endl; \
 return out.str(); \
 
 #define BHK_MALLEABLE_CONSTRAINT_FIXLINKS \
@@ -2783,7 +2613,7 @@ else \
 link_stack.pop_front(); \
 
 #define BHK_PRISMATIC_CONSTRAINT_MEMBERS \
-float unknownFloats[8][4]; \
+Float4 unknownVectors[8]; \
 float unknownFloats2[3]; \
 
 #define BHK_PRISMATIC_CONSTRAINT_INCLUDE "AbhkConstraint.h" \
@@ -2795,9 +2625,7 @@ float unknownFloats2[3]; \
 #define BHK_PRISMATIC_CONSTRAINT_READ \
 AbhkConstraint::Read( in, link_stack, version ); \
 for (uint i0 = 0; i0 < 8; i0++) { \
-  for (uint i1 = 0; i1 < 4; i1++) { \
-    NifStream( unknownFloats[i0][i1], in, version ); \
-  }; \
+  NifStream( unknownVectors[i0], in, version ); \
 }; \
 for (uint i0 = 0; i0 < 3; i0++) { \
   NifStream( unknownFloats2[i0], in, version ); \
@@ -2806,9 +2634,7 @@ for (uint i0 = 0; i0 < 3; i0++) { \
 #define BHK_PRISMATIC_CONSTRAINT_WRITE \
 AbhkConstraint::Write( out, link_map, version ); \
 for (uint i0 = 0; i0 < 8; i0++) { \
-  for (uint i1 = 0; i1 < 4; i1++) { \
-    NifStream( unknownFloats[i0][i1], out, version ); \
-  }; \
+  NifStream( unknownVectors[i0], out, version ); \
 }; \
 for (uint i0 = 0; i0 < 3; i0++) { \
   NifStream( unknownFloats2[i0], out, version ); \
@@ -2818,9 +2644,7 @@ for (uint i0 = 0; i0 < 3; i0++) { \
 stringstream out; \
 out << AbhkConstraint::asString(); \
 for (uint i0 = 0; i0 < 8; i0++) { \
-  for (uint i1 = 0; i1 < 4; i1++) { \
-    out << "    Unknown Floats[" << i0 << "][" << i1 << "]:  " << unknownFloats[i0][i1] << endl; \
-  }; \
+  out << "  Unknown Vectors[" << i0 << "]:  " << unknownVectors[i0] << endl; \
 }; \
 for (uint i0 = 0; i0 < 3; i0++) { \
   out << "  Unknown Floats 2[" << i0 << "]:  " << unknownFloats2[i0] << endl; \
diff --git a/obj/ABoneLODController.cpp b/obj/ABoneLODController.cpp
index eff66caf608b1db551d74033d731d5a92206f4ac..306a9bdf313c9bfd4de4bcc0565c297f56943eda 100644
--- a/obj/ABoneLODController.cpp
+++ b/obj/ABoneLODController.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "ABoneLODController.h"
-#include "NiNode.h"
+#include "obj/ABoneLODController.h"
+#include "gen/NodeGroup.h"
 
 //Definition of TYPE constant
 const Type ABoneLODController::TYPE("ABoneLODController", &A_BONE_L_O_D_CONTROLLER_PARENT::TYPE );
diff --git a/obj/ABoneLODController.h b/obj/ABoneLODController.h
index 54bf369b7e6d05c9c8d322d7fb12eb7dcf114c3f..7db43a3c514fdfa72d3f5404544e7d57537c095f 100644
--- a/obj/ABoneLODController.h
+++ b/obj/ABoneLODController.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _ABONELODCONTROLLER_H_
 #define _ABONELODCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "gen/NodeGroup.h"
+
 #include "gen/obj_defines.h"
-#include A_BONE_L_O_D_CONTROLLER_INCLUDE
 
 /*
  * ABoneLODController
diff --git a/obj/AKeyedData.cpp b/obj/AKeyedData.cpp
index d424b2a1c45c268de06037beac9d20d8047da166..2e4df7e934ad3dfdfa46d7730b2076e41f9b5d56 100644
--- a/obj/AKeyedData.cpp
+++ b/obj/AKeyedData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "AKeyedData.h"
+#include "obj/AKeyedData.h"
 
 //Definition of TYPE constant
 const Type AKeyedData::TYPE("AKeyedData", &A_KEYED_DATA_PARENT::TYPE );
diff --git a/obj/AKeyedData.h b/obj/AKeyedData.h
index 200ef280135b2901aa1b78808d2dcb4bd394dbaf..132b66d2ab0a9ded674f7c38a8c0e726430ce847 100644
--- a/obj/AKeyedData.h
+++ b/obj/AKeyedData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _AKEYEDDATA_H_
 #define _AKEYEDDATA_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include A_KEYED_DATA_INCLUDE
 
 /*
  * AKeyedData
diff --git a/obj/APSysCtlr.cpp b/obj/APSysCtlr.cpp
index c7f87dcc0bc4c2b58940ecfdec9f5ebd02e4ae00..22ce461f13bdc7e6280367c62bb53d3d50085564 100644
--- a/obj/APSysCtlr.cpp
+++ b/obj/APSysCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "APSysCtlr.h"
+#include "obj/APSysCtlr.h"
 
 //Definition of TYPE constant
 const Type APSysCtlr::TYPE("APSysCtlr", &A_P_SYS_CTLR_PARENT::TYPE );
diff --git a/obj/APSysCtlr.h b/obj/APSysCtlr.h
index e690f573bf42ddcee77d87b55f7d5f7ac4939cdc..fe8c8638c9cdf2bccb61ac75f4c104095f6f8f89 100644
--- a/obj/APSysCtlr.h
+++ b/obj/APSysCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _APSYSCTLR_H_
 #define _APSYSCTLR_H_
 
+#include "NiSingleInterpolatorController.h"
+
 #include "gen/obj_defines.h"
-#include A_P_SYS_CTLR_INCLUDE
 
 /*
  * APSysCtlr
diff --git a/obj/APSysData.cpp b/obj/APSysData.cpp
index e884dceb9d50babeb924b7f6fa7c0adfa83408db..46bccbce06973ea513ca874a8f4ffc773f099bc5 100644
--- a/obj/APSysData.cpp
+++ b/obj/APSysData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "APSysData.h"
+#include "obj/APSysData.h"
 
 //Definition of TYPE constant
 const Type APSysData::TYPE("APSysData", &A_P_SYS_DATA_PARENT::TYPE );
diff --git a/obj/APSysData.h b/obj/APSysData.h
index 865ff47fd8e0c6b901b25896e2a8d0d0d669ff1c..4d1fec37163c7795635a83f7c7dcb0b92b2008d5 100644
--- a/obj/APSysData.h
+++ b/obj/APSysData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _APSYSDATA_H_
 #define _APSYSDATA_H_
 
+#include "NiTriBasedGeomData.h"
+
 #include "gen/obj_defines.h"
-#include A_P_SYS_DATA_INCLUDE
 
 /*
  * APSysData
diff --git a/obj/AParticleModifier.cpp b/obj/AParticleModifier.cpp
index 0a43663f954814ddf30995610fc1e8b26aad1d05..dddacb92f185905af50a9b39d48b4f40833adf2b 100644
--- a/obj/AParticleModifier.cpp
+++ b/obj/AParticleModifier.cpp
@@ -1,9 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "AParticleModifier.h"
-#include "AParticleModifier.h"
-#include "NiParticleSystemController.h"
+#include "obj/AParticleModifier.h"
+#include "obj/NiParticleSystemController.h"
 
 //Definition of TYPE constant
 const Type AParticleModifier::TYPE("AParticleModifier", &A_PARTICLE_MODIFIER_PARENT::TYPE );
diff --git a/obj/AParticleModifier.h b/obj/AParticleModifier.h
index 154b25b7fd48a7d0753094d8de78c0f44589ecae..696089425e301d5584202a43305b41388a87d13b 100644
--- a/obj/AParticleModifier.h
+++ b/obj/AParticleModifier.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _APARTICLEMODIFIER_H_
 #define _APARTICLEMODIFIER_H_
 
+#include "NiObject.h"
+class NiParticleSystemController;
+
 #include "gen/obj_defines.h"
-#include A_PARTICLE_MODIFIER_INCLUDE
 
 /*
  * AParticleModifier
diff --git a/obj/AbhkConstraint.cpp b/obj/AbhkConstraint.cpp
index 2aafdbadc07bb9a10aba48b0f0d0160ff7dad514..37f40b9d90c95116368a4d04dc4a7ea94597ed8e 100644
--- a/obj/AbhkConstraint.cpp
+++ b/obj/AbhkConstraint.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "AbhkConstraint.h"
-#include "bhkShape.h"
+#include "obj/AbhkConstraint.h"
+#include "obj/bhkShape.h"
 
 //Definition of TYPE constant
 const Type AbhkConstraint::TYPE("AbhkConstraint", &ABHK_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/AbhkConstraint.h b/obj/AbhkConstraint.h
index e68c65c8d08e657d06fad8c5aa13fc08dfedb5ea..987bade912591d17385ec6b690082d9cd4c8849b 100644
--- a/obj/AbhkConstraint.h
+++ b/obj/AbhkConstraint.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _ABHKCONSTRAINT_H_
 #define _ABHKCONSTRAINT_H_
 
+#include "bhkSerializable.h"
+class bhkShape;
+
 #include "gen/obj_defines.h"
-#include ABHK_CONSTRAINT_INCLUDE
 
 /*
  * AbhkConstraint
diff --git a/obj/AbhkRagdollConstraint.cpp b/obj/AbhkRagdollConstraint.cpp
index 27361421e9f1715861612396559df03531b91cfc..629400d8f8bace504ae1460dda8164aa2f9fa58d 100644
--- a/obj/AbhkRagdollConstraint.cpp
+++ b/obj/AbhkRagdollConstraint.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "AbhkRagdollConstraint.h"
+#include "obj/AbhkRagdollConstraint.h"
 
 //Definition of TYPE constant
 const Type AbhkRagdollConstraint::TYPE("AbhkRagdollConstraint", &ABHK_RAGDOLL_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/AbhkRagdollConstraint.h b/obj/AbhkRagdollConstraint.h
index 44d9d6813f8b12b9aa7882a0b0fb35ca97afece6..123d023fa3cb2dfa3158ce3df781075a9bf5911b 100644
--- a/obj/AbhkRagdollConstraint.h
+++ b/obj/AbhkRagdollConstraint.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _ABHKRAGDOLLCONSTRAINT_H_
 #define _ABHKRAGDOLLCONSTRAINT_H_
 
+#include "AbhkConstraint.h"
+
 #include "gen/obj_defines.h"
-#include ABHK_RAGDOLL_CONSTRAINT_INCLUDE
 
 /*
  * AbhkRagdollConstraint
diff --git a/obj/AbhkShapeCollection.cpp b/obj/AbhkShapeCollection.cpp
index b29bd86cceba526dc61cc5651bcf69c9f5e7a257..4015a9e2f6a88173f41e8a99a71ceb4757e2bfd9 100644
--- a/obj/AbhkShapeCollection.cpp
+++ b/obj/AbhkShapeCollection.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "AbhkShapeCollection.h"
+#include "obj/AbhkShapeCollection.h"
 
 //Definition of TYPE constant
 const Type AbhkShapeCollection::TYPE("AbhkShapeCollection", &ABHK_SHAPE_COLLECTION_PARENT::TYPE );
diff --git a/obj/AbhkShapeCollection.h b/obj/AbhkShapeCollection.h
index ee382c3ef6ba5205179f7d7bb72677315ee526a8..e0a5255e5a9cdbc8abb14764b60aea6b7c708523 100644
--- a/obj/AbhkShapeCollection.h
+++ b/obj/AbhkShapeCollection.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _ABHKSHAPECOLLECTION_H_
 #define _ABHKSHAPECOLLECTION_H_
 
+#include "bhkShape.h"
+
 #include "gen/obj_defines.h"
-#include ABHK_SHAPE_COLLECTION_INCLUDE
 
 /*
  * AbhkShapeCollection
diff --git a/obj/AvoidNode.cpp b/obj/AvoidNode.cpp
index c00db870d1f68860773363bfdf994e7ba385adc0..99324a1358e8839b2cadd77be6c839cb0083b415 100644
--- a/obj/AvoidNode.cpp
+++ b/obj/AvoidNode.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "AvoidNode.h"
+#include "obj/AvoidNode.h"
 
 //Definition of TYPE constant
 const Type AvoidNode::TYPE("AvoidNode", &AVOID_NODE_PARENT::TYPE );
diff --git a/obj/AvoidNode.h b/obj/AvoidNode.h
index 0ce41923255fe89195fa0c803cd151077ff6021a..6b9a4fdbb2cfa2ccf65dbafa2627c0d66f4351f5 100644
--- a/obj/AvoidNode.h
+++ b/obj/AvoidNode.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _AVOIDNODE_H_
 #define _AVOIDNODE_H_
 
+#include "NiNode.h"
+
 #include "gen/obj_defines.h"
-#include AVOID_NODE_INCLUDE
 
 /*
  * AvoidNode
diff --git a/obj/BSBound.cpp b/obj/BSBound.cpp
index 2ba3486ee8fde5917d6a6c11d3f1ba5e5e16b772..0eb753d8d221c65698d8196cfa782d3a3924b41a 100644
--- a/obj/BSBound.cpp
+++ b/obj/BSBound.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "BSBound.h"
+#include "obj/BSBound.h"
 
 //Definition of TYPE constant
 const Type BSBound::TYPE("BSBound", &B_S_BOUND_PARENT::TYPE );
diff --git a/obj/BSBound.h b/obj/BSBound.h
index 97df9911656a4638fdff47a5182cc6efc59f4fac..8827742b6bfed485f84e2a01eff3a9804b096d3c 100644
--- a/obj/BSBound.h
+++ b/obj/BSBound.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BSBOUND_H_
 #define _BSBOUND_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include B_S_BOUND_INCLUDE
 
 /*
  * BSBound
diff --git a/obj/BSFurnitureMarker.cpp b/obj/BSFurnitureMarker.cpp
index 3b97c0c90de83c9a1380e7617afd1cce1006aab4..bcdb10a7115b960cfeebec0ff21292df86f3bbb0 100644
--- a/obj/BSFurnitureMarker.cpp
+++ b/obj/BSFurnitureMarker.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "BSFurnitureMarker.h"
+#include "obj/BSFurnitureMarker.h"
+#include "gen/FurniturePosition.h"
 
 //Definition of TYPE constant
 const Type BSFurnitureMarker::TYPE("BSFurnitureMarker", &B_S_FURNITURE_MARKER_PARENT::TYPE );
diff --git a/obj/BSFurnitureMarker.h b/obj/BSFurnitureMarker.h
index 70f977e049efd3ddbf35cead9f10cd9ada12dd4a..c5faf32dffb46898b37b4faf63870ce70b048dd7 100644
--- a/obj/BSFurnitureMarker.h
+++ b/obj/BSFurnitureMarker.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BSFURNITUREMARKER_H_
 #define _BSFURNITUREMARKER_H_
 
+#include "NiExtraData.h"
+#include "gen/FurniturePosition.h"
+
 #include "gen/obj_defines.h"
-#include B_S_FURNITURE_MARKER_INCLUDE
 
 /*
  * BSFurnitureMarker
diff --git a/obj/BSKeyframeController.cpp b/obj/BSKeyframeController.cpp
index d50f3af20070a75bcaaadcbc27e195087cc9fb9f..aa3fbdbf7cf8c3252467c421b92286b592335cf6 100644
--- a/obj/BSKeyframeController.cpp
+++ b/obj/BSKeyframeController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "BSKeyframeController.h"
-#include "NiKeyframeData.h"
+#include "obj/BSKeyframeController.h"
 
 //Definition of TYPE constant
 const Type BSKeyframeController::TYPE("BSKeyframeController", &B_S_KEYFRAME_CONTROLLER_PARENT::TYPE );
diff --git a/obj/BSKeyframeController.h b/obj/BSKeyframeController.h
index ff1148cdf72047bb9d54800f670e863501f13d70..ed1db9403ed8213e32546b89fce3af645a44590e 100644
--- a/obj/BSKeyframeController.h
+++ b/obj/BSKeyframeController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BSKEYFRAMECONTROLLER_H_
 #define _BSKEYFRAMECONTROLLER_H_
 
+#include "NiKeyframeController.h"
+#include "Ref.h"
+#include "obj/NiKeyframeData.h"
+
 #include "gen/obj_defines.h"
-#include B_S_KEYFRAME_CONTROLLER_INCLUDE
 
 /*
  * BSKeyframeController
diff --git a/obj/BSPSysArrayEmitter.cpp b/obj/BSPSysArrayEmitter.cpp
index 9292fecbf97976d5f281ce508da2d314a5145c93..cd4bf42051e5fe7399deb16325eb190c981848d3 100644
--- a/obj/BSPSysArrayEmitter.cpp
+++ b/obj/BSPSysArrayEmitter.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "BSPSysArrayEmitter.h"
+#include "obj/BSPSysArrayEmitter.h"
 
 //Definition of TYPE constant
 const Type BSPSysArrayEmitter::TYPE("BSPSysArrayEmitter", &B_S_P_SYS_ARRAY_EMITTER_PARENT::TYPE );
diff --git a/obj/BSPSysArrayEmitter.h b/obj/BSPSysArrayEmitter.h
index 540534e20c874b8ee9b8317002bef9b59f426f15..05b6433f4adf3a01c467134413545ac463821777 100644
--- a/obj/BSPSysArrayEmitter.h
+++ b/obj/BSPSysArrayEmitter.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BSPSYSARRAYEMITTER_H_
 #define _BSPSYSARRAYEMITTER_H_
 
+#include "NiPSysVolumeEmitter.h"
+
 #include "gen/obj_defines.h"
-#include B_S_P_SYS_ARRAY_EMITTER_INCLUDE
 
 /*
  * BSPSysArrayEmitter
diff --git a/obj/BSParentVelocityModifier.cpp b/obj/BSParentVelocityModifier.cpp
index 4eb2aa8681ee7e46301f3f3a4cd352a617a003e1..e86157ef4a21a9efffef6145a503dce5011f229d 100644
--- a/obj/BSParentVelocityModifier.cpp
+++ b/obj/BSParentVelocityModifier.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "BSParentVelocityModifier.h"
+#include "obj/BSParentVelocityModifier.h"
 
 //Definition of TYPE constant
 const Type BSParentVelocityModifier::TYPE("BSParentVelocityModifier", &B_S_PARENT_VELOCITY_MODIFIER_PARENT::TYPE );
diff --git a/obj/BSParentVelocityModifier.h b/obj/BSParentVelocityModifier.h
index 38d659ea08da7fa0257dc77b9c60e132176664e4..fff713e24ad744873290dc956346d3728f9c0e24 100644
--- a/obj/BSParentVelocityModifier.h
+++ b/obj/BSParentVelocityModifier.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BSPARENTVELOCITYMODIFIER_H_
 #define _BSPARENTVELOCITYMODIFIER_H_
 
+#include "NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include B_S_PARENT_VELOCITY_MODIFIER_INCLUDE
 
 /*
  * BSParentVelocityModifier
diff --git a/obj/BSXFlags.cpp b/obj/BSXFlags.cpp
index b645d2e9f5ff8adb3d9e23b66c85a507c279629d..df08734e491eb9dbfdc6f886c7ce0220a9c9deae 100644
--- a/obj/BSXFlags.cpp
+++ b/obj/BSXFlags.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "BSXFlags.h"
+#include "obj/BSXFlags.h"
 
 //Definition of TYPE constant
 const Type BSXFlags::TYPE("BSXFlags", &B_S_X_FLAGS_PARENT::TYPE );
diff --git a/obj/BSXFlags.h b/obj/BSXFlags.h
index cd2125c994cc82aa3cb98baf44fcc6d2477a21b0..e9f7020e7fba4bfc8958764139f5ddd6f266d43d 100644
--- a/obj/BSXFlags.h
+++ b/obj/BSXFlags.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BSXFLAGS_H_
 #define _BSXFLAGS_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include B_S_X_FLAGS_INCLUDE
 
 /*
  * BSXFlags
diff --git a/obj/FxButton.cpp b/obj/FxButton.cpp
index f9b5b1a2b9f9213a9fdb4e330bd07c9c69181785..6a16cb4b30a3f75b9ef397d8e7c68d1e9445028d 100644
--- a/obj/FxButton.cpp
+++ b/obj/FxButton.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "FxButton.h"
+#include "obj/FxButton.h"
 
 //Definition of TYPE constant
 const Type FxButton::TYPE("FxButton", &FX_BUTTON_PARENT::TYPE );
diff --git a/obj/FxButton.h b/obj/FxButton.h
index 08f91ad53fd88cf67d86a9addb0909516f3ae023..8ce271cae8a829c40c6b5cded7361502342d413c 100644
--- a/obj/FxButton.h
+++ b/obj/FxButton.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _FXBUTTON_H_
 #define _FXBUTTON_H_
 
+#include "FxWidget.h"
+
 #include "gen/obj_defines.h"
-#include FX_BUTTON_INCLUDE
 
 /*
  * FxButton
diff --git a/obj/FxRadioButton.cpp b/obj/FxRadioButton.cpp
index 073cd74acbf6554d0342fbb0a6fb4875468e96b2..ac0876258ee801553a67505c97e40846ffb2e1fa 100644
--- a/obj/FxRadioButton.cpp
+++ b/obj/FxRadioButton.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "FxRadioButton.h"
-#include "NiObject.h"
+#include "obj/FxRadioButton.h"
 
 //Definition of TYPE constant
 const Type FxRadioButton::TYPE("FxRadioButton", &FX_RADIO_BUTTON_PARENT::TYPE );
diff --git a/obj/FxRadioButton.h b/obj/FxRadioButton.h
index 406dc94816282938cde107b3846430bfa3618889..2d8b51c9a4c4a71285edb08571576d44c1305097 100644
--- a/obj/FxRadioButton.h
+++ b/obj/FxRadioButton.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _FXRADIOBUTTON_H_
 #define _FXRADIOBUTTON_H_
 
+#include "FxWidget.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+
 #include "gen/obj_defines.h"
-#include FX_RADIO_BUTTON_INCLUDE
 
 /*
  * FxRadioButton
diff --git a/obj/FxWidget.cpp b/obj/FxWidget.cpp
index a4dad88e59d109050276f095d3413f7159c04d81..0fc9bf50a8b59d214018d4f7d5e9db323acd435c 100644
--- a/obj/FxWidget.cpp
+++ b/obj/FxWidget.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "FxWidget.h"
+#include "obj/FxWidget.h"
 
 //Definition of TYPE constant
 const Type FxWidget::TYPE("FxWidget", &FX_WIDGET_PARENT::TYPE );
diff --git a/obj/FxWidget.h b/obj/FxWidget.h
index 9be4551c5ceedb663726b16fb0eb158cb7f50262..34005ea223d40d4ba4d511272385306f0a915b0b 100644
--- a/obj/FxWidget.h
+++ b/obj/FxWidget.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _FXWIDGET_H_
 #define _FXWIDGET_H_
 
+#include "NiNode.h"
+
 #include "gen/obj_defines.h"
-#include FX_WIDGET_INCLUDE
 
 /*
  * FxWidget
diff --git a/obj/NiAlphaController.cpp b/obj/NiAlphaController.cpp
index bae2299d06b51be5c744a8be35ddf29e8ed4bf8a..9ddc18bac7141bb5804dab70cc0401a7590c11f2 100644
--- a/obj/NiAlphaController.cpp
+++ b/obj/NiAlphaController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiAlphaController.h"
-#include "NiFloatData.h"
+#include "obj/NiAlphaController.h"
 
 //Definition of TYPE constant
 const Type NiAlphaController::TYPE("NiAlphaController", &NI_ALPHA_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiAlphaController.h b/obj/NiAlphaController.h
index 226a5841f456b199b39b6c09062064fd22b69bb4..e9057ef93352c1dc44a307a0b838dc48c7a6f104 100644
--- a/obj/NiAlphaController.h
+++ b/obj/NiAlphaController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIALPHACONTROLLER_H_
 #define _NIALPHACONTROLLER_H_
 
+#include "NiSingleInterpolatorController.h"
+#include "Ref.h"
+#include "obj/NiFloatData.h"
+
 #include "gen/obj_defines.h"
-#include NI_ALPHA_CONTROLLER_INCLUDE
 
 /*
  * NiAlphaController
diff --git a/obj/NiAlphaProperty.cpp b/obj/NiAlphaProperty.cpp
index d5d012ec50d45e3f4e03b6e08c37f4f806db8a5b..9054a60cf7cd1d2fecf099c1eb0db41a8b194225 100644
--- a/obj/NiAlphaProperty.cpp
+++ b/obj/NiAlphaProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiAlphaProperty.h"
+#include "obj/NiAlphaProperty.h"
 
 //Definition of TYPE constant
 const Type NiAlphaProperty::TYPE("NiAlphaProperty", &NI_ALPHA_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiAlphaProperty.h b/obj/NiAlphaProperty.h
index e61e28400facf132de6dbdd619f6fe1bcb11fef2..5ebf4fa21f26b05597b4cf017480d2071fc97bb1 100644
--- a/obj/NiAlphaProperty.h
+++ b/obj/NiAlphaProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIALPHAPROPERTY_H_
 #define _NIALPHAPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_ALPHA_PROPERTY_INCLUDE
 
 /*
  * NiAlphaProperty
diff --git a/obj/NiAmbientLight.cpp b/obj/NiAmbientLight.cpp
index 554f4b573d91d0783945262be9ce7636680108f1..6e496e39a19f40f6c789771aaa3b71fd7cb524d3 100644
--- a/obj/NiAmbientLight.cpp
+++ b/obj/NiAmbientLight.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiAmbientLight.h"
+#include "obj/NiAmbientLight.h"
 
 //Definition of TYPE constant
 const Type NiAmbientLight::TYPE("NiAmbientLight", &NI_AMBIENT_LIGHT_PARENT::TYPE );
diff --git a/obj/NiAmbientLight.h b/obj/NiAmbientLight.h
index 904af4e9400ed709ad8da2734830ef19d10f9c29..cb449ed34a7a4a0db5e6056ed3cd955e0931a5e8 100644
--- a/obj/NiAmbientLight.h
+++ b/obj/NiAmbientLight.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIAMBIENTLIGHT_H_
 #define _NIAMBIENTLIGHT_H_
 
+#include "NiLight.h"
+
 #include "gen/obj_defines.h"
-#include NI_AMBIENT_LIGHT_INCLUDE
 
 /*
  * NiAmbientLight
diff --git a/obj/NiAutoNormalParticles.cpp b/obj/NiAutoNormalParticles.cpp
index c6501647f2cef86dfa2ecf64f23d1f02c814cf72..13f3fa3ef9e3f66e37370d3a630cab6f114b8a91 100644
--- a/obj/NiAutoNormalParticles.cpp
+++ b/obj/NiAutoNormalParticles.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiAutoNormalParticles.h"
+#include "obj/NiAutoNormalParticles.h"
 
 //Definition of TYPE constant
 const Type NiAutoNormalParticles::TYPE("NiAutoNormalParticles", &NI_AUTO_NORMAL_PARTICLES_PARENT::TYPE );
diff --git a/obj/NiAutoNormalParticles.h b/obj/NiAutoNormalParticles.h
index 16900c4a543f0eafdf82828edcf51634a6f5497f..59d756495282dd174193de5810bb4ad5ac20f3fb 100644
--- a/obj/NiAutoNormalParticles.h
+++ b/obj/NiAutoNormalParticles.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIAUTONORMALPARTICLES_H_
 #define _NIAUTONORMALPARTICLES_H_
 
+#include "NiParticles.h"
+
 #include "gen/obj_defines.h"
-#include NI_AUTO_NORMAL_PARTICLES_INCLUDE
 
 /*
  * NiAutoNormalParticles
diff --git a/obj/NiAutoNormalParticlesData.cpp b/obj/NiAutoNormalParticlesData.cpp
index dd13be310a6baf7caa7890f56070e504672eba63..4d1ab7bd8ff0ba5391585378bddc5cb07cd70079 100644
--- a/obj/NiAutoNormalParticlesData.cpp
+++ b/obj/NiAutoNormalParticlesData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiAutoNormalParticlesData.h"
+#include "obj/NiAutoNormalParticlesData.h"
 
 //Definition of TYPE constant
 const Type NiAutoNormalParticlesData::TYPE("NiAutoNormalParticlesData", &NI_AUTO_NORMAL_PARTICLES_DATA_PARENT::TYPE );
diff --git a/obj/NiAutoNormalParticlesData.h b/obj/NiAutoNormalParticlesData.h
index 23da7b6e445209e53c706eb73bb8d30b53207463..0910b48a732b2a3c6aa3d6447cef2b25ef10fc29 100644
--- a/obj/NiAutoNormalParticlesData.h
+++ b/obj/NiAutoNormalParticlesData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIAUTONORMALPARTICLESDATA_H_
 #define _NIAUTONORMALPARTICLESDATA_H_
 
+#include "NiTriBasedGeomData.h"
+
 #include "gen/obj_defines.h"
-#include NI_AUTO_NORMAL_PARTICLES_DATA_INCLUDE
 
 /*
  * NiAutoNormalParticlesData
diff --git a/obj/NiBSAnimationNode.cpp b/obj/NiBSAnimationNode.cpp
index 4e86331b9d793b18d9de3c8002371071b929de61..41025741feecd2ee6c505895d34e9b23f3f843ee 100644
--- a/obj/NiBSAnimationNode.cpp
+++ b/obj/NiBSAnimationNode.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSAnimationNode.h"
+#include "obj/NiBSAnimationNode.h"
 
 //Definition of TYPE constant
 const Type NiBSAnimationNode::TYPE("NiBSAnimationNode", &NI_B_S_ANIMATION_NODE_PARENT::TYPE );
diff --git a/obj/NiBSAnimationNode.h b/obj/NiBSAnimationNode.h
index 0ef43fe911403643f69d07a5e940cd1124b4a06f..a9f4a3dc9253ccc1e2981a566da806edbadfe0dd 100644
--- a/obj/NiBSAnimationNode.h
+++ b/obj/NiBSAnimationNode.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSANIMATIONNODE_H_
 #define _NIBSANIMATIONNODE_H_
 
+#include "NiNode.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_S_ANIMATION_NODE_INCLUDE
 
 /*
  * NiBSAnimationNode
diff --git a/obj/NiBSBoneLODController.cpp b/obj/NiBSBoneLODController.cpp
index 1357052a3707d676188edc0374e3e6b0c543d10f..fe26f80d418847b36fc72f304c1fa37ec74479c8 100644
--- a/obj/NiBSBoneLODController.cpp
+++ b/obj/NiBSBoneLODController.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSBoneLODController.h"
+#include "obj/NiBSBoneLODController.h"
 
 //Definition of TYPE constant
 const Type NiBSBoneLODController::TYPE("NiBSBoneLODController", &NI_B_S_BONE_L_O_D_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiBSBoneLODController.h b/obj/NiBSBoneLODController.h
index 318076c0c9b193a278c333ffd1b0386465661933..728b2c482c4d5d9159c1cce9dba6e5e6322835fb 100644
--- a/obj/NiBSBoneLODController.h
+++ b/obj/NiBSBoneLODController.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSBONELODCONTROLLER_H_
 #define _NIBSBONELODCONTROLLER_H_
 
+#include "ABoneLODController.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_S_BONE_L_O_D_CONTROLLER_INCLUDE
 
 /*
  * NiBSBoneLODController
diff --git a/obj/NiBSPArrayController.cpp b/obj/NiBSPArrayController.cpp
index de0bab9dbee8ef331383959ed8992ca04f6d08ea..4a7c32ab160ba21c1292436f9fb965062032aa71 100644
--- a/obj/NiBSPArrayController.cpp
+++ b/obj/NiBSPArrayController.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSPArrayController.h"
+#include "obj/NiBSPArrayController.h"
 
 //Definition of TYPE constant
 const Type NiBSPArrayController::TYPE("NiBSPArrayController", &NI_B_S_P_ARRAY_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiBSPArrayController.h b/obj/NiBSPArrayController.h
index d67e6432d4c0b48aa5615f0efd9d93afbbe2e1e0..ee9248b7a45d361c86dfb98e887eb13d11ababa0 100644
--- a/obj/NiBSPArrayController.h
+++ b/obj/NiBSPArrayController.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPARRAYCONTROLLER_H_
 #define _NIBSPARRAYCONTROLLER_H_
 
+#include "NiParticleSystemController.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_S_P_ARRAY_CONTROLLER_INCLUDE
 
 /*
  * NiBSPArrayController
diff --git a/obj/NiBSParticleNode.cpp b/obj/NiBSParticleNode.cpp
index 81167de3e55f3ba180db27d916dcf47a0da9671c..20bc1c30fb950d13652a654a06a38258c75b7d7d 100644
--- a/obj/NiBSParticleNode.cpp
+++ b/obj/NiBSParticleNode.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSParticleNode.h"
+#include "obj/NiBSParticleNode.h"
 
 //Definition of TYPE constant
 const Type NiBSParticleNode::TYPE("NiBSParticleNode", &NI_B_S_PARTICLE_NODE_PARENT::TYPE );
diff --git a/obj/NiBSParticleNode.h b/obj/NiBSParticleNode.h
index d88f8fb594378033e082fe51bf05fb72e96b174e..14055eecd7e86ee16d08670571447573c28116f2 100644
--- a/obj/NiBSParticleNode.h
+++ b/obj/NiBSParticleNode.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPARTICLENODE_H_
 #define _NIBSPARTICLENODE_H_
 
+#include "NiNode.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_S_PARTICLE_NODE_INCLUDE
 
 /*
  * NiBSParticleNode
diff --git a/obj/NiBSplineBasisData.cpp b/obj/NiBSplineBasisData.cpp
index 192f3f3acadc7423770b97969192037a6a83eee1..b9cd67a33611cd97df69819487bc6bf4fb15998f 100644
--- a/obj/NiBSplineBasisData.cpp
+++ b/obj/NiBSplineBasisData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSplineBasisData.h"
+#include "obj/NiBSplineBasisData.h"
 
 //Definition of TYPE constant
 const Type NiBSplineBasisData::TYPE("NiBSplineBasisData", &NI_B_SPLINE_BASIS_DATA_PARENT::TYPE );
diff --git a/obj/NiBSplineBasisData.h b/obj/NiBSplineBasisData.h
index 71fcdf938c860c42e80bab951097e4a7973ae150..7b3af0615f261fd6cf0c84e687d368ba21241333 100644
--- a/obj/NiBSplineBasisData.h
+++ b/obj/NiBSplineBasisData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPLINEBASISDATA_H_
 #define _NIBSPLINEBASISDATA_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_SPLINE_BASIS_DATA_INCLUDE
 
 /*
  * NiBSplineBasisData
diff --git a/obj/NiBSplineCompFloatInterpolator.cpp b/obj/NiBSplineCompFloatInterpolator.cpp
index a571b08c01c2a41fe11620bded9ee34f108439ff..cc03985b5eb702549625ef3f37608886eef23952 100644
--- a/obj/NiBSplineCompFloatInterpolator.cpp
+++ b/obj/NiBSplineCompFloatInterpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSplineCompFloatInterpolator.h"
+#include "obj/NiBSplineCompFloatInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBSplineCompFloatInterpolator::TYPE("NiBSplineCompFloatInterpolator", &NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBSplineCompFloatInterpolator.h b/obj/NiBSplineCompFloatInterpolator.h
index cbd1ecac09f8c3fb42c7163638aa819eb7ec2a15..c9b63623fc2ea054b4f6f9371ded4f79c335a034 100644
--- a/obj/NiBSplineCompFloatInterpolator.h
+++ b/obj/NiBSplineCompFloatInterpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPLINECOMPFLOATINTERPOLATOR_H_
 #define _NIBSPLINECOMPFLOATINTERPOLATOR_H_
 
+#include "NiBSplineInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_INCLUDE
 
 /*
  * NiBSplineCompFloatInterpolator
diff --git a/obj/NiBSplineCompPoint3Interpolator.cpp b/obj/NiBSplineCompPoint3Interpolator.cpp
index 8f40b4be56884036a98c1865064d308bc5c27cae..04ab1735ce36f49c926f4fc2bdd3a7197bc4fdd1 100644
--- a/obj/NiBSplineCompPoint3Interpolator.cpp
+++ b/obj/NiBSplineCompPoint3Interpolator.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSplineCompPoint3Interpolator.h"
-#include "NiBSplineData.h"
-#include "NiObject.h"
+#include "obj/NiBSplineCompPoint3Interpolator.h"
 
 //Definition of TYPE constant
 const Type NiBSplineCompPoint3Interpolator::TYPE("NiBSplineCompPoint3Interpolator", &NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBSplineCompPoint3Interpolator.h b/obj/NiBSplineCompPoint3Interpolator.h
index 2b14e1e6bfd39cf8b86a10ee18a87cd07cb7c2e6..5cd99df2f99c0b1a1041bd0d365c5755a0ddc31d 100644
--- a/obj/NiBSplineCompPoint3Interpolator.h
+++ b/obj/NiBSplineCompPoint3Interpolator.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPLINECOMPPOINT3INTERPOLATOR_H_
 #define _NIBSPLINECOMPPOINT3INTERPOLATOR_H_
 
+#include "NiBSplineInterpolator.h"
+#include "Ref.h"
+#include "obj/NiBSplineData.h"
+#include "obj/NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_INCLUDE
 
 /*
  * NiBSplineCompPoint3Interpolator
diff --git a/obj/NiBSplineCompTransformInterpolator.cpp b/obj/NiBSplineCompTransformInterpolator.cpp
index e5227acdfee9ee4f961b0bb50236ff7ec952d3b7..c0dccbf0f9fcb482e1543152d59e9d262e4c30ae 100644
--- a/obj/NiBSplineCompTransformInterpolator.cpp
+++ b/obj/NiBSplineCompTransformInterpolator.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSplineCompTransformInterpolator.h"
-#include "NiBSplineData.h"
-#include "NiBSplineBasisData.h"
+#include "obj/NiBSplineCompTransformInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBSplineCompTransformInterpolator::TYPE("NiBSplineCompTransformInterpolator", &NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBSplineCompTransformInterpolator.h b/obj/NiBSplineCompTransformInterpolator.h
index f42738ca353ea8148e07e3aaa6713f6786eea20a..65f0e38ed6714c7a53e71db1f955c63879f2b5b6 100644
--- a/obj/NiBSplineCompTransformInterpolator.h
+++ b/obj/NiBSplineCompTransformInterpolator.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPLINECOMPTRANSFORMINTERPOLATOR_H_
 #define _NIBSPLINECOMPTRANSFORMINTERPOLATOR_H_
 
+#include "NiBSplineInterpolator.h"
+#include "Ref.h"
+#include "obj/NiBSplineData.h"
+#include "obj/NiBSplineBasisData.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_INCLUDE
 
 /*
  * NiBSplineCompTransformInterpolator
diff --git a/obj/NiBSplineData.cpp b/obj/NiBSplineData.cpp
index 4c2626caa39f25afad47215452696829ebf718ec..6ef9504a707338f7112d201e8e860ca906b2ec52 100644
--- a/obj/NiBSplineData.cpp
+++ b/obj/NiBSplineData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSplineData.h"
+#include "obj/NiBSplineData.h"
 
 //Definition of TYPE constant
 const Type NiBSplineData::TYPE("NiBSplineData", &NI_B_SPLINE_DATA_PARENT::TYPE );
diff --git a/obj/NiBSplineData.h b/obj/NiBSplineData.h
index 23a0166145780b9ba15bbf6a4e237c89607cbd60..1a2e2bf57476bc601b89275a92c171787b5e1f51 100644
--- a/obj/NiBSplineData.h
+++ b/obj/NiBSplineData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPLINEDATA_H_
 #define _NIBSPLINEDATA_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_SPLINE_DATA_INCLUDE
 
 /*
  * NiBSplineData
diff --git a/obj/NiBSplineInterpolator.cpp b/obj/NiBSplineInterpolator.cpp
index 4351292b701d06a3286504d0ddb799c5f31e1c92..a34774be35eb19b7e67c2c10ea22da09aabfd406 100644
--- a/obj/NiBSplineInterpolator.cpp
+++ b/obj/NiBSplineInterpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBSplineInterpolator.h"
+#include "obj/NiBSplineInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBSplineInterpolator::TYPE("NiBSplineInterpolator", &NI_B_SPLINE_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBSplineInterpolator.h b/obj/NiBSplineInterpolator.h
index 34e95cfcfbc5026ff35e810f3b753a7f0bc2b976..d78fe31a0b59762f6284cd02d151538670c2f942 100644
--- a/obj/NiBSplineInterpolator.h
+++ b/obj/NiBSplineInterpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBSPLINEINTERPOLATOR_H_
 #define _NIBSPLINEINTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_B_SPLINE_INTERPOLATOR_INCLUDE
 
 /*
  * NiBSplineInterpolator
diff --git a/obj/NiBillboardNode.cpp b/obj/NiBillboardNode.cpp
index defe4afb1621ac158c12a9598b7bfdf38412db54..868526b64e66f27af7d227ab97d3156e2650347c 100644
--- a/obj/NiBillboardNode.cpp
+++ b/obj/NiBillboardNode.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBillboardNode.h"
+#include "obj/NiBillboardNode.h"
 
 //Definition of TYPE constant
 const Type NiBillboardNode::TYPE("NiBillboardNode", &NI_BILLBOARD_NODE_PARENT::TYPE );
diff --git a/obj/NiBillboardNode.h b/obj/NiBillboardNode.h
index 065da94198a3e623d0dbcb054f8f8170995f9a61..cb11e190659708bf4a812d02ed62bff5b3f9bab4 100644
--- a/obj/NiBillboardNode.h
+++ b/obj/NiBillboardNode.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBILLBOARDNODE_H_
 #define _NIBILLBOARDNODE_H_
 
+#include "NiNode.h"
+
 #include "gen/obj_defines.h"
-#include NI_BILLBOARD_NODE_INCLUDE
 
 /*
  * NiBillboardNode
diff --git a/obj/NiBinaryExtraData.cpp b/obj/NiBinaryExtraData.cpp
index 575c8dea912908768ba6c6fa7eb3e6d56f3dcd9f..8924748bf71b07d69a92840610320e91477a27ba 100644
--- a/obj/NiBinaryExtraData.cpp
+++ b/obj/NiBinaryExtraData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBinaryExtraData.h"
+#include "obj/NiBinaryExtraData.h"
+#include "gen/ByteArray.h"
 
 //Definition of TYPE constant
 const Type NiBinaryExtraData::TYPE("NiBinaryExtraData", &NI_BINARY_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiBinaryExtraData.h b/obj/NiBinaryExtraData.h
index 48ac9f162b369d2ea332cf582540de3b8d55176c..2247cc9e19fc97acc93da46a93d6a1b5439e1131 100644
--- a/obj/NiBinaryExtraData.h
+++ b/obj/NiBinaryExtraData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBINARYEXTRADATA_H_
 #define _NIBINARYEXTRADATA_H_
 
+#include "NiExtraData.h"
+#include "gen/ByteArray.h"
+
 #include "gen/obj_defines.h"
-#include NI_BINARY_EXTRA_DATA_INCLUDE
 
 /*
  * NiBinaryExtraData
diff --git a/obj/NiBlendBoolInterpolator.cpp b/obj/NiBlendBoolInterpolator.cpp
index 0b75115dc97a08d6eb1882f1e757b553f49aba52..6cee108b1aedacc085a2cd8ef70d98d39f80e287 100644
--- a/obj/NiBlendBoolInterpolator.cpp
+++ b/obj/NiBlendBoolInterpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBlendBoolInterpolator.h"
+#include "obj/NiBlendBoolInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBlendBoolInterpolator::TYPE("NiBlendBoolInterpolator", &NI_BLEND_BOOL_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBlendBoolInterpolator.h b/obj/NiBlendBoolInterpolator.h
index 33f5af01dd77a05d7166f68d06c4fb3921b0938c..0e0611f290ceca0661874a3fecbb1818ef2ba9cc 100644
--- a/obj/NiBlendBoolInterpolator.h
+++ b/obj/NiBlendBoolInterpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBLENDBOOLINTERPOLATOR_H_
 #define _NIBLENDBOOLINTERPOLATOR_H_
 
+#include "NiBlendInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_BLEND_BOOL_INTERPOLATOR_INCLUDE
 
 /*
  * NiBlendBoolInterpolator
diff --git a/obj/NiBlendFloatInterpolator.cpp b/obj/NiBlendFloatInterpolator.cpp
index ec86bf06bd6a852a494fb6d2054f8fb65480784e..d0660f996628708cc420909c40a69d048cc58ce0 100644
--- a/obj/NiBlendFloatInterpolator.cpp
+++ b/obj/NiBlendFloatInterpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBlendFloatInterpolator.h"
+#include "obj/NiBlendFloatInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBlendFloatInterpolator::TYPE("NiBlendFloatInterpolator", &NI_BLEND_FLOAT_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBlendFloatInterpolator.h b/obj/NiBlendFloatInterpolator.h
index e51cabb36db09b4c69cc98735c5ab4fc08a54cef..cbdae30af715099081f6a5b9a33a724f0447408e 100644
--- a/obj/NiBlendFloatInterpolator.h
+++ b/obj/NiBlendFloatInterpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBLENDFLOATINTERPOLATOR_H_
 #define _NIBLENDFLOATINTERPOLATOR_H_
 
+#include "NiBlendInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_BLEND_FLOAT_INTERPOLATOR_INCLUDE
 
 /*
  * NiBlendFloatInterpolator
diff --git a/obj/NiBlendInterpolator.cpp b/obj/NiBlendInterpolator.cpp
index bb031de56b2c6cbcd15fdbb41c8392b6920f4914..6b7e2d7b739175ba22093e09248a72c6480e707b 100644
--- a/obj/NiBlendInterpolator.cpp
+++ b/obj/NiBlendInterpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBlendInterpolator.h"
+#include "obj/NiBlendInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBlendInterpolator::TYPE("NiBlendInterpolator", &NI_BLEND_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBlendInterpolator.h b/obj/NiBlendInterpolator.h
index 029ec4839c3934979733957326352ead2981647b..767ec1b1c9494556b5fefd730e1226908548d20d 100644
--- a/obj/NiBlendInterpolator.h
+++ b/obj/NiBlendInterpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBLENDINTERPOLATOR_H_
 #define _NIBLENDINTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_BLEND_INTERPOLATOR_INCLUDE
 
 /*
  * NiBlendInterpolator
diff --git a/obj/NiBlendPoint3Interpolator.cpp b/obj/NiBlendPoint3Interpolator.cpp
index a251dd679f83bc9006c2b467226aed9d3d219569..b7d925ab43eedc2d736ca947670fb1ee8b5b59fe 100644
--- a/obj/NiBlendPoint3Interpolator.cpp
+++ b/obj/NiBlendPoint3Interpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBlendPoint3Interpolator.h"
+#include "obj/NiBlendPoint3Interpolator.h"
 
 //Definition of TYPE constant
 const Type NiBlendPoint3Interpolator::TYPE("NiBlendPoint3Interpolator", &NI_BLEND_POINT3_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBlendPoint3Interpolator.h b/obj/NiBlendPoint3Interpolator.h
index 90de087cd76253d36156199cf2561b003393e7d1..d63395be8b8c0f10be92b5db5e190ffc43753728 100644
--- a/obj/NiBlendPoint3Interpolator.h
+++ b/obj/NiBlendPoint3Interpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBLENDPOINT3INTERPOLATOR_H_
 #define _NIBLENDPOINT3INTERPOLATOR_H_
 
+#include "NiBlendInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_BLEND_POINT3_INTERPOLATOR_INCLUDE
 
 /*
  * NiBlendPoint3Interpolator
diff --git a/obj/NiBlendTransformInterpolator.cpp b/obj/NiBlendTransformInterpolator.cpp
index ab874da443cff80e21195e0abd923d15d33f4aed..a6ac9f01726b211088ad2cd68e768a51564c3604 100644
--- a/obj/NiBlendTransformInterpolator.cpp
+++ b/obj/NiBlendTransformInterpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBlendTransformInterpolator.h"
+#include "obj/NiBlendTransformInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBlendTransformInterpolator::TYPE("NiBlendTransformInterpolator", &NI_BLEND_TRANSFORM_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBlendTransformInterpolator.h b/obj/NiBlendTransformInterpolator.h
index a8644c8457689d565319165529f0bfbdb5761988..9d55e22058f225a7f29bfa60e2726a7134d8d08d 100644
--- a/obj/NiBlendTransformInterpolator.h
+++ b/obj/NiBlendTransformInterpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBLENDTRANSFORMINTERPOLATOR_H_
 #define _NIBLENDTRANSFORMINTERPOLATOR_H_
 
+#include "NiBlendInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_BLEND_TRANSFORM_INTERPOLATOR_INCLUDE
 
 /*
  * NiBlendTransformInterpolator
diff --git a/obj/NiBoneLODController.cpp b/obj/NiBoneLODController.cpp
index 69e6e4da5a0e9c3274b24dcd6147009c2d9758ee..2bd7163235d6d1bed23ab762a3c7818ea8a4d0ae 100644
--- a/obj/NiBoneLODController.cpp
+++ b/obj/NiBoneLODController.cpp
@@ -1,10 +1,9 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBoneLODController.h"
-#include "NiTriShape.h"
-#include "NiSkinInstance.h"
-#include "NiTriShape.h"
+#include "obj/NiBoneLODController.h"
+#include "gen/SkinShapeGroup.h"
+#include "gen/SkinShape.h"
 
 //Definition of TYPE constant
 const Type NiBoneLODController::TYPE("NiBoneLODController", &NI_BONE_L_O_D_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiBoneLODController.h b/obj/NiBoneLODController.h
index a6620b8b82a0087e811f3d7ef6c2727973b02d04..558c9ea606f5d7a0ac0280f17178d27b71bb9bb6 100644
--- a/obj/NiBoneLODController.h
+++ b/obj/NiBoneLODController.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBONELODCONTROLLER_H_
 #define _NIBONELODCONTROLLER_H_
 
+#include "ABoneLODController.h"
+#include "gen/SkinShapeGroup.h"
+#include "Ref.h"
+#include "obj/NiTriShape.h"
+
 #include "gen/obj_defines.h"
-#include NI_BONE_L_O_D_CONTROLLER_INCLUDE
 
 /*
  * NiBoneLODController
diff --git a/obj/NiBoolData.cpp b/obj/NiBoolData.cpp
index 0baae004acd179950e5c4e35a1d453a8218ab535..8e59e2c875db08616b600f7fa62814ed0430bafe 100644
--- a/obj/NiBoolData.cpp
+++ b/obj/NiBoolData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBoolData.h"
+#include "obj/NiBoolData.h"
+#include "gen/KeyGroup.h"
 
 //Definition of TYPE constant
 const Type NiBoolData::TYPE("NiBoolData", &NI_BOOL_DATA_PARENT::TYPE );
diff --git a/obj/NiBoolData.h b/obj/NiBoolData.h
index 6d460e6b72a04a5e255aa21641a28d5e10c1e9e7..e552324564157396ea32fdb7593da9175491f9db 100644
--- a/obj/NiBoolData.h
+++ b/obj/NiBoolData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBOOLDATA_H_
 #define _NIBOOLDATA_H_
 
+#include "AKeyedData.h"
+#include "gen/KeyGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_BOOL_DATA_INCLUDE
 
 /*
  * NiBoolData
diff --git a/obj/NiBoolInterpolator.cpp b/obj/NiBoolInterpolator.cpp
index ec3608f3de81b96025a9ca34deef5e93705ad6d3..a8465d1e7f80e6f881ceb7757c56197238016aa2 100644
--- a/obj/NiBoolInterpolator.cpp
+++ b/obj/NiBoolInterpolator.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBoolInterpolator.h"
-#include "NiBoolData.h"
+#include "obj/NiBoolInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBoolInterpolator::TYPE("NiBoolInterpolator", &NI_BOOL_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBoolInterpolator.h b/obj/NiBoolInterpolator.h
index 91a286606c37c916d8c62b83f299cac814521fb6..5f8bcb3c12fb3624d91faf1be3ff897c48ca4de5 100644
--- a/obj/NiBoolInterpolator.h
+++ b/obj/NiBoolInterpolator.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBOOLINTERPOLATOR_H_
 #define _NIBOOLINTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+#include "Ref.h"
+#include "obj/NiBoolData.h"
+
 #include "gen/obj_defines.h"
-#include NI_BOOL_INTERPOLATOR_INCLUDE
 
 /*
  * NiBoolInterpolator
diff --git a/obj/NiBoolTimelineInterpolator.cpp b/obj/NiBoolTimelineInterpolator.cpp
index eaa3b137521b2acf0fa4a3dcb06e595da04fafd8..2a43771f4f57f1f67a38982685ce896bb0ca8834 100644
--- a/obj/NiBoolTimelineInterpolator.cpp
+++ b/obj/NiBoolTimelineInterpolator.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBoolTimelineInterpolator.h"
-#include "NiBoolData.h"
+#include "obj/NiBoolTimelineInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiBoolTimelineInterpolator::TYPE("NiBoolTimelineInterpolator", &NI_BOOL_TIMELINE_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiBoolTimelineInterpolator.h b/obj/NiBoolTimelineInterpolator.h
index d932cd3cd81000a2b612a7ac339d6d0e8d5bc7d8..7770bc4afd4af1074dadd6afde91e534917c8825 100644
--- a/obj/NiBoolTimelineInterpolator.h
+++ b/obj/NiBoolTimelineInterpolator.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBOOLTIMELINEINTERPOLATOR_H_
 #define _NIBOOLTIMELINEINTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+#include "Ref.h"
+#include "obj/NiBoolData.h"
+
 #include "gen/obj_defines.h"
-#include NI_BOOL_TIMELINE_INTERPOLATOR_INCLUDE
 
 /*
  * NiBoolTimelineInterpolator
diff --git a/obj/NiBooleanExtraData.cpp b/obj/NiBooleanExtraData.cpp
index 1e8be0a5b9306c2e74396708556ab843ae6082ee..8d0d482171341310908227fd1ef9b35599588042 100644
--- a/obj/NiBooleanExtraData.cpp
+++ b/obj/NiBooleanExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiBooleanExtraData.h"
+#include "obj/NiBooleanExtraData.h"
 
 //Definition of TYPE constant
 const Type NiBooleanExtraData::TYPE("NiBooleanExtraData", &NI_BOOLEAN_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiBooleanExtraData.h b/obj/NiBooleanExtraData.h
index 0043b25fcd044ca1e19e88fe0012fcd594bc120a..39e602a3e174dd6c8b0c297f92fbdf930193ed88 100644
--- a/obj/NiBooleanExtraData.h
+++ b/obj/NiBooleanExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIBOOLEANEXTRADATA_H_
 #define _NIBOOLEANEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_BOOLEAN_EXTRA_DATA_INCLUDE
 
 /*
  * NiBooleanExtraData
diff --git a/obj/NiCamera.cpp b/obj/NiCamera.cpp
index 84b0ad2d0c744081dd67a1c930ffd75d23b9acf4..913252223bb45aad537ae2595bb52ac9cfbdc87d 100644
--- a/obj/NiCamera.cpp
+++ b/obj/NiCamera.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiCamera.h"
-#include "NiObject.h"
+#include "obj/NiCamera.h"
 
 //Definition of TYPE constant
 const Type NiCamera::TYPE("NiCamera", &NI_CAMERA_PARENT::TYPE );
diff --git a/obj/NiCamera.h b/obj/NiCamera.h
index 72f9be44a298359219f6c3d6dca582c93ed23593..9bbb1d3b9900920f9e2c5cad181f6ba2a6fa7bfb 100644
--- a/obj/NiCamera.h
+++ b/obj/NiCamera.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NICAMERA_H_
 #define _NICAMERA_H_
 
+#include "NiAVObject.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_CAMERA_INCLUDE
 
 /*
  * NiCamera
diff --git a/obj/NiCollisionData.cpp b/obj/NiCollisionData.cpp
index d392e31f5abf99e4c70dd3213d15bdd950313919..1d36ee58404f660c501e65b827c8df4efc59c775 100644
--- a/obj/NiCollisionData.cpp
+++ b/obj/NiCollisionData.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiCollisionData.h"
-#include "NiNode.h"
+#include "obj/NiCollisionData.h"
+#include "obj/NiNode.h"
 
 //Definition of TYPE constant
 const Type NiCollisionData::TYPE("NiCollisionData", &NI_COLLISION_DATA_PARENT::TYPE );
diff --git a/obj/NiCollisionData.h b/obj/NiCollisionData.h
index 4ef013ed178cb20ee4d2279d84a085c8d046953f..c565f2eb20c3ffc4b49e05967ad4061f3265e60a 100644
--- a/obj/NiCollisionData.h
+++ b/obj/NiCollisionData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NICOLLISIONDATA_H_
 #define _NICOLLISIONDATA_H_
 
+#include "NiObject.h"
+class NiNode;
+
 #include "gen/obj_defines.h"
-#include NI_COLLISION_DATA_INCLUDE
 
 /*
  * NiCollisionData
diff --git a/obj/NiCollisionObject.cpp b/obj/NiCollisionObject.cpp
index 10a4483adccaa6cd126a50dbfe049bd6cffbad40..afa4ab66b0fa841d3d163f68f71e58795447fbc6 100644
--- a/obj/NiCollisionObject.cpp
+++ b/obj/NiCollisionObject.cpp
@@ -1,9 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiCollisionObject.h"
-#include "NiAVObject.h"
-#include "NiObject.h"
+#include "obj/NiCollisionObject.h"
+#include "obj/NiAVObject.h"
 
 //Definition of TYPE constant
 const Type NiCollisionObject::TYPE("NiCollisionObject", &NI_COLLISION_OBJECT_PARENT::TYPE );
diff --git a/obj/NiCollisionObject.h b/obj/NiCollisionObject.h
index 0edd7f8b050927d7d5185635c6c537af8cabe7de..c4bc83422daf4b4b0defb133757a3aec90ff0db4 100644
--- a/obj/NiCollisionObject.h
+++ b/obj/NiCollisionObject.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NICOLLISIONOBJECT_H_
 #define _NICOLLISIONOBJECT_H_
 
+#include "NiObject.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+class NiAVObject;
+
 #include "gen/obj_defines.h"
-#include NI_COLLISION_OBJECT_INCLUDE
 
 /*
  * NiCollisionObject
diff --git a/obj/NiColorData.cpp b/obj/NiColorData.cpp
index b4ce5fa81c6814f07c3e79c87e1c43348f3b1708..123842ad577b9a2006a6bb26a6d6d26cb122e103 100644
--- a/obj/NiColorData.cpp
+++ b/obj/NiColorData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiColorData.h"
+#include "obj/NiColorData.h"
+#include "gen/KeyGroup.h"
 
 //Definition of TYPE constant
 const Type NiColorData::TYPE("NiColorData", &NI_COLOR_DATA_PARENT::TYPE );
diff --git a/obj/NiColorData.h b/obj/NiColorData.h
index 9337539528dca7f826592fb99be29009bb149dc4..3ab0dd8606caea22563f7279e06e72675d0302b2 100644
--- a/obj/NiColorData.h
+++ b/obj/NiColorData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NICOLORDATA_H_
 #define _NICOLORDATA_H_
 
+#include "AKeyedData.h"
+#include "gen/KeyGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_COLOR_DATA_INCLUDE
 
 /*
  * NiColorData
diff --git a/obj/NiColorExtraData.cpp b/obj/NiColorExtraData.cpp
index bc434c06536f803af2d2bdbf106169c798361299..0a21f89d9a91cf3440e769c12f6f5a820f348aa8 100644
--- a/obj/NiColorExtraData.cpp
+++ b/obj/NiColorExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiColorExtraData.h"
+#include "obj/NiColorExtraData.h"
 
 //Definition of TYPE constant
 const Type NiColorExtraData::TYPE("NiColorExtraData", &NI_COLOR_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiColorExtraData.h b/obj/NiColorExtraData.h
index 8b98f6cad753f9c5abc89bf29a2501d00e98ef08..96b9c6e20b9fec5d361e0270fbd95e05fef2b713 100644
--- a/obj/NiColorExtraData.h
+++ b/obj/NiColorExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NICOLOREXTRADATA_H_
 #define _NICOLOREXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_COLOR_EXTRA_DATA_INCLUDE
 
 /*
  * NiColorExtraData
diff --git a/obj/NiControllerManager.cpp b/obj/NiControllerManager.cpp
index 06564a4ec119632e541a975c5471d0f6366ee91f..85b63cfed5e263c561b722b91fdb9f8e3f0c6ddf 100644
--- a/obj/NiControllerManager.cpp
+++ b/obj/NiControllerManager.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiControllerManager.h"
-#include "NiControllerSequence.h"
-#include "NiDefaultAVObjectPalette.h"
+#include "obj/NiControllerManager.h"
 
 //Definition of TYPE constant
 const Type NiControllerManager::TYPE("NiControllerManager", &NI_CONTROLLER_MANAGER_PARENT::TYPE );
diff --git a/obj/NiControllerManager.h b/obj/NiControllerManager.h
index 6835fef76e75df1f489c61a1923acdc5f11710e5..05d16335f89474675075da58d83f90cdf9ef2ae3 100644
--- a/obj/NiControllerManager.h
+++ b/obj/NiControllerManager.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NICONTROLLERMANAGER_H_
 #define _NICONTROLLERMANAGER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiControllerSequence.h"
+#include "obj/NiDefaultAVObjectPalette.h"
+
 #include "gen/obj_defines.h"
-#include NI_CONTROLLER_MANAGER_INCLUDE
 
 /*
  * NiControllerManager
diff --git a/obj/NiControllerSequence.cpp b/obj/NiControllerSequence.cpp
index 4d5c53a3689342f97495f5558ab54e6b7b4555b8..dd6762d0c8b7763b1984adcaf878db36f364214e 100644
--- a/obj/NiControllerSequence.cpp
+++ b/obj/NiControllerSequence.cpp
@@ -1,14 +1,10 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiControllerSequence.h"
-#include "NiInterpolator.h"
-#include "NiStringPalette.h"
-#include "NiInterpolator.h"
-#include "NiStringPalette.h"
-#include "NiTextKeyExtraData.h"
-#include "NiControllerManager.h"
-#include "NiStringPalette.h"
+#include "obj/NiControllerSequence.h"
+#include "gen/ControllerLink.h"
+#include "gen/ControllerLink.h"
+#include "obj/NiControllerManager.h"
 
 //Definition of TYPE constant
 const Type NiControllerSequence::TYPE("NiControllerSequence", &NI_CONTROLLER_SEQUENCE_PARENT::TYPE );
diff --git a/obj/NiControllerSequence.h b/obj/NiControllerSequence.h
index 75c9e19148e4a682dc86983c8feeb1affd82426b..4e37ece1a0a1938228b4789fc27781d4d8d41681 100644
--- a/obj/NiControllerSequence.h
+++ b/obj/NiControllerSequence.h
@@ -4,8 +4,14 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NICONTROLLERSEQUENCE_H_
 #define _NICONTROLLERSEQUENCE_H_
 
+#include "NiObject.h"
+#include "gen/ControllerLink.h"
+#include "Ref.h"
+#include "obj/NiTextKeyExtraData.h"
+#include "obj/NiStringPalette.h"
+class NiControllerManager;
+
 #include "gen/obj_defines.h"
-#include NI_CONTROLLER_SEQUENCE_INCLUDE
 
 /*
  * NiControllerSequence
diff --git a/obj/NiDefaultAVObjectPalette.cpp b/obj/NiDefaultAVObjectPalette.cpp
index af652750e4934d058bc9a44b688b4c269129e482..ee62f51625a4eb27876b5d5c7a60b84272132a14 100644
--- a/obj/NiDefaultAVObjectPalette.cpp
+++ b/obj/NiDefaultAVObjectPalette.cpp
@@ -1,8 +1,9 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiDefaultAVObjectPalette.h"
-#include "NiAVObject.h"
+#include "obj/NiDefaultAVObjectPalette.h"
+#include "gen/AVObject.h"
+#include "obj/NiAVObject.h"
 
 //Definition of TYPE constant
 const Type NiDefaultAVObjectPalette::TYPE("NiDefaultAVObjectPalette", &NI_DEFAULT_A_V_OBJECT_PALETTE_PARENT::TYPE );
diff --git a/obj/NiDefaultAVObjectPalette.h b/obj/NiDefaultAVObjectPalette.h
index fe6db48fa8804028a2bbc9218b742aee1dc9c48b..f356f24f394881c71170a7b38d883a4e3ca45652 100644
--- a/obj/NiDefaultAVObjectPalette.h
+++ b/obj/NiDefaultAVObjectPalette.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIDEFAULTAVOBJECTPALETTE_H_
 #define _NIDEFAULTAVOBJECTPALETTE_H_
 
+#include "NiObject.h"
+#include "gen/AVObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_DEFAULT_A_V_OBJECT_PALETTE_INCLUDE
 
 /*
  * NiDefaultAVObjectPalette
diff --git a/obj/NiDirectionalLight.cpp b/obj/NiDirectionalLight.cpp
index 1a52183d284e2b1bd2d35909cbbf827d4c5f23c0..1e76e42d10beec7d1654471889aaa03ef89d3f30 100644
--- a/obj/NiDirectionalLight.cpp
+++ b/obj/NiDirectionalLight.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiDirectionalLight.h"
+#include "obj/NiDirectionalLight.h"
 
 //Definition of TYPE constant
 const Type NiDirectionalLight::TYPE("NiDirectionalLight", &NI_DIRECTIONAL_LIGHT_PARENT::TYPE );
diff --git a/obj/NiDirectionalLight.h b/obj/NiDirectionalLight.h
index d2694bbb72467c38c06fc27c35eeaa5ca411d7f7..3004a491a53f6e9e79475f6606cdd8d7dca08fd6 100644
--- a/obj/NiDirectionalLight.h
+++ b/obj/NiDirectionalLight.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIDIRECTIONALLIGHT_H_
 #define _NIDIRECTIONALLIGHT_H_
 
+#include "NiLight.h"
+
 #include "gen/obj_defines.h"
-#include NI_DIRECTIONAL_LIGHT_INCLUDE
 
 /*
  * NiDirectionalLight
diff --git a/obj/NiDitherProperty.cpp b/obj/NiDitherProperty.cpp
index 0cd930c2977765430e58c9c301af39cf0f41618a..ed4989d345c6e008029883a5960380f3d196ffd6 100644
--- a/obj/NiDitherProperty.cpp
+++ b/obj/NiDitherProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiDitherProperty.h"
+#include "obj/NiDitherProperty.h"
 
 //Definition of TYPE constant
 const Type NiDitherProperty::TYPE("NiDitherProperty", &NI_DITHER_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiDitherProperty.h b/obj/NiDitherProperty.h
index c1b57c2556eb53693cd3a4fc4b4da36337260273..1c493b5dfd22d88f59f9df162c008068681f6d04 100644
--- a/obj/NiDitherProperty.h
+++ b/obj/NiDitherProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIDITHERPROPERTY_H_
 #define _NIDITHERPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_DITHER_PROPERTY_INCLUDE
 
 /*
  * NiDitherProperty
diff --git a/obj/NiDynamicEffect.cpp b/obj/NiDynamicEffect.cpp
index c44a73de8416b6f8ae7554081f2eb27607fc6e1f..e8f65828be09ec7ae0540fa42b5fe470f3f060d1 100644
--- a/obj/NiDynamicEffect.cpp
+++ b/obj/NiDynamicEffect.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiDynamicEffect.h"
-#include "NiAVObject.h"
+#include "obj/NiDynamicEffect.h"
 
 //Definition of TYPE constant
 const Type NiDynamicEffect::TYPE("NiDynamicEffect", &NI_DYNAMIC_EFFECT_PARENT::TYPE );
diff --git a/obj/NiDynamicEffect.h b/obj/NiDynamicEffect.h
index 713f7ba5a018521ec5103169ec8b93beb24bcd05..82d9a5e4a3cebf1d2d489b23c5f274172bb8bfd1 100644
--- a/obj/NiDynamicEffect.h
+++ b/obj/NiDynamicEffect.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIDYNAMICEFFECT_H_
 #define _NIDYNAMICEFFECT_H_
 
+#include "NiAVObject.h"
+#include "Ref.h"
+#include "obj/NiAVObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_DYNAMIC_EFFECT_INCLUDE
 
 /*
  * NiDynamicEffect
diff --git a/obj/NiExtraData.cpp b/obj/NiExtraData.cpp
index 1f108e0b2900839adcda2d9401024e11e46de399..2ce91172f43c4200c23e961031495a9bd0a2ec14 100644
--- a/obj/NiExtraData.cpp
+++ b/obj/NiExtraData.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiExtraData.h"
-#include "NiExtraData.h"
+#include "obj/NiExtraData.h"
 
 //Definition of TYPE constant
 const Type NiExtraData::TYPE("NiExtraData", &NI_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiExtraData.h b/obj/NiExtraData.h
index c18c002e2c163d9c9107d73fb57043d923e78e6e..5965098586b90d4b9971f3e4be1096cfe081de62 100644
--- a/obj/NiExtraData.h
+++ b/obj/NiExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIEXTRADATA_H_
 #define _NIEXTRADATA_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_EXTRA_DATA_INCLUDE
 
 /*
  * NiExtraData
diff --git a/obj/NiFlipController.cpp b/obj/NiFlipController.cpp
index 5c967fa5d28d767557d92f268c9a6c6b744178ce..fd2fa62c39a21a424a62f258aafd3951ba85fc6f 100644
--- a/obj/NiFlipController.cpp
+++ b/obj/NiFlipController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiFlipController.h"
-#include "NiSourceTexture.h"
+#include "obj/NiFlipController.h"
 
 //Definition of TYPE constant
 const Type NiFlipController::TYPE("NiFlipController", &NI_FLIP_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiFlipController.h b/obj/NiFlipController.h
index 1d731c6b73be73a3b355a843f377b687489120b0..34d2c0ca938ac529b8e8cdafe7932cf83ff916a9 100644
--- a/obj/NiFlipController.h
+++ b/obj/NiFlipController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIFLIPCONTROLLER_H_
 #define _NIFLIPCONTROLLER_H_
 
+#include "NiSingleInterpolatorController.h"
+#include "Ref.h"
+#include "obj/NiSourceTexture.h"
+
 #include "gen/obj_defines.h"
-#include NI_FLIP_CONTROLLER_INCLUDE
 
 /*
  * NiFlipController
diff --git a/obj/NiFloatData.cpp b/obj/NiFloatData.cpp
index 5fe838a4b046c1e241f503d4319f35b73d7e015e..3e4b147bb3b6919d286674933128fdf20598ee8d 100644
--- a/obj/NiFloatData.cpp
+++ b/obj/NiFloatData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiFloatData.h"
+#include "obj/NiFloatData.h"
+#include "gen/KeyGroup.h"
 
 //Definition of TYPE constant
 const Type NiFloatData::TYPE("NiFloatData", &NI_FLOAT_DATA_PARENT::TYPE );
diff --git a/obj/NiFloatData.h b/obj/NiFloatData.h
index 4e2e4b9c6c013d3118274b34c03b9c57622ebe1b..8a0567734e4fc44ad3db506bd8e9c7bfdfd90d4b 100644
--- a/obj/NiFloatData.h
+++ b/obj/NiFloatData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIFLOATDATA_H_
 #define _NIFLOATDATA_H_
 
+#include "AKeyedData.h"
+#include "gen/KeyGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_FLOAT_DATA_INCLUDE
 
 /*
  * NiFloatData
diff --git a/obj/NiFloatExtraData.cpp b/obj/NiFloatExtraData.cpp
index 3a5cc36eec6ace1935fe0d7653ceca0683c16517..ff96756684977f68ae5637915ca7bd20859759e6 100644
--- a/obj/NiFloatExtraData.cpp
+++ b/obj/NiFloatExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiFloatExtraData.h"
+#include "obj/NiFloatExtraData.h"
 
 //Definition of TYPE constant
 const Type NiFloatExtraData::TYPE("NiFloatExtraData", &NI_FLOAT_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiFloatExtraData.h b/obj/NiFloatExtraData.h
index 6657cc7a78bfd05b533f89f04fdd36efa4b0cbe7..a0b359fad762d484eabe0977d3e52c2ed11d133a 100644
--- a/obj/NiFloatExtraData.h
+++ b/obj/NiFloatExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIFLOATEXTRADATA_H_
 #define _NIFLOATEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_FLOAT_EXTRA_DATA_INCLUDE
 
 /*
  * NiFloatExtraData
diff --git a/obj/NiFloatExtraDataController.cpp b/obj/NiFloatExtraDataController.cpp
index 546290d6d96f8121bb719c6d7afdfde9446a9843..c439f7433636b304926ddff0f0e2fd4c894a1713 100644
--- a/obj/NiFloatExtraDataController.cpp
+++ b/obj/NiFloatExtraDataController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiFloatExtraDataController.h"
-#include "NiObject.h"
+#include "obj/NiFloatExtraDataController.h"
 
 //Definition of TYPE constant
 const Type NiFloatExtraDataController::TYPE("NiFloatExtraDataController", &NI_FLOAT_EXTRA_DATA_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiFloatExtraDataController.h b/obj/NiFloatExtraDataController.h
index a72c60ebf11b5fffcd12f2f640dcb5c5c61c408f..1379c1b6a528dc046bd3ede01400cf4e9beedcb8 100644
--- a/obj/NiFloatExtraDataController.h
+++ b/obj/NiFloatExtraDataController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIFLOATEXTRADATACONTROLLER_H_
 #define _NIFLOATEXTRADATACONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_FLOAT_EXTRA_DATA_CONTROLLER_INCLUDE
 
 /*
  * NiFloatExtraDataController
diff --git a/obj/NiFloatInterpolator.cpp b/obj/NiFloatInterpolator.cpp
index 81457d0e46bb6283a99c2e0b6ad88efcdfd1e4fb..f2a795ca1203b4f96d505b6707d694d28339a744 100644
--- a/obj/NiFloatInterpolator.cpp
+++ b/obj/NiFloatInterpolator.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiFloatInterpolator.h"
-#include "NiFloatData.h"
+#include "obj/NiFloatInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiFloatInterpolator::TYPE("NiFloatInterpolator", &NI_FLOAT_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiFloatInterpolator.h b/obj/NiFloatInterpolator.h
index b116373fdaec02111ede7f484cd74110f97cd152..8aca0878f9685be2aa1eab1ff979ba06a2e47356 100644
--- a/obj/NiFloatInterpolator.h
+++ b/obj/NiFloatInterpolator.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIFLOATINTERPOLATOR_H_
 #define _NIFLOATINTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+#include "Ref.h"
+#include "obj/NiFloatData.h"
+
 #include "gen/obj_defines.h"
-#include NI_FLOAT_INTERPOLATOR_INCLUDE
 
 /*
  * NiFloatInterpolator
diff --git a/obj/NiFloatsExtraData.cpp b/obj/NiFloatsExtraData.cpp
index cc2a67facbcadaba451e6b9d4c67795f6bdaf678..665ee907d51bcb3b3cd9e8a0372ef556fb13f528 100644
--- a/obj/NiFloatsExtraData.cpp
+++ b/obj/NiFloatsExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiFloatsExtraData.h"
+#include "obj/NiFloatsExtraData.h"
 
 //Definition of TYPE constant
 const Type NiFloatsExtraData::TYPE("NiFloatsExtraData", &NI_FLOATS_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiFloatsExtraData.h b/obj/NiFloatsExtraData.h
index 3202b9c536c6ca2a120db8a8fdd268e3562ce5ce..4abd7e75367aa3b96b49eb279707e8ad0d748115 100644
--- a/obj/NiFloatsExtraData.h
+++ b/obj/NiFloatsExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIFLOATSEXTRADATA_H_
 #define _NIFLOATSEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_FLOATS_EXTRA_DATA_INCLUDE
 
 /*
  * NiFloatsExtraData
diff --git a/obj/NiFogProperty.cpp b/obj/NiFogProperty.cpp
index 24f5f2fd36b131b5f41aa8d0f12fb9ff934d55c4..a3ce9992e35a3fbc68c40bfd1dc24f38527d1b66 100644
--- a/obj/NiFogProperty.cpp
+++ b/obj/NiFogProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiFogProperty.h"
+#include "obj/NiFogProperty.h"
 
 //Definition of TYPE constant
 const Type NiFogProperty::TYPE("NiFogProperty", &NI_FOG_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiFogProperty.h b/obj/NiFogProperty.h
index 23c6b5546542b48e6a0f4a336362da4b745371d3..4567e1b7ad622b63242c9a68423d8f91fa0f38fd 100644
--- a/obj/NiFogProperty.h
+++ b/obj/NiFogProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIFOGPROPERTY_H_
 #define _NIFOGPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_FOG_PROPERTY_INCLUDE
 
 /*
  * NiFogProperty
diff --git a/obj/NiGeomMorpherController.cpp b/obj/NiGeomMorpherController.cpp
index b243a84fbc5d604028bb74f8210c00ac6247268b..844e6646de56485e996bbd22307b874cec668a76 100644
--- a/obj/NiGeomMorpherController.cpp
+++ b/obj/NiGeomMorpherController.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiGeomMorpherController.h"
-#include "NiMorphData.h"
-#include "NiInterpolator.h"
+#include "obj/NiGeomMorpherController.h"
 
 //Definition of TYPE constant
 const Type NiGeomMorpherController::TYPE("NiGeomMorpherController", &NI_GEOM_MORPHER_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiGeomMorpherController.h b/obj/NiGeomMorpherController.h
index df116b5b558aca9c786fc78b427822b55e8e2f2d..21a04f8a04853c7273ebbdf3aed214297014b70b 100644
--- a/obj/NiGeomMorpherController.h
+++ b/obj/NiGeomMorpherController.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIGEOMMORPHERCONTROLLER_H_
 #define _NIGEOMMORPHERCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiMorphData.h"
+#include "obj/NiInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_GEOM_MORPHER_CONTROLLER_INCLUDE
 
 /*
  * NiGeomMorpherController
diff --git a/obj/NiGravity.cpp b/obj/NiGravity.cpp
index f7eea5d9ef2eb2aa509855f40992cc00ee0def87..87073626a5557e0869e38dba6853ce581619b1d7 100644
--- a/obj/NiGravity.cpp
+++ b/obj/NiGravity.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiGravity.h"
+#include "obj/NiGravity.h"
 
 //Definition of TYPE constant
 const Type NiGravity::TYPE("NiGravity", &NI_GRAVITY_PARENT::TYPE );
diff --git a/obj/NiGravity.h b/obj/NiGravity.h
index 433cdf0372e1ce88f1348978ea0855da7a32db93..023d8da7b786a9262d4cb718dae00b9f474a035b 100644
--- a/obj/NiGravity.h
+++ b/obj/NiGravity.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIGRAVITY_H_
 #define _NIGRAVITY_H_
 
+#include "AParticleModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_GRAVITY_INCLUDE
 
 /*
  * NiGravity
diff --git a/obj/NiIntegerExtraData.cpp b/obj/NiIntegerExtraData.cpp
index 66d9c0754c86f61ac15c3e8c74f78b9cee565e46..a50aff6f253c6013f50e86731955d021d10e94ab 100644
--- a/obj/NiIntegerExtraData.cpp
+++ b/obj/NiIntegerExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiIntegerExtraData.h"
+#include "obj/NiIntegerExtraData.h"
 
 //Definition of TYPE constant
 const Type NiIntegerExtraData::TYPE("NiIntegerExtraData", &NI_INTEGER_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiIntegerExtraData.h b/obj/NiIntegerExtraData.h
index e3152e63e7ca94b9319f292947c37ef3dfc7683a..d164271dbfe045f20bcd3f08a13c8aca6a2654b1 100644
--- a/obj/NiIntegerExtraData.h
+++ b/obj/NiIntegerExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIINTEGEREXTRADATA_H_
 #define _NIINTEGEREXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_INTEGER_EXTRA_DATA_INCLUDE
 
 /*
  * NiIntegerExtraData
diff --git a/obj/NiIntegersExtraData.cpp b/obj/NiIntegersExtraData.cpp
index d084a35ea7642a61f2159f877a2c4c36a73c149d..1ab06e49af9a4d4e387d34cb610990593834234d 100644
--- a/obj/NiIntegersExtraData.cpp
+++ b/obj/NiIntegersExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiIntegersExtraData.h"
+#include "obj/NiIntegersExtraData.h"
 
 //Definition of TYPE constant
 const Type NiIntegersExtraData::TYPE("NiIntegersExtraData", &NI_INTEGERS_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiIntegersExtraData.h b/obj/NiIntegersExtraData.h
index 6fe72ab7b02eab9bf8a28f8a75224c26227384c1..a74d4f63560c75c2e15648b45c1ed120369a4878 100644
--- a/obj/NiIntegersExtraData.h
+++ b/obj/NiIntegersExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIINTEGERSEXTRADATA_H_
 #define _NIINTEGERSEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_INTEGERS_EXTRA_DATA_INCLUDE
 
 /*
  * NiIntegersExtraData
diff --git a/obj/NiInterpolator.cpp b/obj/NiInterpolator.cpp
index 3ed20dd4b272ba241fef425488aced1e04be9fb6..167a45289d3c1f4c738457654e1f5dcf4437bb27 100644
--- a/obj/NiInterpolator.cpp
+++ b/obj/NiInterpolator.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiInterpolator.h"
+#include "obj/NiInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiInterpolator::TYPE("NiInterpolator", &NI_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiInterpolator.h b/obj/NiInterpolator.h
index 09ccec4f55592223dd5f0b0dbde3fcd049baf981..3496961dfc218bf241704cdaf9ea6f0a9e1bac6f 100644
--- a/obj/NiInterpolator.h
+++ b/obj/NiInterpolator.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIINTERPOLATOR_H_
 #define _NIINTERPOLATOR_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_INTERPOLATOR_INCLUDE
 
 /*
  * NiInterpolator
diff --git a/obj/NiKeyframeController.cpp b/obj/NiKeyframeController.cpp
index ab08ddbeb8dabb2cb2d32cdebf2b23a192ca68c4..9198718b4f275df2dd5ef13a02d83af9d6706aee 100644
--- a/obj/NiKeyframeController.cpp
+++ b/obj/NiKeyframeController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiKeyframeController.h"
-#include "NiKeyframeData.h"
+#include "obj/NiKeyframeController.h"
 
 //Definition of TYPE constant
 const Type NiKeyframeController::TYPE("NiKeyframeController", &NI_KEYFRAME_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiKeyframeController.h b/obj/NiKeyframeController.h
index 1578d7af37f52d79ac7ba1a6ec32a0a38a3f7998..bba445f66cc3eee9437bef65cff2236ce6ab642c 100644
--- a/obj/NiKeyframeController.h
+++ b/obj/NiKeyframeController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIKEYFRAMECONTROLLER_H_
 #define _NIKEYFRAMECONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiKeyframeData.h"
+
 #include "gen/obj_defines.h"
-#include NI_KEYFRAME_CONTROLLER_INCLUDE
 
 /*
  * NiKeyframeController
diff --git a/obj/NiKeyframeData.cpp b/obj/NiKeyframeData.cpp
index 81f43815830252bbcb2c8753335cb430c939cae1..379887f5a6ba5f9f8a0438afbede0c122cf07bf2 100644
--- a/obj/NiKeyframeData.cpp
+++ b/obj/NiKeyframeData.cpp
@@ -1,7 +1,10 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiKeyframeData.h"
+#include "obj/NiKeyframeData.h"
+#include "gen/KeyGroup.h"
+#include "gen/KeyGroup.h"
+#include "gen/KeyGroup.h"
 
 //Definition of TYPE constant
 const Type NiKeyframeData::TYPE("NiKeyframeData", &NI_KEYFRAME_DATA_PARENT::TYPE );
diff --git a/obj/NiKeyframeData.h b/obj/NiKeyframeData.h
index d04b7363d5e8787ddaf6f0bab02b490b66cc330d..434a72f5dfbb96a504e02ff7091b4b2493033657 100644
--- a/obj/NiKeyframeData.h
+++ b/obj/NiKeyframeData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIKEYFRAMEDATA_H_
 #define _NIKEYFRAMEDATA_H_
 
+#include "AKeyedData.h"
+#include "gen/KeyGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_KEYFRAME_DATA_INCLUDE
 
 /*
  * NiKeyframeData
diff --git a/obj/NiLODNode.cpp b/obj/NiLODNode.cpp
index bc146935c361640452008ba1c3e79ca5ee3ee940..62103d6b66876ea39f95909dc17dd87dca1ef579 100644
--- a/obj/NiLODNode.cpp
+++ b/obj/NiLODNode.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiLODNode.h"
-#include "NiRangeLODData.h"
+#include "obj/NiLODNode.h"
+#include "gen/LODRange.h"
 
 //Definition of TYPE constant
 const Type NiLODNode::TYPE("NiLODNode", &NI_L_O_D_NODE_PARENT::TYPE );
diff --git a/obj/NiLODNode.h b/obj/NiLODNode.h
index 0a93cce9025d0799e00b5ad1e36496e1816275ce..a4c6bce564e84bd45a377f13cc73e69b239fb7c6 100644
--- a/obj/NiLODNode.h
+++ b/obj/NiLODNode.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NILODNODE_H_
 #define _NILODNODE_H_
 
+#include "NiNode.h"
+#include "gen/LODRange.h"
+#include "Ref.h"
+#include "obj/NiRangeLODData.h"
+
 #include "gen/obj_defines.h"
-#include NI_L_O_D_NODE_INCLUDE
 
 /*
  * NiLODNode
diff --git a/obj/NiLight.cpp b/obj/NiLight.cpp
index d27ecbbe39abf6f7b59abdfea48ea514e2a4cc7b..e0a2791e356dda8c5ad56ee2facfe599c3c1ff60 100644
--- a/obj/NiLight.cpp
+++ b/obj/NiLight.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiLight.h"
+#include "obj/NiLight.h"
 
 //Definition of TYPE constant
 const Type NiLight::TYPE("NiLight", &NI_LIGHT_PARENT::TYPE );
diff --git a/obj/NiLight.h b/obj/NiLight.h
index 5bc5c6523bdec6362241dda86376a43bd77908f5..c1c67d0ca0ddec42326638112bfad7632ac62122 100644
--- a/obj/NiLight.h
+++ b/obj/NiLight.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NILIGHT_H_
 #define _NILIGHT_H_
 
+#include "NiDynamicEffect.h"
+
 #include "gen/obj_defines.h"
-#include NI_LIGHT_INCLUDE
 
 /*
  * NiLight
diff --git a/obj/NiLightColorController.cpp b/obj/NiLightColorController.cpp
index c8a05ce863017ec8618052ba4e501cc66f9d95b0..3fd04506c05f887922f1ce7abb68dcd5fa845151 100644
--- a/obj/NiLightColorController.cpp
+++ b/obj/NiLightColorController.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiLightColorController.h"
-#include "NiPosData.h"
-#include "NiPoint3Interpolator.h"
+#include "obj/NiLightColorController.h"
 
 //Definition of TYPE constant
 const Type NiLightColorController::TYPE("NiLightColorController", &NI_LIGHT_COLOR_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiLightColorController.h b/obj/NiLightColorController.h
index e9606272b0a8e7b826fb1d1f1f583d022cdd58ce..44c7cfd3ec6da3da6602f72a842ca33f66befe7b 100644
--- a/obj/NiLightColorController.h
+++ b/obj/NiLightColorController.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NILIGHTCOLORCONTROLLER_H_
 #define _NILIGHTCOLORCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiPosData.h"
+#include "obj/NiPoint3Interpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_LIGHT_COLOR_CONTROLLER_INCLUDE
 
 /*
  * NiLightColorController
diff --git a/obj/NiLightDimmerController.cpp b/obj/NiLightDimmerController.cpp
index c0fb13f6582a598ed12ac1390bcc0f5872aff96c..4488fab3b8134cc624dc752ecd5a8096058a35d5 100644
--- a/obj/NiLightDimmerController.cpp
+++ b/obj/NiLightDimmerController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiLightDimmerController.h"
-#include "NiInterpolator.h"
+#include "obj/NiLightDimmerController.h"
 
 //Definition of TYPE constant
 const Type NiLightDimmerController::TYPE("NiLightDimmerController", &NI_LIGHT_DIMMER_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiLightDimmerController.h b/obj/NiLightDimmerController.h
index 74b2d6be84483ee309cfa870d4e152c808332283..13da433ac1c9bd9ee7f9f94b894f7ab1cab22959 100644
--- a/obj/NiLightDimmerController.h
+++ b/obj/NiLightDimmerController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NILIGHTDIMMERCONTROLLER_H_
 #define _NILIGHTDIMMERCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_LIGHT_DIMMER_CONTROLLER_INCLUDE
 
 /*
  * NiLightDimmerController
diff --git a/obj/NiLookAtController.cpp b/obj/NiLookAtController.cpp
index 0c7ca42139b913e2094676e7bdcdf8bc969a8f2c..fb068ef331f343163e730019da6cce5b3fb3e196 100644
--- a/obj/NiLookAtController.cpp
+++ b/obj/NiLookAtController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiLookAtController.h"
-#include "NiNode.h"
+#include "obj/NiLookAtController.h"
 
 //Definition of TYPE constant
 const Type NiLookAtController::TYPE("NiLookAtController", &NI_LOOK_AT_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiLookAtController.h b/obj/NiLookAtController.h
index 01b435136bd38f45af861c9660b3bbf420bf58ae..375402fb808ebe0e8d3b30b85c72c64d97af765f 100644
--- a/obj/NiLookAtController.h
+++ b/obj/NiLookAtController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NILOOKATCONTROLLER_H_
 #define _NILOOKATCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiNode.h"
+
 #include "gen/obj_defines.h"
-#include NI_LOOK_AT_CONTROLLER_INCLUDE
 
 /*
  * NiLookAtController
diff --git a/obj/NiLookAtInterpolator.cpp b/obj/NiLookAtInterpolator.cpp
index b4f5660cd5bbb3f310a28942bba8dcd484b70a0e..85970f9229ccf182d02e93ce82b943700f16fd39 100644
--- a/obj/NiLookAtInterpolator.cpp
+++ b/obj/NiLookAtInterpolator.cpp
@@ -1,11 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiLookAtInterpolator.h"
-#include "NiNode.h"
-#include "NiPoint3Interpolator.h"
-#include "NiFloatInterpolator.h"
-#include "NiFloatInterpolator.h"
+#include "obj/NiLookAtInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiLookAtInterpolator::TYPE("NiLookAtInterpolator", &NI_LOOK_AT_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiLookAtInterpolator.h b/obj/NiLookAtInterpolator.h
index 54d247f0e92aca7bcf9be8114f481c9fe3c3e3c3..e954d71f97b642c434e970990d8af2be2d072ca9 100644
--- a/obj/NiLookAtInterpolator.h
+++ b/obj/NiLookAtInterpolator.h
@@ -4,8 +4,13 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NILOOKATINTERPOLATOR_H_
 #define _NILOOKATINTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+#include "Ref.h"
+#include "obj/NiNode.h"
+#include "obj/NiPoint3Interpolator.h"
+#include "obj/NiFloatInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_LOOK_AT_INTERPOLATOR_INCLUDE
 
 /*
  * NiLookAtInterpolator
diff --git a/obj/NiMaterialColorController.cpp b/obj/NiMaterialColorController.cpp
index bb5f9deea4cfad1d84a1beb49f4eec1d709dc155..3bba51354711d37e619c0a79fe280b323141dc45 100644
--- a/obj/NiMaterialColorController.cpp
+++ b/obj/NiMaterialColorController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiMaterialColorController.h"
-#include "NiPosData.h"
+#include "obj/NiMaterialColorController.h"
 
 //Definition of TYPE constant
 const Type NiMaterialColorController::TYPE("NiMaterialColorController", &NI_MATERIAL_COLOR_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiMaterialColorController.h b/obj/NiMaterialColorController.h
index 721a1f338b0792dbffbfcc0168b7516c913b5453..294cf2cd1144dc1aa8d588641791a42d714bc75e 100644
--- a/obj/NiMaterialColorController.h
+++ b/obj/NiMaterialColorController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIMATERIALCOLORCONTROLLER_H_
 #define _NIMATERIALCOLORCONTROLLER_H_
 
+#include "NiSingleInterpolatorController.h"
+#include "Ref.h"
+#include "obj/NiPosData.h"
+
 #include "gen/obj_defines.h"
-#include NI_MATERIAL_COLOR_CONTROLLER_INCLUDE
 
 /*
  * NiMaterialColorController
diff --git a/obj/NiMaterialProperty.cpp b/obj/NiMaterialProperty.cpp
index c0eb9f1aa86bca512cfbeac3a5a47e47e66bba33..858bdbbe9b79d3a79880f70038b5e2ec57b3f6e3 100644
--- a/obj/NiMaterialProperty.cpp
+++ b/obj/NiMaterialProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiMaterialProperty.h"
+#include "obj/NiMaterialProperty.h"
 
 //Definition of TYPE constant
 const Type NiMaterialProperty::TYPE("NiMaterialProperty", &NI_MATERIAL_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiMaterialProperty.h b/obj/NiMaterialProperty.h
index c92670e88b61a79144683c68f7cec3efb3200569..1a386e20b2f41c81a86c6e69039bfc170e739dc2 100644
--- a/obj/NiMaterialProperty.h
+++ b/obj/NiMaterialProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIMATERIALPROPERTY_H_
 #define _NIMATERIALPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_MATERIAL_PROPERTY_INCLUDE
 
 /*
  * NiMaterialProperty
diff --git a/obj/NiMeshPSysData.cpp b/obj/NiMeshPSysData.cpp
index b4f95cae5ff1d04737f4623cdd1a2c326e0dc6d9..6e7ee1aaf0de7e1663030ddfacd31f948040858d 100644
--- a/obj/NiMeshPSysData.cpp
+++ b/obj/NiMeshPSysData.cpp
@@ -1,10 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiMeshPSysData.h"
-#include "AParticleModifier.h"
-#include "AParticleModifier.h"
-#include "NiNode.h"
+#include "obj/NiMeshPSysData.h"
 
 //Definition of TYPE constant
 const Type NiMeshPSysData::TYPE("NiMeshPSysData", &NI_MESH_P_SYS_DATA_PARENT::TYPE );
@@ -26,7 +23,7 @@ string NiMeshPSysData::asString( bool verbose ) const {
 }
 
 void NiMeshPSysData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version ) {
-	NI_MESH_P_SYS_DATA_FIXLINKS
+  NI_MESH_P_SYS_DATA_FIXLINKS
 }
 
 const Type & NiMeshPSysData::GetType() const {
diff --git a/obj/NiMeshPSysData.h b/obj/NiMeshPSysData.h
index 6530f77a7ee3f147a854fd3c104035b450e58c90..3962e89edfed7e09f12ea27d9bb64422c972c109 100644
--- a/obj/NiMeshPSysData.h
+++ b/obj/NiMeshPSysData.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIMESHPSYSDATA_H_
 #define _NIMESHPSYSDATA_H_
 
+#include "APSysData.h"
+#include "Ref.h"
+#include "obj/AParticleModifier.h"
+#include "obj/NiNode.h"
+
 #include "gen/obj_defines.h"
-#include NI_MESH_P_SYS_DATA_INCLUDE
 
 /*
  * NiMeshPSysData
diff --git a/obj/NiMeshParticleSystem.cpp b/obj/NiMeshParticleSystem.cpp
index de5c97e1fceaee25b11fb39760b65eccac448706..90b42e45ff62837e75fabb69d49aa3850fe69615 100644
--- a/obj/NiMeshParticleSystem.cpp
+++ b/obj/NiMeshParticleSystem.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiMeshParticleSystem.h"
+#include "obj/NiMeshParticleSystem.h"
 
 //Definition of TYPE constant
 const Type NiMeshParticleSystem::TYPE("NiMeshParticleSystem", &NI_MESH_PARTICLE_SYSTEM_PARENT::TYPE );
diff --git a/obj/NiMeshParticleSystem.h b/obj/NiMeshParticleSystem.h
index 1075278194b779d84aeceb82e8735d03009b2451..a9e6bb3c25758c90068152d9a424c2ca6b763f42 100644
--- a/obj/NiMeshParticleSystem.h
+++ b/obj/NiMeshParticleSystem.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIMESHPARTICLESYSTEM_H_
 #define _NIMESHPARTICLESYSTEM_H_
 
+#include "NiParticleSystem.h"
+
 #include "gen/obj_defines.h"
-#include NI_MESH_PARTICLE_SYSTEM_INCLUDE
 
 /*
  * NiMeshParticleSystem
diff --git a/obj/NiMorphData.cpp b/obj/NiMorphData.cpp
index 53b6816cdf62ff90c870ecd276fd718a6dead239..9507ee47af61b7265323435d0678ae1f87589c6d 100644
--- a/obj/NiMorphData.cpp
+++ b/obj/NiMorphData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiMorphData.h"
+#include "obj/NiMorphData.h"
+#include "gen/Morph.h"
 
 //Definition of TYPE constant
 const Type NiMorphData::TYPE("NiMorphData", &NI_MORPH_DATA_PARENT::TYPE );
diff --git a/obj/NiMorphData.h b/obj/NiMorphData.h
index 4f33553cfde646a322b0ae6ef47844c9fba350a4..6ca5bf972b4cfc6178cff6346f8bc2499e288418 100644
--- a/obj/NiMorphData.h
+++ b/obj/NiMorphData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIMORPHDATA_H_
 #define _NIMORPHDATA_H_
 
+#include "NiObject.h"
+#include "gen/Morph.h"
+
 #include "gen/obj_defines.h"
-#include NI_MORPH_DATA_INCLUDE
 
 /*
  * NiMorphData
diff --git a/obj/NiMultiTargetTransformController.cpp b/obj/NiMultiTargetTransformController.cpp
index 6dbfa704534ae9760a04cf70f74fc768e7b29039..8e9584a5582f2a7c946fccaec06fac9cf3aabc81 100644
--- a/obj/NiMultiTargetTransformController.cpp
+++ b/obj/NiMultiTargetTransformController.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiMultiTargetTransformController.h"
-#include "NiNode.h"
+#include "obj/NiMultiTargetTransformController.h"
+#include "obj/NiNode.h"
 
 //Definition of TYPE constant
 const Type NiMultiTargetTransformController::TYPE("NiMultiTargetTransformController", &NI_MULTI_TARGET_TRANSFORM_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiMultiTargetTransformController.h b/obj/NiMultiTargetTransformController.h
index 9a69900ba3d75e7aadcea9fec7629f175b58e0bf..c33b759125a1b2eb9a8a546556f874d224166777 100644
--- a/obj/NiMultiTargetTransformController.h
+++ b/obj/NiMultiTargetTransformController.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIMULTITARGETTRANSFORMCONTROLLER_H_
 #define _NIMULTITARGETTRANSFORMCONTROLLER_H_
 
+#include "NiTimeController.h"
+class NiNode;
+
 #include "gen/obj_defines.h"
-#include NI_MULTI_TARGET_TRANSFORM_CONTROLLER_INCLUDE
 
 /*
  * NiMultiTargetTransformController
diff --git a/obj/NiNode.cpp b/obj/NiNode.cpp
index 358c6ab62f9005c884b403c75bd789551492f5cf..ada1f7ecfa5348db919feb4f788ea1aa4ce26587 100644
--- a/obj/NiNode.cpp
+++ b/obj/NiNode.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiNode.h"
-#include "NiAVObject.h"
-#include "NiDynamicEffect.h"
+#include "obj/NiNode.h"
 
 //Definition of TYPE constant
 const Type NiNode::TYPE("NiNode", &NI_NODE_PARENT::TYPE );
diff --git a/obj/NiNode.h b/obj/NiNode.h
index b17f4b3eaac05eb9261999f5b50bb5819b0232a9..637a9b28086e1649ecdd4b85bffe3074f47e0e63 100644
--- a/obj/NiNode.h
+++ b/obj/NiNode.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NINODE_H_
 #define _NINODE_H_
 
+#include "NiAVObject.h"
+#include "Ref.h"
+#include "obj/NiAVObject.h"
+#include "obj/NiDynamicEffect.h"
+
 #include "gen/obj_defines.h"
-#include NI_NODE_INCLUDE
 
 /*
  * NiNode
diff --git a/obj/NiPSysAgeDeathModifier.cpp b/obj/NiPSysAgeDeathModifier.cpp
index fd702f07aeb89064bbb0323df86c7e9900530e38..43bf2f75c79b5658f1641493064dbef380f477a9 100644
--- a/obj/NiPSysAgeDeathModifier.cpp
+++ b/obj/NiPSysAgeDeathModifier.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysAgeDeathModifier.h"
-#include "NiPSysSpawnModifier.h"
+#include "obj/NiPSysAgeDeathModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysAgeDeathModifier::TYPE("NiPSysAgeDeathModifier", &NI_P_SYS_AGE_DEATH_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysAgeDeathModifier.h b/obj/NiPSysAgeDeathModifier.h
index aa3d01712490ddc249eb9a76e2bcd8be3ef766c8..c3d63c363924a17b47ee92459f2cedfcda126115 100644
--- a/obj/NiPSysAgeDeathModifier.h
+++ b/obj/NiPSysAgeDeathModifier.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSAGEDEATHMODIFIER_H_
 #define _NIPSYSAGEDEATHMODIFIER_H_
 
+#include "NiPSysModifier.h"
+#include "Ref.h"
+#include "obj/NiPSysSpawnModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_AGE_DEATH_MODIFIER_INCLUDE
 
 /*
  * NiPSysAgeDeathModifier
diff --git a/obj/NiPSysBombModifier.cpp b/obj/NiPSysBombModifier.cpp
index a0e49b533c52eaeebd94c00150d5adabb0a10e32..3a39130daa104c2a5c3d6540088f0f1e1610776c 100644
--- a/obj/NiPSysBombModifier.cpp
+++ b/obj/NiPSysBombModifier.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysBombModifier.h"
-#include "NiNode.h"
+#include "obj/NiPSysBombModifier.h"
+#include "obj/NiNode.h"
 
 //Definition of TYPE constant
 const Type NiPSysBombModifier::TYPE("NiPSysBombModifier", &NI_P_SYS_BOMB_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysBombModifier.h b/obj/NiPSysBombModifier.h
index c5e1e47666ae255d38010235ed12b7efe913c922..fa0afa2c11e11a7a4d87a6b7c5da2656e1ea40bc 100644
--- a/obj/NiPSysBombModifier.h
+++ b/obj/NiPSysBombModifier.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSBOMBMODIFIER_H_
 #define _NIPSYSBOMBMODIFIER_H_
 
+#include "NiPSysModifier.h"
+class NiNode;
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_BOMB_MODIFIER_INCLUDE
 
 /*
  * NiPSysBombModifier
diff --git a/obj/NiPSysBoundUpdateModifier.cpp b/obj/NiPSysBoundUpdateModifier.cpp
index d34e7447add416b6d033d8cd7116b6dc644e6b47..29503962d74fcd49ff646d64a42e822836c8dd6f 100644
--- a/obj/NiPSysBoundUpdateModifier.cpp
+++ b/obj/NiPSysBoundUpdateModifier.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysBoundUpdateModifier.h"
+#include "obj/NiPSysBoundUpdateModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysBoundUpdateModifier::TYPE("NiPSysBoundUpdateModifier", &NI_P_SYS_BOUND_UPDATE_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysBoundUpdateModifier.h b/obj/NiPSysBoundUpdateModifier.h
index b194e857a8a42166e4dc190d332ef6fec994076f..ac32b70312c5588346ae6751bec8729c93c9252a 100644
--- a/obj/NiPSysBoundUpdateModifier.h
+++ b/obj/NiPSysBoundUpdateModifier.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSBOUNDUPDATEMODIFIER_H_
 #define _NIPSYSBOUNDUPDATEMODIFIER_H_
 
+#include "NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_BOUND_UPDATE_MODIFIER_INCLUDE
 
 /*
  * NiPSysBoundUpdateModifier
diff --git a/obj/NiPSysBoxEmitter.cpp b/obj/NiPSysBoxEmitter.cpp
index 153b5c87c2d4a339d8da0a315423fd784bf03d46..1d5a6795985a8d7f8fadb7813f3cde42930831dc 100644
--- a/obj/NiPSysBoxEmitter.cpp
+++ b/obj/NiPSysBoxEmitter.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysBoxEmitter.h"
+#include "obj/NiPSysBoxEmitter.h"
 
 //Definition of TYPE constant
 const Type NiPSysBoxEmitter::TYPE("NiPSysBoxEmitter", &NI_P_SYS_BOX_EMITTER_PARENT::TYPE );
diff --git a/obj/NiPSysBoxEmitter.h b/obj/NiPSysBoxEmitter.h
index d02c7e14cedd54dfd7721b4126f1594075d679e3..0234594f41f90b00efab714e63d087ce5dbf9931 100644
--- a/obj/NiPSysBoxEmitter.h
+++ b/obj/NiPSysBoxEmitter.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSBOXEMITTER_H_
 #define _NIPSYSBOXEMITTER_H_
 
+#include "NiPSysVolumeEmitter.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_BOX_EMITTER_INCLUDE
 
 /*
  * NiPSysBoxEmitter
diff --git a/obj/NiPSysColliderManager.cpp b/obj/NiPSysColliderManager.cpp
index f3b7b0ca8fd43ae3433cad83f392364112285531..e55fd3c8c524438eb96bb044ce065a3e18419d0d 100644
--- a/obj/NiPSysColliderManager.cpp
+++ b/obj/NiPSysColliderManager.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysColliderManager.h"
-#include "NiPSysPlanarCollider.h"
+#include "obj/NiPSysColliderManager.h"
 
 //Definition of TYPE constant
 const Type NiPSysColliderManager::TYPE("NiPSysColliderManager", &NI_P_SYS_COLLIDER_MANAGER_PARENT::TYPE );
diff --git a/obj/NiPSysColliderManager.h b/obj/NiPSysColliderManager.h
index 26e941d385a3cc18f2411c402c437535626c8415..8cdbc34af2e205155b87b1ec9297c5fc8741d9c8 100644
--- a/obj/NiPSysColliderManager.h
+++ b/obj/NiPSysColliderManager.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSCOLLIDERMANAGER_H_
 #define _NIPSYSCOLLIDERMANAGER_H_
 
+#include "NiPSysModifier.h"
+#include "Ref.h"
+#include "obj/NiPSysPlanarCollider.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_COLLIDER_MANAGER_INCLUDE
 
 /*
  * NiPSysColliderManager
diff --git a/obj/NiPSysColorModifier.cpp b/obj/NiPSysColorModifier.cpp
index 418332d19b93436dbb02f3a42ad53e6bd6015de0..d3eb56c865995fe8274bdb7b6681a1a3acab8b5a 100644
--- a/obj/NiPSysColorModifier.cpp
+++ b/obj/NiPSysColorModifier.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysColorModifier.h"
-#include "NiColorData.h"
+#include "obj/NiPSysColorModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysColorModifier::TYPE("NiPSysColorModifier", &NI_P_SYS_COLOR_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysColorModifier.h b/obj/NiPSysColorModifier.h
index 05b2bb622cd85bda9ad1786b1e795471809aaef7..aa736713e0bad87214dc532526ddfcf154806b2a 100644
--- a/obj/NiPSysColorModifier.h
+++ b/obj/NiPSysColorModifier.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSCOLORMODIFIER_H_
 #define _NIPSYSCOLORMODIFIER_H_
 
+#include "NiPSysModifier.h"
+#include "Ref.h"
+#include "obj/NiColorData.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_COLOR_MODIFIER_INCLUDE
 
 /*
  * NiPSysColorModifier
diff --git a/obj/NiPSysCylinderEmitter.cpp b/obj/NiPSysCylinderEmitter.cpp
index 2af131071854eff1f342dd5dcf38b9e48685fa0e..6b3066d5f70ee6d7817ece0a46da007173ccd263 100644
--- a/obj/NiPSysCylinderEmitter.cpp
+++ b/obj/NiPSysCylinderEmitter.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysCylinderEmitter.h"
+#include "obj/NiPSysCylinderEmitter.h"
 
 //Definition of TYPE constant
 const Type NiPSysCylinderEmitter::TYPE("NiPSysCylinderEmitter", &NI_P_SYS_CYLINDER_EMITTER_PARENT::TYPE );
diff --git a/obj/NiPSysCylinderEmitter.h b/obj/NiPSysCylinderEmitter.h
index 8dbe4ce067469cf09efc553650b110fdb2abe473..75830f6ec3f7e07bf8eb4b6e32805d8851e840d9 100644
--- a/obj/NiPSysCylinderEmitter.h
+++ b/obj/NiPSysCylinderEmitter.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSCYLINDEREMITTER_H_
 #define _NIPSYSCYLINDEREMITTER_H_
 
+#include "NiPSysVolumeEmitter.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_CYLINDER_EMITTER_INCLUDE
 
 /*
  * NiPSysCylinderEmitter
diff --git a/obj/NiPSysData.cpp b/obj/NiPSysData.cpp
index 6bc5fecf096a02686125a36087c1e44e6ee7132e..794c772969ea1fafd2dbbb67432de0f0099e6e4b 100644
--- a/obj/NiPSysData.cpp
+++ b/obj/NiPSysData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysData.h"
+#include "obj/NiPSysData.h"
 
 //Definition of TYPE constant
 const Type NiPSysData::TYPE("NiPSysData", &NI_P_SYS_DATA_PARENT::TYPE );
diff --git a/obj/NiPSysData.h b/obj/NiPSysData.h
index 4c6e076d5f69b44e7409902392adedd252979517..76cc27b79a8966478ba53ca81efbd3ab808a47bc 100644
--- a/obj/NiPSysData.h
+++ b/obj/NiPSysData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSDATA_H_
 #define _NIPSYSDATA_H_
 
+#include "APSysData.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_DATA_INCLUDE
 
 /*
  * NiPSysData
diff --git a/obj/NiPSysDragModifier.cpp b/obj/NiPSysDragModifier.cpp
index 29e369aa1d05aa5b6aae78a84311d59a76df6564..142cc1ee0740a3b50118031876611e25c675a507 100644
--- a/obj/NiPSysDragModifier.cpp
+++ b/obj/NiPSysDragModifier.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysDragModifier.h"
-#include "NiObject.h"
+#include "obj/NiPSysDragModifier.h"
+#include "obj/NiObject.h"
 
 //Definition of TYPE constant
 const Type NiPSysDragModifier::TYPE("NiPSysDragModifier", &NI_P_SYS_DRAG_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysDragModifier.h b/obj/NiPSysDragModifier.h
index 06e15f2c38e22d939d614eb8f4d2ef61c7e6d628..ddc4bba39b5ff84716ffee4e2e32187046540e3f 100644
--- a/obj/NiPSysDragModifier.h
+++ b/obj/NiPSysDragModifier.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSDRAGMODIFIER_H_
 #define _NIPSYSDRAGMODIFIER_H_
 
+#include "NiPSysModifier.h"
+class NiObject;
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_DRAG_MODIFIER_INCLUDE
 
 /*
  * NiPSysDragModifier
diff --git a/obj/NiPSysEmitter.cpp b/obj/NiPSysEmitter.cpp
index 48615f37559e78b56dffc1d9528ef7ebb3bfcc6e..0f6277b1049c3dfb5970416a6c56a7ac6418310d 100644
--- a/obj/NiPSysEmitter.cpp
+++ b/obj/NiPSysEmitter.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitter.h"
+#include "obj/NiPSysEmitter.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitter::TYPE("NiPSysEmitter", &NI_P_SYS_EMITTER_PARENT::TYPE );
diff --git a/obj/NiPSysEmitter.h b/obj/NiPSysEmitter.h
index b961a667db5173ecf5a29f9fd19cda72d1c2a2fc..f9dd484b9abf957927b43f1f1d9267753c3946c9 100644
--- a/obj/NiPSysEmitter.h
+++ b/obj/NiPSysEmitter.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTER_H_
 #define _NIPSYSEMITTER_H_
 
+#include "NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_INCLUDE
 
 /*
  * NiPSysEmitter
diff --git a/obj/NiPSysEmitterCtlr.cpp b/obj/NiPSysEmitterCtlr.cpp
index f387ba84ddcf7a010ab6e9ea10a282e0437ece51..610306b26573573e3d1532e7a92004583ef80b48 100644
--- a/obj/NiPSysEmitterCtlr.cpp
+++ b/obj/NiPSysEmitterCtlr.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitterCtlr.h"
-#include "NiInterpolator.h"
+#include "obj/NiPSysEmitterCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitterCtlr::TYPE("NiPSysEmitterCtlr", &NI_P_SYS_EMITTER_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysEmitterCtlr.h b/obj/NiPSysEmitterCtlr.h
index 9af3e3be8166401fe07181bd7c1d91d780384f31..2c8824c328f50a67a3505c305ac6415a9c2cd74b 100644
--- a/obj/NiPSysEmitterCtlr.h
+++ b/obj/NiPSysEmitterCtlr.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTERCTLR_H_
 #define _NIPSYSEMITTERCTLR_H_
 
+#include "APSysCtlr.h"
+#include "Ref.h"
+#include "obj/NiInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_CTLR_INCLUDE
 
 /*
  * NiPSysEmitterCtlr
diff --git a/obj/NiPSysEmitterCtlrData.cpp b/obj/NiPSysEmitterCtlrData.cpp
index c6046af72d10e940e7175c475f46e156be4da0ef..bfa063a45d7f7c8b29491a56919b82e26832d2f0 100644
--- a/obj/NiPSysEmitterCtlrData.cpp
+++ b/obj/NiPSysEmitterCtlrData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitterCtlrData.h"
+#include "obj/NiPSysEmitterCtlrData.h"
+#include "gen/KeyGroup.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitterCtlrData::TYPE("NiPSysEmitterCtlrData", &NI_P_SYS_EMITTER_CTLR_DATA_PARENT::TYPE );
diff --git a/obj/NiPSysEmitterCtlrData.h b/obj/NiPSysEmitterCtlrData.h
index 30901a8058d7bb0ed438e0f04b017c8231e9f70b..31bc2743c00e41b33a75f319cf218941962355fb 100644
--- a/obj/NiPSysEmitterCtlrData.h
+++ b/obj/NiPSysEmitterCtlrData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTERCTLRDATA_H_
 #define _NIPSYSEMITTERCTLRDATA_H_
 
+#include "NiObject.h"
+#include "gen/KeyGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_CTLR_DATA_INCLUDE
 
 /*
  * NiPSysEmitterCtlrData
diff --git a/obj/NiPSysEmitterDeclinationCtlr.cpp b/obj/NiPSysEmitterDeclinationCtlr.cpp
index b74f989d0b5708fb3d91eef396d94c60b9f03f88..84343086733ff2e807162457a067493b4d7b67e0 100644
--- a/obj/NiPSysEmitterDeclinationCtlr.cpp
+++ b/obj/NiPSysEmitterDeclinationCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitterDeclinationCtlr.h"
+#include "obj/NiPSysEmitterDeclinationCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitterDeclinationCtlr::TYPE("NiPSysEmitterDeclinationCtlr", &NI_P_SYS_EMITTER_DECLINATION_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysEmitterDeclinationCtlr.h b/obj/NiPSysEmitterDeclinationCtlr.h
index 311a6b7e73d414b307a69734e49ff0eace1b8505..42b1f4d7eb106c0a96f42a241ad2761026724798 100644
--- a/obj/NiPSysEmitterDeclinationCtlr.h
+++ b/obj/NiPSysEmitterDeclinationCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTERDECLINATIONCTLR_H_
 #define _NIPSYSEMITTERDECLINATIONCTLR_H_
 
+#include "APSysCtlr.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_DECLINATION_CTLR_INCLUDE
 
 /*
  * NiPSysEmitterDeclinationCtlr
diff --git a/obj/NiPSysEmitterDeclinationVarCtlr.cpp b/obj/NiPSysEmitterDeclinationVarCtlr.cpp
index 1f7bd010b6f73c4e7b76828996fb4e4482e3aaf8..710f5dede8200efec268bfe8abce007780cd606f 100644
--- a/obj/NiPSysEmitterDeclinationVarCtlr.cpp
+++ b/obj/NiPSysEmitterDeclinationVarCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitterDeclinationVarCtlr.h"
+#include "obj/NiPSysEmitterDeclinationVarCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitterDeclinationVarCtlr::TYPE("NiPSysEmitterDeclinationVarCtlr", &NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysEmitterDeclinationVarCtlr.h b/obj/NiPSysEmitterDeclinationVarCtlr.h
index e550336104608203ed68108707a2bc1def17e897..7aa7e1b0a49ee895f7a62022119d7ce7970c6833 100644
--- a/obj/NiPSysEmitterDeclinationVarCtlr.h
+++ b/obj/NiPSysEmitterDeclinationVarCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTERDECLINATIONVARCTLR_H_
 #define _NIPSYSEMITTERDECLINATIONVARCTLR_H_
 
+#include "APSysCtlr.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_INCLUDE
 
 /*
  * NiPSysEmitterDeclinationVarCtlr
diff --git a/obj/NiPSysEmitterInitialRadiusCtlr.cpp b/obj/NiPSysEmitterInitialRadiusCtlr.cpp
index 61cc5699424e831a9429770f6317f2cbf57a4e23..8b414d9a1ae2ae667b32d48c5c6cb6d203912745 100644
--- a/obj/NiPSysEmitterInitialRadiusCtlr.cpp
+++ b/obj/NiPSysEmitterInitialRadiusCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitterInitialRadiusCtlr.h"
+#include "obj/NiPSysEmitterInitialRadiusCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitterInitialRadiusCtlr::TYPE("NiPSysEmitterInitialRadiusCtlr", &NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysEmitterInitialRadiusCtlr.h b/obj/NiPSysEmitterInitialRadiusCtlr.h
index 19d8b378da130001548ef3d1ea57a95ae60abce0..1aca0843a1111dcc30258c7df0890569dcd3c607 100644
--- a/obj/NiPSysEmitterInitialRadiusCtlr.h
+++ b/obj/NiPSysEmitterInitialRadiusCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTERINITIALRADIUSCTLR_H_
 #define _NIPSYSEMITTERINITIALRADIUSCTLR_H_
 
+#include "APSysCtlr.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_INCLUDE
 
 /*
  * NiPSysEmitterInitialRadiusCtlr
diff --git a/obj/NiPSysEmitterLifeSpanCtlr.cpp b/obj/NiPSysEmitterLifeSpanCtlr.cpp
index c64e90d1f858bcf4a9f417dfad782dd10f6d6989..f185805f965f99cbe67e413dbf547d2854caba90 100644
--- a/obj/NiPSysEmitterLifeSpanCtlr.cpp
+++ b/obj/NiPSysEmitterLifeSpanCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitterLifeSpanCtlr.h"
+#include "obj/NiPSysEmitterLifeSpanCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitterLifeSpanCtlr::TYPE("NiPSysEmitterLifeSpanCtlr", &NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysEmitterLifeSpanCtlr.h b/obj/NiPSysEmitterLifeSpanCtlr.h
index 6cfa8970d28e5d4fae7346989129522b6b4b28dd..77290fcf9c9fb171fad835341e25135f2c0b832f 100644
--- a/obj/NiPSysEmitterLifeSpanCtlr.h
+++ b/obj/NiPSysEmitterLifeSpanCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTERLIFESPANCTLR_H_
 #define _NIPSYSEMITTERLIFESPANCTLR_H_
 
+#include "APSysCtlr.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_INCLUDE
 
 /*
  * NiPSysEmitterLifeSpanCtlr
diff --git a/obj/NiPSysEmitterSpeedCtlr.cpp b/obj/NiPSysEmitterSpeedCtlr.cpp
index 73a5685dde4fdf06a1d57a8b643e841e8bb9cc74..1563205490410f848b62e6f7dab43cac4774832b 100644
--- a/obj/NiPSysEmitterSpeedCtlr.cpp
+++ b/obj/NiPSysEmitterSpeedCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysEmitterSpeedCtlr.h"
+#include "obj/NiPSysEmitterSpeedCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysEmitterSpeedCtlr::TYPE("NiPSysEmitterSpeedCtlr", &NI_P_SYS_EMITTER_SPEED_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysEmitterSpeedCtlr.h b/obj/NiPSysEmitterSpeedCtlr.h
index 4de9958809ff7519fc34f684ca9ff4e12c141d2e..050ea756e9b281ec3c0966ff47cb71afe5c4c97f 100644
--- a/obj/NiPSysEmitterSpeedCtlr.h
+++ b/obj/NiPSysEmitterSpeedCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSEMITTERSPEEDCTLR_H_
 #define _NIPSYSEMITTERSPEEDCTLR_H_
 
+#include "APSysCtlr.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_EMITTER_SPEED_CTLR_INCLUDE
 
 /*
  * NiPSysEmitterSpeedCtlr
diff --git a/obj/NiPSysGravityModifier.cpp b/obj/NiPSysGravityModifier.cpp
index 34e8775ea36d0b1067999926e1c8d3b5f3352de0..4377eddfee552204af171552a6337e1700f0f4b8 100644
--- a/obj/NiPSysGravityModifier.cpp
+++ b/obj/NiPSysGravityModifier.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysGravityModifier.h"
-#include "NiNode.h"
+#include "obj/NiPSysGravityModifier.h"
+#include "obj/NiNode.h"
 
 //Definition of TYPE constant
 const Type NiPSysGravityModifier::TYPE("NiPSysGravityModifier", &NI_P_SYS_GRAVITY_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysGravityModifier.h b/obj/NiPSysGravityModifier.h
index 7cdab7264095a220b171c6f5d83ac49c0af3b41d..46925a1bad630ee3e7b301dfd71a470b42cbe103 100644
--- a/obj/NiPSysGravityModifier.h
+++ b/obj/NiPSysGravityModifier.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSGRAVITYMODIFIER_H_
 #define _NIPSYSGRAVITYMODIFIER_H_
 
+#include "NiPSysModifier.h"
+class NiNode;
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_GRAVITY_MODIFIER_INCLUDE
 
 /*
  * NiPSysGravityModifier
diff --git a/obj/NiPSysGravityStrengthCtlr.cpp b/obj/NiPSysGravityStrengthCtlr.cpp
index 5f08a5a55427bdc9922cb554aece2e1c20cff4c0..a613ccb5c232448d8cbbd4f45a9e20f97d0e084b 100644
--- a/obj/NiPSysGravityStrengthCtlr.cpp
+++ b/obj/NiPSysGravityStrengthCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysGravityStrengthCtlr.h"
+#include "obj/NiPSysGravityStrengthCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysGravityStrengthCtlr::TYPE("NiPSysGravityStrengthCtlr", &NI_P_SYS_GRAVITY_STRENGTH_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysGravityStrengthCtlr.h b/obj/NiPSysGravityStrengthCtlr.h
index 96a43cf73f5532414c817589ee73c5b2a3ef3f6e..636754865dc3f8179a9f63053b94aa6cdd7d1a7c 100644
--- a/obj/NiPSysGravityStrengthCtlr.h
+++ b/obj/NiPSysGravityStrengthCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSGRAVITYSTRENGTHCTLR_H_
 #define _NIPSYSGRAVITYSTRENGTHCTLR_H_
 
+#include "APSysCtlr.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_GRAVITY_STRENGTH_CTLR_INCLUDE
 
 /*
  * NiPSysGravityStrengthCtlr
diff --git a/obj/NiPSysGrowFadeModifier.cpp b/obj/NiPSysGrowFadeModifier.cpp
index 4e9d51d8af9df6fb3cc3620f62d19aa2f8cf3f37..5fee65d95695419034fd483f357f0dfd72e2841c 100644
--- a/obj/NiPSysGrowFadeModifier.cpp
+++ b/obj/NiPSysGrowFadeModifier.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysGrowFadeModifier.h"
+#include "obj/NiPSysGrowFadeModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysGrowFadeModifier::TYPE("NiPSysGrowFadeModifier", &NI_P_SYS_GROW_FADE_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysGrowFadeModifier.h b/obj/NiPSysGrowFadeModifier.h
index 69865a63b865aa84e8982fa538aedfed34112d6e..873c31df7acb97467b30671db9857e94641c18f2 100644
--- a/obj/NiPSysGrowFadeModifier.h
+++ b/obj/NiPSysGrowFadeModifier.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSGROWFADEMODIFIER_H_
 #define _NIPSYSGROWFADEMODIFIER_H_
 
+#include "NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_GROW_FADE_MODIFIER_INCLUDE
 
 /*
  * NiPSysGrowFadeModifier
diff --git a/obj/NiPSysMeshEmitter.cpp b/obj/NiPSysMeshEmitter.cpp
index 606e161e05b2c69ab9674fd41135f250e737a434..3c407830f52a5a02777a07f5e6f3404a43e30ebb 100644
--- a/obj/NiPSysMeshEmitter.cpp
+++ b/obj/NiPSysMeshEmitter.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysMeshEmitter.h"
-#include "NiTriBasedGeom.h"
+#include "obj/NiPSysMeshEmitter.h"
 
 //Definition of TYPE constant
 const Type NiPSysMeshEmitter::TYPE("NiPSysMeshEmitter", &NI_P_SYS_MESH_EMITTER_PARENT::TYPE );
diff --git a/obj/NiPSysMeshEmitter.h b/obj/NiPSysMeshEmitter.h
index 40889e783654d21017e670ce5bc95642cd701585..64952afcad7def13ac88fde2c7e0f3d11bee6282 100644
--- a/obj/NiPSysMeshEmitter.h
+++ b/obj/NiPSysMeshEmitter.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSMESHEMITTER_H_
 #define _NIPSYSMESHEMITTER_H_
 
+#include "NiPSysEmitter.h"
+#include "Ref.h"
+#include "obj/NiTriBasedGeom.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_MESH_EMITTER_INCLUDE
 
 /*
  * NiPSysMeshEmitter
diff --git a/obj/NiPSysMeshUpdateModifier.cpp b/obj/NiPSysMeshUpdateModifier.cpp
index 0c068e05b6c96c3ff85f5dbb6f7c4882a0410b46..a2ea917e8fc48fae240b10a2c93411e8e740020f 100644
--- a/obj/NiPSysMeshUpdateModifier.cpp
+++ b/obj/NiPSysMeshUpdateModifier.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysMeshUpdateModifier.h"
-#include "NiNode.h"
+#include "obj/NiPSysMeshUpdateModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysMeshUpdateModifier::TYPE("NiPSysMeshUpdateModifier", &NI_P_SYS_MESH_UPDATE_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysMeshUpdateModifier.h b/obj/NiPSysMeshUpdateModifier.h
index 0177bc66362e33be7dcd95e2626e4466484b9c43..ac737925ab44ec7e6f4a27b7b636375f4bd4b9f6 100644
--- a/obj/NiPSysMeshUpdateModifier.h
+++ b/obj/NiPSysMeshUpdateModifier.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSMESHUPDATEMODIFIER_H_
 #define _NIPSYSMESHUPDATEMODIFIER_H_
 
+#include "NiPSysModifier.h"
+#include "Ref.h"
+#include "obj/NiNode.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_MESH_UPDATE_MODIFIER_INCLUDE
 
 /*
  * NiPSysMeshUpdateModifier
diff --git a/obj/NiPSysModifier.cpp b/obj/NiPSysModifier.cpp
index d2384f684943c37e01bc48a86d480d92c6669978..b3cae9b408e693f083c3cc2f45e62d8414867b5f 100644
--- a/obj/NiPSysModifier.cpp
+++ b/obj/NiPSysModifier.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysModifier.h"
-#include "NiParticleSystem.h"
+#include "obj/NiPSysModifier.h"
+#include "obj/NiParticleSystem.h"
 
 //Definition of TYPE constant
 const Type NiPSysModifier::TYPE("NiPSysModifier", &NI_P_SYS_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysModifier.h b/obj/NiPSysModifier.h
index 8f6ff00cfc464b208851d63a7e73e0835f56e189..e009c01b45e73513af45161cfdc5932518a245fb 100644
--- a/obj/NiPSysModifier.h
+++ b/obj/NiPSysModifier.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSMODIFIER_H_
 #define _NIPSYSMODIFIER_H_
 
+#include "NiObject.h"
+class NiParticleSystem;
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_MODIFIER_INCLUDE
 
 /*
  * NiPSysModifier
diff --git a/obj/NiPSysModifierActiveCtlr.cpp b/obj/NiPSysModifierActiveCtlr.cpp
index 6fdad4f70d98dc14f3e403e8897bad9b49624939..0e85143cf08bfc2dac81b1e4e5fb13d80d4a1e4a 100644
--- a/obj/NiPSysModifierActiveCtlr.cpp
+++ b/obj/NiPSysModifierActiveCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysModifierActiveCtlr.h"
+#include "obj/NiPSysModifierActiveCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysModifierActiveCtlr::TYPE("NiPSysModifierActiveCtlr", &NI_P_SYS_MODIFIER_ACTIVE_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysModifierActiveCtlr.h b/obj/NiPSysModifierActiveCtlr.h
index 0c4f7c366409e440bb0a433e276a2ab0f5092d25..1b54e06cb5f59bf3b4f37af6560317892bfc76ef 100644
--- a/obj/NiPSysModifierActiveCtlr.h
+++ b/obj/NiPSysModifierActiveCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSMODIFIERACTIVECTLR_H_
 #define _NIPSYSMODIFIERACTIVECTLR_H_
 
+#include "APSysCtlr.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_MODIFIER_ACTIVE_CTLR_INCLUDE
 
 /*
  * NiPSysModifierActiveCtlr
diff --git a/obj/NiPSysPlanarCollider.cpp b/obj/NiPSysPlanarCollider.cpp
index 5b8453e6150f25a998bd55e4b2334868a3828948..412cccea1adf5482a908a5cbfea920b71a51af18 100644
--- a/obj/NiPSysPlanarCollider.cpp
+++ b/obj/NiPSysPlanarCollider.cpp
@@ -1,11 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysPlanarCollider.h"
-#include "NiPSysSpawnModifier.h"
-#include "NiObject.h"
-#include "NiObject.h"
-#include "NiNode.h"
+#include "obj/NiPSysPlanarCollider.h"
+#include "obj/NiObject.h"
 
 //Definition of TYPE constant
 const Type NiPSysPlanarCollider::TYPE("NiPSysPlanarCollider", &NI_P_SYS_PLANAR_COLLIDER_PARENT::TYPE );
diff --git a/obj/NiPSysPlanarCollider.h b/obj/NiPSysPlanarCollider.h
index 889745557ae4eeeb7f7b6d07f8a0037749a7e1ad..c081233bc5cf1c0695b226ebcbf28b8f33b1779c 100644
--- a/obj/NiPSysPlanarCollider.h
+++ b/obj/NiPSysPlanarCollider.h
@@ -4,8 +4,14 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSPLANARCOLLIDER_H_
 #define _NIPSYSPLANARCOLLIDER_H_
 
+#include "NiObject.h"
+#include "Ref.h"
+#include "obj/NiPSysSpawnModifier.h"
+#include "obj/NiObject.h"
+#include "obj/NiNode.h"
+class NiObject;
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_PLANAR_COLLIDER_INCLUDE
 
 /*
  * NiPSysPlanarCollider
diff --git a/obj/NiPSysPositionModifier.cpp b/obj/NiPSysPositionModifier.cpp
index a040ac37e9a6eb6a2b4cd5623d686599dfeaccad..4edfeb89b4c6265d2fc6676fdb6731676bfb7a61 100644
--- a/obj/NiPSysPositionModifier.cpp
+++ b/obj/NiPSysPositionModifier.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysPositionModifier.h"
+#include "obj/NiPSysPositionModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysPositionModifier::TYPE("NiPSysPositionModifier", &NI_P_SYS_POSITION_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysPositionModifier.h b/obj/NiPSysPositionModifier.h
index 1c5cffaccf94f31ff92bd1bee87431772d7019fb..b5363ecdf156a964658612b55bd98370892c0c2f 100644
--- a/obj/NiPSysPositionModifier.h
+++ b/obj/NiPSysPositionModifier.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSPOSITIONMODIFIER_H_
 #define _NIPSYSPOSITIONMODIFIER_H_
 
+#include "NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_POSITION_MODIFIER_INCLUDE
 
 /*
  * NiPSysPositionModifier
diff --git a/obj/NiPSysResetOnLoopCtlr.cpp b/obj/NiPSysResetOnLoopCtlr.cpp
index da46bfaa4d0854b0555580d833ade50733aa7cd0..ae7e0006bfe6fd0cad3ba0d9002e8cd1bfa9ed46 100644
--- a/obj/NiPSysResetOnLoopCtlr.cpp
+++ b/obj/NiPSysResetOnLoopCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysResetOnLoopCtlr.h"
+#include "obj/NiPSysResetOnLoopCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysResetOnLoopCtlr::TYPE("NiPSysResetOnLoopCtlr", &NI_P_SYS_RESET_ON_LOOP_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysResetOnLoopCtlr.h b/obj/NiPSysResetOnLoopCtlr.h
index 7d93020cd8b87ef2ec0be317b924d53f657797f2..206d0c994f40047eaa733d5bc54427814182e2a0 100644
--- a/obj/NiPSysResetOnLoopCtlr.h
+++ b/obj/NiPSysResetOnLoopCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSRESETONLOOPCTLR_H_
 #define _NIPSYSRESETONLOOPCTLR_H_
 
+#include "NiTimeController.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_RESET_ON_LOOP_CTLR_INCLUDE
 
 /*
  * NiPSysResetOnLoopCtlr
diff --git a/obj/NiPSysRotationModifier.cpp b/obj/NiPSysRotationModifier.cpp
index 7fbb4b9a4be45055471f8701eb5a33b503c02961..e7bf2df1a228ab7e0eac41590728ba4b5dea2c9d 100644
--- a/obj/NiPSysRotationModifier.cpp
+++ b/obj/NiPSysRotationModifier.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysRotationModifier.h"
+#include "obj/NiPSysRotationModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysRotationModifier::TYPE("NiPSysRotationModifier", &NI_P_SYS_ROTATION_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysRotationModifier.h b/obj/NiPSysRotationModifier.h
index 09867558cd69a0c34540a7b03f1b83d9723dc59f..58c9994f071613208bbd20adddd00713fc843859 100644
--- a/obj/NiPSysRotationModifier.h
+++ b/obj/NiPSysRotationModifier.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSROTATIONMODIFIER_H_
 #define _NIPSYSROTATIONMODIFIER_H_
 
+#include "NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_ROTATION_MODIFIER_INCLUDE
 
 /*
  * NiPSysRotationModifier
diff --git a/obj/NiPSysSpawnModifier.cpp b/obj/NiPSysSpawnModifier.cpp
index 500863d68337ed0cc3e2d482705a2acbd7ce5c2a..93b23789db625173b4fe491828f397b3a9139280 100644
--- a/obj/NiPSysSpawnModifier.cpp
+++ b/obj/NiPSysSpawnModifier.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysSpawnModifier.h"
+#include "obj/NiPSysSpawnModifier.h"
 
 //Definition of TYPE constant
 const Type NiPSysSpawnModifier::TYPE("NiPSysSpawnModifier", &NI_P_SYS_SPAWN_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiPSysSpawnModifier.h b/obj/NiPSysSpawnModifier.h
index 2ff464480de0fae95ce74bc95e7cd9370eb05c4e..a7c07d3e2f8a6e2fd50562160478eff73c399bc0 100644
--- a/obj/NiPSysSpawnModifier.h
+++ b/obj/NiPSysSpawnModifier.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSSPAWNMODIFIER_H_
 #define _NIPSYSSPAWNMODIFIER_H_
 
+#include "NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_SPAWN_MODIFIER_INCLUDE
 
 /*
  * NiPSysSpawnModifier
diff --git a/obj/NiPSysSphereEmitter.cpp b/obj/NiPSysSphereEmitter.cpp
index 71b0cd11cee000fa14897fb667f1813133b36817..04de2969c9a3117dd79afb81fa72c4ac08ed9703 100644
--- a/obj/NiPSysSphereEmitter.cpp
+++ b/obj/NiPSysSphereEmitter.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysSphereEmitter.h"
+#include "obj/NiPSysSphereEmitter.h"
 
 //Definition of TYPE constant
 const Type NiPSysSphereEmitter::TYPE("NiPSysSphereEmitter", &NI_P_SYS_SPHERE_EMITTER_PARENT::TYPE );
diff --git a/obj/NiPSysSphereEmitter.h b/obj/NiPSysSphereEmitter.h
index e548b627cd9519171731d27c8fbb239eab536315..d48d7db684e8e1766476eccc3dd4c94199c3decb 100644
--- a/obj/NiPSysSphereEmitter.h
+++ b/obj/NiPSysSphereEmitter.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSSPHEREEMITTER_H_
 #define _NIPSYSSPHEREEMITTER_H_
 
+#include "NiPSysVolumeEmitter.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_SPHERE_EMITTER_INCLUDE
 
 /*
  * NiPSysSphereEmitter
diff --git a/obj/NiPSysUpdateCtlr.cpp b/obj/NiPSysUpdateCtlr.cpp
index 264a513ec600863a998af25cf34d1bd6f0785699..0a6fbb179c7091dd6cb9cd104f25bd402e2f88da 100644
--- a/obj/NiPSysUpdateCtlr.cpp
+++ b/obj/NiPSysUpdateCtlr.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysUpdateCtlr.h"
+#include "obj/NiPSysUpdateCtlr.h"
 
 //Definition of TYPE constant
 const Type NiPSysUpdateCtlr::TYPE("NiPSysUpdateCtlr", &NI_P_SYS_UPDATE_CTLR_PARENT::TYPE );
diff --git a/obj/NiPSysUpdateCtlr.h b/obj/NiPSysUpdateCtlr.h
index ec26dc34ebe78519b53c203c12427126e9168ef6..8faad843154142a2e7355a35c80ba98204d689a7 100644
--- a/obj/NiPSysUpdateCtlr.h
+++ b/obj/NiPSysUpdateCtlr.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSUPDATECTLR_H_
 #define _NIPSYSUPDATECTLR_H_
 
+#include "NiTimeController.h"
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_UPDATE_CTLR_INCLUDE
 
 /*
  * NiPSysUpdateCtlr
diff --git a/obj/NiPSysVolumeEmitter.cpp b/obj/NiPSysVolumeEmitter.cpp
index 439a1a1e4edbbb423592f1b6bf3f37bda05367a9..f13b29e129c0ab5f34bad0760848a4b74e2cf45a 100644
--- a/obj/NiPSysVolumeEmitter.cpp
+++ b/obj/NiPSysVolumeEmitter.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPSysVolumeEmitter.h"
-#include "NiNode.h"
+#include "obj/NiPSysVolumeEmitter.h"
+#include "obj/NiNode.h"
 
 //Definition of TYPE constant
 const Type NiPSysVolumeEmitter::TYPE("NiPSysVolumeEmitter", &NI_P_SYS_VOLUME_EMITTER_PARENT::TYPE );
diff --git a/obj/NiPSysVolumeEmitter.h b/obj/NiPSysVolumeEmitter.h
index a2cc9bcba685f8dfa80c090d3ec9f5a25822e6a2..ba8e2d9c65d32fb1eb485008ce60c611bc07ceed 100644
--- a/obj/NiPSysVolumeEmitter.h
+++ b/obj/NiPSysVolumeEmitter.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPSYSVOLUMEEMITTER_H_
 #define _NIPSYSVOLUMEEMITTER_H_
 
+#include "NiPSysEmitter.h"
+class NiNode;
+
 #include "gen/obj_defines.h"
-#include NI_P_SYS_VOLUME_EMITTER_INCLUDE
 
 /*
  * NiPSysVolumeEmitter
diff --git a/obj/NiPalette.cpp b/obj/NiPalette.cpp
index 57736be11fa7ac31f79d7d93a266d75847734eff..0b7faf23591c903d4441824525b049b7f7ca9b1c 100644
--- a/obj/NiPalette.cpp
+++ b/obj/NiPalette.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPalette.h"
+#include "obj/NiPalette.h"
 
 //Definition of TYPE constant
 const Type NiPalette::TYPE("NiPalette", &NI_PALETTE_PARENT::TYPE );
diff --git a/obj/NiPalette.h b/obj/NiPalette.h
index 806f5558e8fec2910808e522a761059cf1d623e8..355f41fec49eb82a717d59976b4347437b2238a5 100644
--- a/obj/NiPalette.h
+++ b/obj/NiPalette.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPALETTE_H_
 #define _NIPALETTE_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_PALETTE_INCLUDE
 
 /*
  * NiPalette
diff --git a/obj/NiParticleBomb.cpp b/obj/NiParticleBomb.cpp
index 84901e514664bef2048b0ba718c34012e18f3a1e..a340b32b5b56721ba98f70bb1c4afed4793e9176 100644
--- a/obj/NiParticleBomb.cpp
+++ b/obj/NiParticleBomb.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleBomb.h"
+#include "obj/NiParticleBomb.h"
 
 //Definition of TYPE constant
 const Type NiParticleBomb::TYPE("NiParticleBomb", &NI_PARTICLE_BOMB_PARENT::TYPE );
diff --git a/obj/NiParticleBomb.h b/obj/NiParticleBomb.h
index 6014dae827d04098d1e745a6010ad26c969ae7c1..73608f4f508a73ac7d0fce13be7fd375525ed1aa 100644
--- a/obj/NiParticleBomb.h
+++ b/obj/NiParticleBomb.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLEBOMB_H_
 #define _NIPARTICLEBOMB_H_
 
+#include "AParticleModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_BOMB_INCLUDE
 
 /*
  * NiParticleBomb
diff --git a/obj/NiParticleColorModifier.cpp b/obj/NiParticleColorModifier.cpp
index 64e591edf10abfb39c1536e8010a43d1a4739937..6c4d01b3494fc82494112711fba939c3ffd55bc3 100644
--- a/obj/NiParticleColorModifier.cpp
+++ b/obj/NiParticleColorModifier.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleColorModifier.h"
-#include "NiColorData.h"
+#include "obj/NiParticleColorModifier.h"
 
 //Definition of TYPE constant
 const Type NiParticleColorModifier::TYPE("NiParticleColorModifier", &NI_PARTICLE_COLOR_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiParticleColorModifier.h b/obj/NiParticleColorModifier.h
index 2d649df1156318b21208d6e9310d9d76a9f0ffa1..878e9d38a364cd4493901f44545243cf57deecfc 100644
--- a/obj/NiParticleColorModifier.h
+++ b/obj/NiParticleColorModifier.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLECOLORMODIFIER_H_
 #define _NIPARTICLECOLORMODIFIER_H_
 
+#include "AParticleModifier.h"
+#include "Ref.h"
+#include "obj/NiColorData.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_COLOR_MODIFIER_INCLUDE
 
 /*
  * NiParticleColorModifier
diff --git a/obj/NiParticleGrowFade.cpp b/obj/NiParticleGrowFade.cpp
index a46ff9c2d69fc2192bf0befabd34019e36cd1c30..21df36ce51fab822b59a7501b686b29e2e14b4d7 100644
--- a/obj/NiParticleGrowFade.cpp
+++ b/obj/NiParticleGrowFade.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleGrowFade.h"
+#include "obj/NiParticleGrowFade.h"
 
 //Definition of TYPE constant
 const Type NiParticleGrowFade::TYPE("NiParticleGrowFade", &NI_PARTICLE_GROW_FADE_PARENT::TYPE );
diff --git a/obj/NiParticleGrowFade.h b/obj/NiParticleGrowFade.h
index 0d7167b9f84593a0c52669321c84bd2c607e4a06..01e7d227c2978c90b1ed4b8cafa7114e1172a659 100644
--- a/obj/NiParticleGrowFade.h
+++ b/obj/NiParticleGrowFade.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLEGROWFADE_H_
 #define _NIPARTICLEGROWFADE_H_
 
+#include "AParticleModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_GROW_FADE_INCLUDE
 
 /*
  * NiParticleGrowFade
diff --git a/obj/NiParticleMeshModifier.cpp b/obj/NiParticleMeshModifier.cpp
index 1f6d029c0db6d7257ca8341daccf818586ac2564..4b9fd0197c526063f64a49581e41a623ad0e571c 100644
--- a/obj/NiParticleMeshModifier.cpp
+++ b/obj/NiParticleMeshModifier.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleMeshModifier.h"
-#include "NiTriBasedGeom.h"
+#include "obj/NiParticleMeshModifier.h"
 
 //Definition of TYPE constant
 const Type NiParticleMeshModifier::TYPE("NiParticleMeshModifier", &NI_PARTICLE_MESH_MODIFIER_PARENT::TYPE );
diff --git a/obj/NiParticleMeshModifier.h b/obj/NiParticleMeshModifier.h
index 12dd3aa1cb922fda50050394805d009879657f15..cfc2625dfc7b0ba6661d373ab99f2041e5cbc588 100644
--- a/obj/NiParticleMeshModifier.h
+++ b/obj/NiParticleMeshModifier.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLEMESHMODIFIER_H_
 #define _NIPARTICLEMESHMODIFIER_H_
 
+#include "AParticleModifier.h"
+#include "Ref.h"
+#include "obj/NiTriBasedGeom.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_MESH_MODIFIER_INCLUDE
 
 /*
  * NiParticleMeshModifier
diff --git a/obj/NiParticleMeshes.cpp b/obj/NiParticleMeshes.cpp
index 4f0e85f94a007fb908ee2e72f30bad261ca3d9db..0b407de7544f0df741e36c9bed6283dcb652d9d6 100644
--- a/obj/NiParticleMeshes.cpp
+++ b/obj/NiParticleMeshes.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleMeshes.h"
+#include "obj/NiParticleMeshes.h"
 
 //Definition of TYPE constant
 const Type NiParticleMeshes::TYPE("NiParticleMeshes", &NI_PARTICLE_MESHES_PARENT::TYPE );
diff --git a/obj/NiParticleMeshes.h b/obj/NiParticleMeshes.h
index 26381d6e1f8f89dbfb151ea7e70937ee9a6a0cab..257a0c9c609919a9dbdca6fbf35e8d309723cc24 100644
--- a/obj/NiParticleMeshes.h
+++ b/obj/NiParticleMeshes.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLEMESHES_H_
 #define _NIPARTICLEMESHES_H_
 
+#include "NiParticles.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_MESHES_INCLUDE
 
 /*
  * NiParticleMeshes
diff --git a/obj/NiParticleMeshesData.cpp b/obj/NiParticleMeshesData.cpp
index ca2d5c50b0eeee6267e11614fc24e4f96e8af0eb..212f2cce6a02e818f28728dd1abe4422fcf07f26 100644
--- a/obj/NiParticleMeshesData.cpp
+++ b/obj/NiParticleMeshesData.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleMeshesData.h"
-#include "NiTriBasedGeom.h"
+#include "obj/NiParticleMeshesData.h"
 
 //Definition of TYPE constant
 const Type NiParticleMeshesData::TYPE("NiParticleMeshesData", &NI_PARTICLE_MESHES_DATA_PARENT::TYPE );
diff --git a/obj/NiParticleMeshesData.h b/obj/NiParticleMeshesData.h
index e30b5f25b24d8afa88ae2402062e1f8c9a5044f8..6604278ae9f34cd45832005ecc46af9fd8f6ab55 100644
--- a/obj/NiParticleMeshesData.h
+++ b/obj/NiParticleMeshesData.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLEMESHESDATA_H_
 #define _NIPARTICLEMESHESDATA_H_
 
+#include "NiParticlesData.h"
+#include "Ref.h"
+#include "obj/NiTriBasedGeom.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_MESHES_DATA_INCLUDE
 
 /*
  * NiParticleMeshesData
diff --git a/obj/NiParticleRotation.cpp b/obj/NiParticleRotation.cpp
index 99995ee0a5e523c056a8c7fa1c7a604b5ccc2f36..1f8e5d11404a6e0269dec4a7a838e7fb1377a633 100644
--- a/obj/NiParticleRotation.cpp
+++ b/obj/NiParticleRotation.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleRotation.h"
+#include "obj/NiParticleRotation.h"
 
 //Definition of TYPE constant
 const Type NiParticleRotation::TYPE("NiParticleRotation", &NI_PARTICLE_ROTATION_PARENT::TYPE );
diff --git a/obj/NiParticleRotation.h b/obj/NiParticleRotation.h
index ed6fb36cbf1485ac9eee8b1a853c094c70dcbe36..8707858d84b085cf0fe90de134d344d8fe83847a 100644
--- a/obj/NiParticleRotation.h
+++ b/obj/NiParticleRotation.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLEROTATION_H_
 #define _NIPARTICLEROTATION_H_
 
+#include "AParticleModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_ROTATION_INCLUDE
 
 /*
  * NiParticleRotation
diff --git a/obj/NiParticleSystem.cpp b/obj/NiParticleSystem.cpp
index 793b7ab604517c6cd3e0929f028728debaa24d4e..1290546daf16b7bc437c4c289d652521d38af641 100644
--- a/obj/NiParticleSystem.cpp
+++ b/obj/NiParticleSystem.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleSystem.h"
-#include "NiPSysModifier.h"
+#include "obj/NiParticleSystem.h"
 
 //Definition of TYPE constant
 const Type NiParticleSystem::TYPE("NiParticleSystem", &NI_PARTICLE_SYSTEM_PARENT::TYPE );
diff --git a/obj/NiParticleSystem.h b/obj/NiParticleSystem.h
index 703cf8e42fe0dd6d708ff2a61215c00a548ae864..d65081e951216523d7898cf9fb00e775e3528da4 100644
--- a/obj/NiParticleSystem.h
+++ b/obj/NiParticleSystem.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLESYSTEM_H_
 #define _NIPARTICLESYSTEM_H_
 
+#include "NiParticles.h"
+#include "Ref.h"
+#include "obj/NiPSysModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_SYSTEM_INCLUDE
 
 /*
  * NiParticleSystem
diff --git a/obj/NiParticleSystemController.cpp b/obj/NiParticleSystemController.cpp
index 584c8ea0075c2286c98d68c678a5459612ea0060..31ed599d6ed485d5916181d66c22b29aa0a1b69c 100644
--- a/obj/NiParticleSystemController.cpp
+++ b/obj/NiParticleSystemController.cpp
@@ -1,11 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticleSystemController.h"
-#include "NiObject.h"
-#include "NiObject.h"
-#include "AParticleModifier.h"
-#include "NiObject.h"
+#include "obj/NiParticleSystemController.h"
+#include "gen/Particle.h"
 
 //Definition of TYPE constant
 const Type NiParticleSystemController::TYPE("NiParticleSystemController", &NI_PARTICLE_SYSTEM_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiParticleSystemController.h b/obj/NiParticleSystemController.h
index c5b8107985c9f70ad65e25bf04569d910f24cf03..9ea18a68e316879746a833e0634b05ae0b0f8164 100644
--- a/obj/NiParticleSystemController.h
+++ b/obj/NiParticleSystemController.h
@@ -4,8 +4,13 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLESYSTEMCONTROLLER_H_
 #define _NIPARTICLESYSTEMCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+#include "gen/Particle.h"
+#include "obj/AParticleModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLE_SYSTEM_CONTROLLER_INCLUDE
 
 /*
  * NiParticleSystemController
diff --git a/obj/NiParticles.cpp b/obj/NiParticles.cpp
index a019293d73d24ee312f53a4eb6e124115e224f2c..ccafcab6d723bac0af0fb3301aee6eb1b48e02a5 100644
--- a/obj/NiParticles.cpp
+++ b/obj/NiParticles.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticles.h"
+#include "obj/NiParticles.h"
 
 //Definition of TYPE constant
 const Type NiParticles::TYPE("NiParticles", &NI_PARTICLES_PARENT::TYPE );
diff --git a/obj/NiParticles.h b/obj/NiParticles.h
index 95901b930af49801e9cf4597a850eea36f2bd711..3b304afebc3110878ff541a86a919130e08190f2 100644
--- a/obj/NiParticles.h
+++ b/obj/NiParticles.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLES_H_
 #define _NIPARTICLES_H_
 
+#include "NiTriBasedGeom.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLES_INCLUDE
 
 /*
  * NiParticles
diff --git a/obj/NiParticlesData.cpp b/obj/NiParticlesData.cpp
index 486d1a746479579fd278680af7233786b47b2c9a..e87bbd606aea80dd6166ea67a8551fb38bdb0902 100644
--- a/obj/NiParticlesData.cpp
+++ b/obj/NiParticlesData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiParticlesData.h"
+#include "obj/NiParticlesData.h"
 
 //Definition of TYPE constant
 const Type NiParticlesData::TYPE("NiParticlesData", &NI_PARTICLES_DATA_PARENT::TYPE );
diff --git a/obj/NiParticlesData.h b/obj/NiParticlesData.h
index ac1379a9852548a445c9aa1b856128348116537b..01935cac8d21fb30072c4b1accec7486f82fe465 100644
--- a/obj/NiParticlesData.h
+++ b/obj/NiParticlesData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPARTICLESDATA_H_
 #define _NIPARTICLESDATA_H_
 
+#include "NiAutoNormalParticlesData.h"
+
 #include "gen/obj_defines.h"
-#include NI_PARTICLES_DATA_INCLUDE
 
 /*
  * NiParticlesData
diff --git a/obj/NiPathController.cpp b/obj/NiPathController.cpp
index 0ab135dfcbbe75703cf9d6179937dac9d7c52403..cec8e8f87eceeefaf2132d633f6edffab2162093 100644
--- a/obj/NiPathController.cpp
+++ b/obj/NiPathController.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPathController.h"
-#include "NiPosData.h"
-#include "NiFloatData.h"
+#include "obj/NiPathController.h"
 
 //Definition of TYPE constant
 const Type NiPathController::TYPE("NiPathController", &NI_PATH_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiPathController.h b/obj/NiPathController.h
index 95433d91d82925b032bc7badd9ab276e4ff1d333..33249a20c4d11846970a7d302f6335e464040b0c 100644
--- a/obj/NiPathController.h
+++ b/obj/NiPathController.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPATHCONTROLLER_H_
 #define _NIPATHCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiPosData.h"
+#include "obj/NiFloatData.h"
+
 #include "gen/obj_defines.h"
-#include NI_PATH_CONTROLLER_INCLUDE
 
 /*
  * NiPathController
diff --git a/obj/NiPathInterpolator.cpp b/obj/NiPathInterpolator.cpp
index 9d42f00fd2032a8d58efedb0f5db2e687fb070c2..87e7fba18d14264da53b14e94d0dd0c9d8d2505b 100644
--- a/obj/NiPathInterpolator.cpp
+++ b/obj/NiPathInterpolator.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPathInterpolator.h"
-#include "NiPosData.h"
-#include "NiFloatData.h"
+#include "obj/NiPathInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiPathInterpolator::TYPE("NiPathInterpolator", &NI_PATH_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiPathInterpolator.h b/obj/NiPathInterpolator.h
index 28a56f33d01513fba78fdd4e62c043d099e9cd5d..fa3b5e0c9f55c22a3637ef8d47533834e95ae9de 100644
--- a/obj/NiPathInterpolator.h
+++ b/obj/NiPathInterpolator.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPATHINTERPOLATOR_H_
 #define _NIPATHINTERPOLATOR_H_
 
+#include "NiBlendInterpolator.h"
+#include "Ref.h"
+#include "obj/NiPosData.h"
+#include "obj/NiFloatData.h"
+
 #include "gen/obj_defines.h"
-#include NI_PATH_INTERPOLATOR_INCLUDE
 
 /*
  * NiPathInterpolator
diff --git a/obj/NiPixelData.cpp b/obj/NiPixelData.cpp
index 64e1d2ca4db11b45c29f7cec32f9ce0f5086fc19..839df4269ef748d1f3afa124f970be7d08d27a58 100644
--- a/obj/NiPixelData.cpp
+++ b/obj/NiPixelData.cpp
@@ -1,8 +1,9 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPixelData.h"
-#include "NiPalette.h"
+#include "obj/NiPixelData.h"
+#include "gen/MipMap.h"
+#include "gen/ByteArray.h"
 
 //Definition of TYPE constant
 const Type NiPixelData::TYPE("NiPixelData", &NI_PIXEL_DATA_PARENT::TYPE );
diff --git a/obj/NiPixelData.h b/obj/NiPixelData.h
index 5fd96ab82ce5133ee6fcc596adf498643b5bb2b4..aa96a936c6c0ba5514cb48a5453f1725422dbdd4 100644
--- a/obj/NiPixelData.h
+++ b/obj/NiPixelData.h
@@ -4,8 +4,13 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPIXELDATA_H_
 #define _NIPIXELDATA_H_
 
+#include "NiObject.h"
+#include "Ref.h"
+#include "obj/NiPalette.h"
+#include "gen/MipMap.h"
+#include "gen/ByteArray.h"
+
 #include "gen/obj_defines.h"
-#include NI_PIXEL_DATA_INCLUDE
 
 /*
  * NiPixelData
diff --git a/obj/NiPlanarCollider.cpp b/obj/NiPlanarCollider.cpp
index a24fcbfdde2a5347e67e2f3d0b68d0bf6da5ece0..29eeb1ed28be7342cc6b4aa88e984014ae7a0c1c 100644
--- a/obj/NiPlanarCollider.cpp
+++ b/obj/NiPlanarCollider.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPlanarCollider.h"
+#include "obj/NiPlanarCollider.h"
 
 //Definition of TYPE constant
 const Type NiPlanarCollider::TYPE("NiPlanarCollider", &NI_PLANAR_COLLIDER_PARENT::TYPE );
diff --git a/obj/NiPlanarCollider.h b/obj/NiPlanarCollider.h
index f7ab778e32173f9ddbf070127abbc7c24d77e43f..cb74df7c04e75053df016ca58381a5725a50bf78 100644
--- a/obj/NiPlanarCollider.h
+++ b/obj/NiPlanarCollider.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPLANARCOLLIDER_H_
 #define _NIPLANARCOLLIDER_H_
 
+#include "AParticleModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_PLANAR_COLLIDER_INCLUDE
 
 /*
  * NiPlanarCollider
diff --git a/obj/NiPoint3Interpolator.cpp b/obj/NiPoint3Interpolator.cpp
index c92e225da01d8a71f44a4164fae090a056cd7f49..2b6401b7daf2adcaaca3741fc60d05e4cacfd06d 100644
--- a/obj/NiPoint3Interpolator.cpp
+++ b/obj/NiPoint3Interpolator.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPoint3Interpolator.h"
-#include "NiPosData.h"
+#include "obj/NiPoint3Interpolator.h"
 
 //Definition of TYPE constant
 const Type NiPoint3Interpolator::TYPE("NiPoint3Interpolator", &NI_POINT3_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiPoint3Interpolator.h b/obj/NiPoint3Interpolator.h
index dcc255a67b2e3639f1a101602536f6870f9dad88..026a1895a270be502aedcce07320e07499ae4093 100644
--- a/obj/NiPoint3Interpolator.h
+++ b/obj/NiPoint3Interpolator.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPOINT3INTERPOLATOR_H_
 #define _NIPOINT3INTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+#include "Ref.h"
+#include "obj/NiPosData.h"
+
 #include "gen/obj_defines.h"
-#include NI_POINT3_INTERPOLATOR_INCLUDE
 
 /*
  * NiPoint3Interpolator
diff --git a/obj/NiPointLight.cpp b/obj/NiPointLight.cpp
index e03e1200a057e7ce24ce1e6afeca30060b40cf99..82ee4eb7c9641ac2df6e71dca60e35a8bd86bbc3 100644
--- a/obj/NiPointLight.cpp
+++ b/obj/NiPointLight.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPointLight.h"
+#include "obj/NiPointLight.h"
 
 //Definition of TYPE constant
 const Type NiPointLight::TYPE("NiPointLight", &NI_POINT_LIGHT_PARENT::TYPE );
diff --git a/obj/NiPointLight.h b/obj/NiPointLight.h
index 4cc41804332a8e9e87ba3f9d428672b780df43b4..f35701fe686a92049b54cc4a360ab2886dada905 100644
--- a/obj/NiPointLight.h
+++ b/obj/NiPointLight.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPOINTLIGHT_H_
 #define _NIPOINTLIGHT_H_
 
+#include "NiLight.h"
+
 #include "gen/obj_defines.h"
-#include NI_POINT_LIGHT_INCLUDE
 
 /*
  * NiPointLight
diff --git a/obj/NiPosData.cpp b/obj/NiPosData.cpp
index b5e8ddb3f61058026c8dc6dfb1995ab0929c4f64..2703b8da52d0132a5074b62a895e0ec580a6a5b7 100644
--- a/obj/NiPosData.cpp
+++ b/obj/NiPosData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiPosData.h"
+#include "obj/NiPosData.h"
+#include "gen/KeyGroup.h"
 
 //Definition of TYPE constant
 const Type NiPosData::TYPE("NiPosData", &NI_POS_DATA_PARENT::TYPE );
diff --git a/obj/NiPosData.h b/obj/NiPosData.h
index 5cc2ad34fab4e32a20068138bfed5ecac3d7af1b..f4449de8fb60b66bb66d51ec0f66489c007d9a25 100644
--- a/obj/NiPosData.h
+++ b/obj/NiPosData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPOSDATA_H_
 #define _NIPOSDATA_H_
 
+#include "AKeyedData.h"
+#include "gen/KeyGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_POS_DATA_INCLUDE
 
 /*
  * NiPosData
diff --git a/obj/NiProperty.cpp b/obj/NiProperty.cpp
index f61c2321088e793226ffc9b3d507ceb8519add6c..8ddf8f847fab1c7e9e2cebf9017ca9a69544a437 100644
--- a/obj/NiProperty.cpp
+++ b/obj/NiProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiProperty.h"
+#include "obj/NiProperty.h"
 
 //Definition of TYPE constant
 const Type NiProperty::TYPE("NiProperty", &NI_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiProperty.h b/obj/NiProperty.h
index 0544e5e5edc9a1fa500b2e15de850c7a786f98eb..4678d3b416c0692155fcb09189bf0408fb2a1cc5 100644
--- a/obj/NiProperty.h
+++ b/obj/NiProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIPROPERTY_H_
 #define _NIPROPERTY_H_
 
+#include "NiObjectNET.h"
+
 #include "gen/obj_defines.h"
-#include NI_PROPERTY_INCLUDE
 
 /*
  * NiProperty
diff --git a/obj/NiRangeLODData.cpp b/obj/NiRangeLODData.cpp
index f9f45d42ce6b52687bb0d3e6a7dd9290018f13c4..0b1718da478de20e94985466c108756845e7cba1 100644
--- a/obj/NiRangeLODData.cpp
+++ b/obj/NiRangeLODData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiRangeLODData.h"
+#include "obj/NiRangeLODData.h"
+#include "gen/LODRange.h"
 
 //Definition of TYPE constant
 const Type NiRangeLODData::TYPE("NiRangeLODData", &NI_RANGE_L_O_D_DATA_PARENT::TYPE );
diff --git a/obj/NiRangeLODData.h b/obj/NiRangeLODData.h
index 4dabcfe8f1010e0475061a5b90b2d859e56f2a00..962c0adfc462ab9702d24652c87ad3b559828cf8 100644
--- a/obj/NiRangeLODData.h
+++ b/obj/NiRangeLODData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIRANGELODDATA_H_
 #define _NIRANGELODDATA_H_
 
+#include "NiObject.h"
+#include "gen/LODRange.h"
+
 #include "gen/obj_defines.h"
-#include NI_RANGE_L_O_D_DATA_INCLUDE
 
 /*
  * NiRangeLODData
diff --git a/obj/NiRotatingParticles.cpp b/obj/NiRotatingParticles.cpp
index 160cc663e65799fddd7db6b16aa28c3dc1cd0391..7975125aaf0fd24beb527929999bd93f9d7dee53 100644
--- a/obj/NiRotatingParticles.cpp
+++ b/obj/NiRotatingParticles.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiRotatingParticles.h"
+#include "obj/NiRotatingParticles.h"
 
 //Definition of TYPE constant
 const Type NiRotatingParticles::TYPE("NiRotatingParticles", &NI_ROTATING_PARTICLES_PARENT::TYPE );
diff --git a/obj/NiRotatingParticles.h b/obj/NiRotatingParticles.h
index 41196d70717bd28f658b10d89a289abb22d0af38..572f070a1cc2aec814c2ff99bc1514e895aa3c48 100644
--- a/obj/NiRotatingParticles.h
+++ b/obj/NiRotatingParticles.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIROTATINGPARTICLES_H_
 #define _NIROTATINGPARTICLES_H_
 
+#include "NiParticles.h"
+
 #include "gen/obj_defines.h"
-#include NI_ROTATING_PARTICLES_INCLUDE
 
 /*
  * NiRotatingParticles
diff --git a/obj/NiRotatingParticlesData.cpp b/obj/NiRotatingParticlesData.cpp
index e91ccfba555aabd8a40e0eb87b09d3f8cb5d42c8..d2246abd3497bdc3fa82e487cb398e955153cfe4 100644
--- a/obj/NiRotatingParticlesData.cpp
+++ b/obj/NiRotatingParticlesData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiRotatingParticlesData.h"
+#include "obj/NiRotatingParticlesData.h"
 
 //Definition of TYPE constant
 const Type NiRotatingParticlesData::TYPE("NiRotatingParticlesData", &NI_ROTATING_PARTICLES_DATA_PARENT::TYPE );
diff --git a/obj/NiRotatingParticlesData.h b/obj/NiRotatingParticlesData.h
index 5fab749ceabfa264a41aaccc21b80b2e5b7246f4..33380b4c13ef7ecd6e67f3482d84f1eb3af913ec 100644
--- a/obj/NiRotatingParticlesData.h
+++ b/obj/NiRotatingParticlesData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIROTATINGPARTICLESDATA_H_
 #define _NIROTATINGPARTICLESDATA_H_
 
+#include "NiParticlesData.h"
+
 #include "gen/obj_defines.h"
-#include NI_ROTATING_PARTICLES_DATA_INCLUDE
 
 /*
  * NiRotatingParticlesData
diff --git a/obj/NiScreenLODData.cpp b/obj/NiScreenLODData.cpp
index b12d948d4aa6fdd0d961a46b94e776c6a9d46fea..b0847e37a06ed41114003b6fe3878038c3c4ed8f 100644
--- a/obj/NiScreenLODData.cpp
+++ b/obj/NiScreenLODData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiScreenLODData.h"
+#include "obj/NiScreenLODData.h"
 
 //Definition of TYPE constant
 const Type NiScreenLODData::TYPE("NiScreenLODData", &NI_SCREEN_L_O_D_DATA_PARENT::TYPE );
diff --git a/obj/NiScreenLODData.h b/obj/NiScreenLODData.h
index a5823a645360e25034be91e8e0e6ab986e914d36..37577d19ae985960fcd93b4f7d984cbe37e4b108 100644
--- a/obj/NiScreenLODData.h
+++ b/obj/NiScreenLODData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISCREENLODDATA_H_
 #define _NISCREENLODDATA_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_SCREEN_L_O_D_DATA_INCLUDE
 
 /*
  * NiScreenLODData
diff --git a/obj/NiSequenceStreamHelper.cpp b/obj/NiSequenceStreamHelper.cpp
index 0bc548dcaf755eab3457282561e25059ae6f90ab..a6256844590bed0301cd8702f04bb7d69780ad84 100644
--- a/obj/NiSequenceStreamHelper.cpp
+++ b/obj/NiSequenceStreamHelper.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSequenceStreamHelper.h"
+#include "obj/NiSequenceStreamHelper.h"
 
 //Definition of TYPE constant
 const Type NiSequenceStreamHelper::TYPE("NiSequenceStreamHelper", &NI_SEQUENCE_STREAM_HELPER_PARENT::TYPE );
diff --git a/obj/NiSequenceStreamHelper.h b/obj/NiSequenceStreamHelper.h
index 93ebebe15e6c8905816b387dd28974ce6745b572..3476f6da470ebaf73922f42dc7d0fc426a9d8448 100644
--- a/obj/NiSequenceStreamHelper.h
+++ b/obj/NiSequenceStreamHelper.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISEQUENCESTREAMHELPER_H_
 #define _NISEQUENCESTREAMHELPER_H_
 
+#include "NiObjectNET.h"
+
 #include "gen/obj_defines.h"
-#include NI_SEQUENCE_STREAM_HELPER_INCLUDE
 
 /*
  * NiSequenceStreamHelper
diff --git a/obj/NiShadeProperty.cpp b/obj/NiShadeProperty.cpp
index 7880f07191008b0583b7549a029bf10b9d22ee21..396f40ab31ed9691e697804e8a433cda4cfcbe08 100644
--- a/obj/NiShadeProperty.cpp
+++ b/obj/NiShadeProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiShadeProperty.h"
+#include "obj/NiShadeProperty.h"
 
 //Definition of TYPE constant
 const Type NiShadeProperty::TYPE("NiShadeProperty", &NI_SHADE_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiShadeProperty.h b/obj/NiShadeProperty.h
index 6258c999e5aa1b41ec2b9282c38d46734efef8de..0b9b8bb9a42c99733cbe1cf587fe711016efbcfb 100644
--- a/obj/NiShadeProperty.h
+++ b/obj/NiShadeProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISHADEPROPERTY_H_
 #define _NISHADEPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_SHADE_PROPERTY_INCLUDE
 
 /*
  * NiShadeProperty
diff --git a/obj/NiSingleInterpolatorController.cpp b/obj/NiSingleInterpolatorController.cpp
index 912969aa24199b93b8124be3a54775488a15d897..5fc2186b8d92909871caaaed8d3aa7368ef888fd 100644
--- a/obj/NiSingleInterpolatorController.cpp
+++ b/obj/NiSingleInterpolatorController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSingleInterpolatorController.h"
-#include "NiInterpolator.h"
+#include "obj/NiSingleInterpolatorController.h"
 
 //Definition of TYPE constant
 const Type NiSingleInterpolatorController::TYPE("NiSingleInterpolatorController", &NI_SINGLE_INTERPOLATOR_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiSingleInterpolatorController.h b/obj/NiSingleInterpolatorController.h
index 61d944d4c1511bd8f970f82ff3de040a7bdf4188..85d583e5b287d1beb9cdd65f41cf58502c030496 100644
--- a/obj/NiSingleInterpolatorController.h
+++ b/obj/NiSingleInterpolatorController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISINGLEINTERPOLATORCONTROLLER_H_
 #define _NISINGLEINTERPOLATORCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiInterpolator.h"
+
 #include "gen/obj_defines.h"
-#include NI_SINGLE_INTERPOLATOR_CONTROLLER_INCLUDE
 
 /*
  * NiSingleInterpolatorController
diff --git a/obj/NiSkinData.cpp b/obj/NiSkinData.cpp
index c1a8f534e2b86d4aa76fa2a791e27b32aab40cee..e04925df856646e65475f32e9d73b2bf61896927 100644
--- a/obj/NiSkinData.cpp
+++ b/obj/NiSkinData.cpp
@@ -1,8 +1,9 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSkinData.h"
-#include "NiSkinPartition.h"
+#include "obj/NiSkinData.h"
+#include "gen/SkinData.h"
+#include "gen/SkinWeight.h"
 
 //Definition of TYPE constant
 const Type NiSkinData::TYPE("NiSkinData", &NI_SKIN_DATA_PARENT::TYPE );
diff --git a/obj/NiSkinData.h b/obj/NiSkinData.h
index dd2b42cf5cf3e8e2fca4409f494ba907b8f36f8c..c3c1fd0d31caaa4be9b410c4bbdcacb37cf33726 100644
--- a/obj/NiSkinData.h
+++ b/obj/NiSkinData.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISKINDATA_H_
 #define _NISKINDATA_H_
 
+#include "NiObject.h"
+#include "Ref.h"
+#include "obj/NiSkinPartition.h"
+#include "gen/SkinData.h"
+
 #include "gen/obj_defines.h"
-#include NI_SKIN_DATA_INCLUDE
 
 /*
  * NiSkinData
diff --git a/obj/NiSkinInstance.cpp b/obj/NiSkinInstance.cpp
index 647de1f3f9d1d78320fc7b93c75ab32c8dea68aa..077dfd419242d960e1a1419568dd282657bc04b9 100644
--- a/obj/NiSkinInstance.cpp
+++ b/obj/NiSkinInstance.cpp
@@ -1,10 +1,10 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSkinInstance.h"
-#include "NiSkinData.h"
-#include "NiSkinPartition.h"
-#include "NiNode.h"
+#include "obj/NiSkinInstance.h"
+#include "gen/Bones.h"
+#include "obj/NiNode.h"
+#include "obj/NiNode.h"
 
 //Definition of TYPE constant
 const Type NiSkinInstance::TYPE("NiSkinInstance", &NI_SKIN_INSTANCE_PARENT::TYPE );
diff --git a/obj/NiSkinInstance.h b/obj/NiSkinInstance.h
index 5a062ecc3f7b20451d8e00404e172c730c1fc8c4..d78bbb86254cb4942330ef6b18bc1f71f583502f 100644
--- a/obj/NiSkinInstance.h
+++ b/obj/NiSkinInstance.h
@@ -4,8 +4,14 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISKININSTANCE_H_
 #define _NISKININSTANCE_H_
 
+#include "NiObject.h"
+#include "Ref.h"
+#include "obj/NiSkinData.h"
+#include "obj/NiSkinPartition.h"
+#include "gen/Bones.h"
+class NiNode;
+
 #include "gen/obj_defines.h"
-#include NI_SKIN_INSTANCE_INCLUDE
 
 /*
  * NiSkinInstance
diff --git a/obj/NiSkinPartition.cpp b/obj/NiSkinPartition.cpp
index 793f957cde6f13f8d2fa72ff4d86969bc251bb4f..8b501709532199c0fd597442c45e59237abbc7a1 100644
--- a/obj/NiSkinPartition.cpp
+++ b/obj/NiSkinPartition.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSkinPartition.h"
+#include "obj/NiSkinPartition.h"
+#include "gen/SkinPartition.h"
 
 //Definition of TYPE constant
 const Type NiSkinPartition::TYPE("NiSkinPartition", &NI_SKIN_PARTITION_PARENT::TYPE );
diff --git a/obj/NiSkinPartition.h b/obj/NiSkinPartition.h
index 6f198672b446c014865f57c44265860502543222..29da2400b5db2092902e943a1ff8bdf943b668fe 100644
--- a/obj/NiSkinPartition.h
+++ b/obj/NiSkinPartition.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISKINPARTITION_H_
 #define _NISKINPARTITION_H_
 
+#include "NiObject.h"
+#include "gen/SkinPartition.h"
+
 #include "gen/obj_defines.h"
-#include NI_SKIN_PARTITION_INCLUDE
 
 /*
  * NiSkinPartition
diff --git a/obj/NiSourceTexture.cpp b/obj/NiSourceTexture.cpp
index 6cf6d520f8e743f45ab8525b9916fcd1dec2665c..7bff8fba8a9c4ade6c73f3e355e231b52341f390 100644
--- a/obj/NiSourceTexture.cpp
+++ b/obj/NiSourceTexture.cpp
@@ -1,9 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSourceTexture.h"
-#include "NiObject.h"
-#include "NiPixelData.h"
+#include "obj/NiSourceTexture.h"
 
 //Definition of TYPE constant
 const Type NiSourceTexture::TYPE("NiSourceTexture", &NI_SOURCE_TEXTURE_PARENT::TYPE );
diff --git a/obj/NiSourceTexture.h b/obj/NiSourceTexture.h
index 045c8974fdbbfde390606310834cf5e4f85f2a85..a11e899afe5b9c47f89f9aa2da6c003ffcc1fb3d 100644
--- a/obj/NiSourceTexture.h
+++ b/obj/NiSourceTexture.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISOURCETEXTURE_H_
 #define _NISOURCETEXTURE_H_
 
+#include "NiObjectNET.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+#include "obj/NiPixelData.h"
+
 #include "gen/obj_defines.h"
-#include NI_SOURCE_TEXTURE_INCLUDE
 
 /*
  * NiSourceTexture
diff --git a/obj/NiSpecularProperty.cpp b/obj/NiSpecularProperty.cpp
index 10449a6d2c20c8c65a9c10bc359713684a2bc73c..29792fddab6763b4ae51660e09d2a06285d55357 100644
--- a/obj/NiSpecularProperty.cpp
+++ b/obj/NiSpecularProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSpecularProperty.h"
+#include "obj/NiSpecularProperty.h"
 
 //Definition of TYPE constant
 const Type NiSpecularProperty::TYPE("NiSpecularProperty", &NI_SPECULAR_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiSpecularProperty.h b/obj/NiSpecularProperty.h
index 88b0a49112e560c8a97eb165b1a3ac9fb9e6d6e7..22368d1783103eeb5d2dd2c4f6ab97a076190f5e 100644
--- a/obj/NiSpecularProperty.h
+++ b/obj/NiSpecularProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISPECULARPROPERTY_H_
 #define _NISPECULARPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_SPECULAR_PROPERTY_INCLUDE
 
 /*
  * NiSpecularProperty
diff --git a/obj/NiSphericalCollider.cpp b/obj/NiSphericalCollider.cpp
index 538e55aab8625e6149ecaa81dfd017d82c2c82d8..97b5c697d04c0f1c68f006f297e1248f714da275 100644
--- a/obj/NiSphericalCollider.cpp
+++ b/obj/NiSphericalCollider.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSphericalCollider.h"
+#include "obj/NiSphericalCollider.h"
 
 //Definition of TYPE constant
 const Type NiSphericalCollider::TYPE("NiSphericalCollider", &NI_SPHERICAL_COLLIDER_PARENT::TYPE );
diff --git a/obj/NiSphericalCollider.h b/obj/NiSphericalCollider.h
index 73ce08dc2364c880cde44fcef5923ad2a71b0f27..afa3824768fad88816509fe1b52594a09e86b55b 100644
--- a/obj/NiSphericalCollider.h
+++ b/obj/NiSphericalCollider.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISPHERICALCOLLIDER_H_
 #define _NISPHERICALCOLLIDER_H_
 
+#include "AParticleModifier.h"
+
 #include "gen/obj_defines.h"
-#include NI_SPHERICAL_COLLIDER_INCLUDE
 
 /*
  * NiSphericalCollider
diff --git a/obj/NiSpotLight.cpp b/obj/NiSpotLight.cpp
index 01485ffb0af7194ba6903af686ca3ca0261623db..aa45b683b903cda9cd5078cad94c0a2bfe7c0f49 100644
--- a/obj/NiSpotLight.cpp
+++ b/obj/NiSpotLight.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiSpotLight.h"
+#include "obj/NiSpotLight.h"
 
 //Definition of TYPE constant
 const Type NiSpotLight::TYPE("NiSpotLight", &NI_SPOT_LIGHT_PARENT::TYPE );
diff --git a/obj/NiSpotLight.h b/obj/NiSpotLight.h
index 7c51f347b13709bd3ef4014937f0154c92bce7f7..7777c44f88438f87ce19ef68c7543730098363fe 100644
--- a/obj/NiSpotLight.h
+++ b/obj/NiSpotLight.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISPOTLIGHT_H_
 #define _NISPOTLIGHT_H_
 
+#include "NiPointLight.h"
+
 #include "gen/obj_defines.h"
-#include NI_SPOT_LIGHT_INCLUDE
 
 /*
  * NiSpotLight
diff --git a/obj/NiStencilProperty.cpp b/obj/NiStencilProperty.cpp
index 74584898d218db4b77655165da03df407e53ac69..99e39fb1a41865e8801638e140cdbbc5d5087c2a 100644
--- a/obj/NiStencilProperty.cpp
+++ b/obj/NiStencilProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiStencilProperty.h"
+#include "obj/NiStencilProperty.h"
 
 //Definition of TYPE constant
 const Type NiStencilProperty::TYPE("NiStencilProperty", &NI_STENCIL_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiStencilProperty.h b/obj/NiStencilProperty.h
index b2c537a71a797e16a244dcbfdee76e6dbe0c7b2c..4d42118a7f475463a20e3c31b73f88c4c4e87008 100644
--- a/obj/NiStencilProperty.h
+++ b/obj/NiStencilProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISTENCILPROPERTY_H_
 #define _NISTENCILPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_STENCIL_PROPERTY_INCLUDE
 
 /*
  * NiStencilProperty
diff --git a/obj/NiStringExtraData.cpp b/obj/NiStringExtraData.cpp
index 243abdb720f9564148683499da1beb3c865f81e0..19d4c277fc1ce6e06542bbe9c51f4ca4dc403a2a 100644
--- a/obj/NiStringExtraData.cpp
+++ b/obj/NiStringExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiStringExtraData.h"
+#include "obj/NiStringExtraData.h"
 
 //Definition of TYPE constant
 const Type NiStringExtraData::TYPE("NiStringExtraData", &NI_STRING_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiStringExtraData.h b/obj/NiStringExtraData.h
index 6e70cfa51d8fd8faa9f13fc08f17ca5ba15c9821..5852e3ce4aafcb1574885763d3115a6caaa00bf0 100644
--- a/obj/NiStringExtraData.h
+++ b/obj/NiStringExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISTRINGEXTRADATA_H_
 #define _NISTRINGEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_STRING_EXTRA_DATA_INCLUDE
 
 /*
  * NiStringExtraData
diff --git a/obj/NiStringPalette.cpp b/obj/NiStringPalette.cpp
index ca7b2c79b9981705d3fa3f22e332ab60fb7035ae..b1f4d663898e992c8a7b5394dafb9dbbdf52586e 100644
--- a/obj/NiStringPalette.cpp
+++ b/obj/NiStringPalette.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiStringPalette.h"
+#include "obj/NiStringPalette.h"
+#include "gen/StringPalette.h"
 
 //Definition of TYPE constant
 const Type NiStringPalette::TYPE("NiStringPalette", &NI_STRING_PALETTE_PARENT::TYPE );
diff --git a/obj/NiStringPalette.h b/obj/NiStringPalette.h
index ccaa147f6813bb51ff755f950327954db4741b67..766c56fc295360fb4c995bde95554098f490f455 100644
--- a/obj/NiStringPalette.h
+++ b/obj/NiStringPalette.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISTRINGPALETTE_H_
 #define _NISTRINGPALETTE_H_
 
+#include "NiObject.h"
+#include "gen/StringPalette.h"
+
 #include "gen/obj_defines.h"
-#include NI_STRING_PALETTE_INCLUDE
 
 /*
  * NiStringPalette
diff --git a/obj/NiStringsExtraData.cpp b/obj/NiStringsExtraData.cpp
index 2f5b00e6eb2d46aebebbe02768c4b405941cbd88..7669dc044bdad744448ec4ceb8c27f6e41eab36f 100644
--- a/obj/NiStringsExtraData.cpp
+++ b/obj/NiStringsExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiStringsExtraData.h"
+#include "obj/NiStringsExtraData.h"
 
 //Definition of TYPE constant
 const Type NiStringsExtraData::TYPE("NiStringsExtraData", &NI_STRINGS_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiStringsExtraData.h b/obj/NiStringsExtraData.h
index e8bacb164cd86317c0a0607612c7fb01c2f31e35..acaa679cff6aa9af88b42d4726d0b2b9b1aad9f0 100644
--- a/obj/NiStringsExtraData.h
+++ b/obj/NiStringsExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NISTRINGSEXTRADATA_H_
 #define _NISTRINGSEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_STRINGS_EXTRA_DATA_INCLUDE
 
 /*
  * NiStringsExtraData
diff --git a/obj/NiTextKeyExtraData.cpp b/obj/NiTextKeyExtraData.cpp
index 0d1c16e83ebd10ca426b31646d6ce5f5d2a0548c..2c216df712fd137b1825ff0c3112b1d2257d2465 100644
--- a/obj/NiTextKeyExtraData.cpp
+++ b/obj/NiTextKeyExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTextKeyExtraData.h"
+#include "obj/NiTextKeyExtraData.h"
 
 //Definition of TYPE constant
 const Type NiTextKeyExtraData::TYPE("NiTextKeyExtraData", &NI_TEXT_KEY_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiTextKeyExtraData.h b/obj/NiTextKeyExtraData.h
index 4a04acda24096a1cdc796d819cc13328da83b34c..627b9cc50673b63510877638ab98537688b6d138 100644
--- a/obj/NiTextKeyExtraData.h
+++ b/obj/NiTextKeyExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITEXTKEYEXTRADATA_H_
 #define _NITEXTKEYEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_TEXT_KEY_EXTRA_DATA_INCLUDE
 
 /*
  * NiTextKeyExtraData
diff --git a/obj/NiTextureEffect.cpp b/obj/NiTextureEffect.cpp
index 314cb2f9e0af99fa1607c60a6409441fe8e120db..ccdd84667c4f37f9ca0aa0eb7a0319a52251f34f 100644
--- a/obj/NiTextureEffect.cpp
+++ b/obj/NiTextureEffect.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTextureEffect.h"
-#include "NiSourceTexture.h"
+#include "obj/NiTextureEffect.h"
 
 //Definition of TYPE constant
 const Type NiTextureEffect::TYPE("NiTextureEffect", &NI_TEXTURE_EFFECT_PARENT::TYPE );
diff --git a/obj/NiTextureEffect.h b/obj/NiTextureEffect.h
index 2dce45de4c058849077c373d5a99381de8bf2aaf..c39b5d968b546c1d300c42a7d3605e0d1a27f9c5 100644
--- a/obj/NiTextureEffect.h
+++ b/obj/NiTextureEffect.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITEXTUREEFFECT_H_
 #define _NITEXTUREEFFECT_H_
 
+#include "NiDynamicEffect.h"
+#include "Ref.h"
+#include "obj/NiSourceTexture.h"
+
 #include "gen/obj_defines.h"
-#include NI_TEXTURE_EFFECT_INCLUDE
 
 /*
  * NiTextureEffect
diff --git a/obj/NiTextureTransformController.cpp b/obj/NiTextureTransformController.cpp
index 9b908b3dd708de5997cc4e40ec19a78fb285a841..65e6a2ff20879983aa81a48c453fbd58aefea6ef 100644
--- a/obj/NiTextureTransformController.cpp
+++ b/obj/NiTextureTransformController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTextureTransformController.h"
-#include "NiFloatData.h"
+#include "obj/NiTextureTransformController.h"
 
 //Definition of TYPE constant
 const Type NiTextureTransformController::TYPE("NiTextureTransformController", &NI_TEXTURE_TRANSFORM_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiTextureTransformController.h b/obj/NiTextureTransformController.h
index fb9f2577ab61292a82849a1d96c20fe0c48622a7..8dd9eb11d45e9e6b41bd15943546c7654797b4cd 100644
--- a/obj/NiTextureTransformController.h
+++ b/obj/NiTextureTransformController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITEXTURETRANSFORMCONTROLLER_H_
 #define _NITEXTURETRANSFORMCONTROLLER_H_
 
+#include "NiSingleInterpolatorController.h"
+#include "Ref.h"
+#include "obj/NiFloatData.h"
+
 #include "gen/obj_defines.h"
-#include NI_TEXTURE_TRANSFORM_CONTROLLER_INCLUDE
 
 /*
  * NiTextureTransformController
diff --git a/obj/NiTexturingProperty.cpp b/obj/NiTexturingProperty.cpp
index 9dd359aab3b213b185f0e2b9cd1343aa8a264a5f..843187e8ae7c078c912bf549f39ed701094132fa 100644
--- a/obj/NiTexturingProperty.cpp
+++ b/obj/NiTexturingProperty.cpp
@@ -1,16 +1,17 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTexturingProperty.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
-#include "NiSourceTexture.h"
+#include "obj/NiTexturingProperty.h"
+#include "gen/TexDesc.h"
+#include "gen/TexDesc.h"
+#include "gen/TexDesc.h"
+#include "gen/TexDesc.h"
+#include "gen/TexDesc.h"
+#include "gen/TexDesc.h"
+#include "gen/TexDesc.h"
+#include "gen/TexDesc.h"
+#include "gen/ShaderTexDesc.h"
+#include "gen/TexDesc.h"
 
 //Definition of TYPE constant
 const Type NiTexturingProperty::TYPE("NiTexturingProperty", &NI_TEXTURING_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiTexturingProperty.h b/obj/NiTexturingProperty.h
index 26759a18283d70071fa3df82caadca82aaf2f2d5..f8b690c8ff9d13bbf19796b7710f73ea536b84f5 100644
--- a/obj/NiTexturingProperty.h
+++ b/obj/NiTexturingProperty.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITEXTURINGPROPERTY_H_
 #define _NITEXTURINGPROPERTY_H_
 
+#include "NiProperty.h"
+#include "gen/TexDesc.h"
+#include "gen/ShaderTexDesc.h"
+
 #include "gen/obj_defines.h"
-#include NI_TEXTURING_PROPERTY_INCLUDE
 
 /*
  * NiTexturingProperty
diff --git a/obj/NiTimeController.cpp b/obj/NiTimeController.cpp
index aa45580b520c714a9bfa0b676716d40874f01096..1b3fc4fde7545e0f2959ee7ae450608a50a921aa 100644
--- a/obj/NiTimeController.cpp
+++ b/obj/NiTimeController.cpp
@@ -1,9 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTimeController.h"
-#include "NiTimeController.h"
-#include "NiObject.h"
+#include "obj/NiTimeController.h"
+#include "obj/NiObject.h"
 
 //Definition of TYPE constant
 const Type NiTimeController::TYPE("NiTimeController", &NI_TIME_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiTimeController.h b/obj/NiTimeController.h
index d7fa1ac3f4e8a0bbcc1877a44be3e09150fcd56c..e5632db06a814cfb75072826762bb0cb670af0f7 100644
--- a/obj/NiTimeController.h
+++ b/obj/NiTimeController.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITIMECONTROLLER_H_
 #define _NITIMECONTROLLER_H_
 
+#include "NiObject.h"
+class NiObject;
+
 #include "gen/obj_defines.h"
-#include NI_TIME_CONTROLLER_INCLUDE
 
 /*
  * NiTimeController
diff --git a/obj/NiTransformController.cpp b/obj/NiTransformController.cpp
index 71fe32a7581aba7d012de0c3950a381b6c370a16..c8ce7a90cc73d3691ae7151cf6a55dec60a89f82 100644
--- a/obj/NiTransformController.cpp
+++ b/obj/NiTransformController.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTransformController.h"
+#include "obj/NiTransformController.h"
 
 //Definition of TYPE constant
 const Type NiTransformController::TYPE("NiTransformController", &NI_TRANSFORM_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiTransformController.h b/obj/NiTransformController.h
index 045839b56071929873f8eb3cc4b01cac93a04265..9a9c78c21f2f9b571fd8cc1f6d437ce7bb37a8c3 100644
--- a/obj/NiTransformController.h
+++ b/obj/NiTransformController.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRANSFORMCONTROLLER_H_
 #define _NITRANSFORMCONTROLLER_H_
 
+#include "NiSingleInterpolatorController.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRANSFORM_CONTROLLER_INCLUDE
 
 /*
  * NiTransformController
diff --git a/obj/NiTransformData.cpp b/obj/NiTransformData.cpp
index c72ea40e3ffb4674ce46e364e36207734aa1f8f3..56ee9c9103cec317a5163ecb1ae358cb143bf664 100644
--- a/obj/NiTransformData.cpp
+++ b/obj/NiTransformData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTransformData.h"
+#include "obj/NiTransformData.h"
 
 //Definition of TYPE constant
 const Type NiTransformData::TYPE("NiTransformData", &NI_TRANSFORM_DATA_PARENT::TYPE );
diff --git a/obj/NiTransformData.h b/obj/NiTransformData.h
index cb2c48de46c7310bd7c41e5b7706ef9f594389b5..e9da1db61553471f941a8239d13243c8ed94e927 100644
--- a/obj/NiTransformData.h
+++ b/obj/NiTransformData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRANSFORMDATA_H_
 #define _NITRANSFORMDATA_H_
 
+#include "NiKeyframeData.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRANSFORM_DATA_INCLUDE
 
 /*
  * NiTransformData
diff --git a/obj/NiTransformInterpolator.cpp b/obj/NiTransformInterpolator.cpp
index d6018622ca219ad23fa9610afa0938b0da789498..bc2640721dd54d68a56b2b9fdbf16c5b2d4df303 100644
--- a/obj/NiTransformInterpolator.cpp
+++ b/obj/NiTransformInterpolator.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTransformInterpolator.h"
-#include "NiTransformData.h"
+#include "obj/NiTransformInterpolator.h"
 
 //Definition of TYPE constant
 const Type NiTransformInterpolator::TYPE("NiTransformInterpolator", &NI_TRANSFORM_INTERPOLATOR_PARENT::TYPE );
diff --git a/obj/NiTransformInterpolator.h b/obj/NiTransformInterpolator.h
index e0f7fd2ec2de3a26f542d486c5074a8fb67ee153..d29f0bbdf98d2ab22e15149251873636b1497670 100644
--- a/obj/NiTransformInterpolator.h
+++ b/obj/NiTransformInterpolator.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRANSFORMINTERPOLATOR_H_
 #define _NITRANSFORMINTERPOLATOR_H_
 
+#include "NiInterpolator.h"
+#include "Ref.h"
+#include "obj/NiTransformData.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRANSFORM_INTERPOLATOR_INCLUDE
 
 /*
  * NiTransformInterpolator
diff --git a/obj/NiTriBasedGeom.cpp b/obj/NiTriBasedGeom.cpp
index 5de263877535215beaa2eb9defb7a3e4967995ea..040f27ab5591617963ccba84f95fb7ae3c320f76 100644
--- a/obj/NiTriBasedGeom.cpp
+++ b/obj/NiTriBasedGeom.cpp
@@ -1,10 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTriBasedGeom.h"
-#include "NiTriBasedGeomData.h"
-#include "NiSkinInstance.h"
-#include "NiObject.h"
+#include "obj/NiTriBasedGeom.h"
 
 //Definition of TYPE constant
 const Type NiTriBasedGeom::TYPE("NiTriBasedGeom", &NI_TRI_BASED_GEOM_PARENT::TYPE );
diff --git a/obj/NiTriBasedGeom.h b/obj/NiTriBasedGeom.h
index d2f356b7987dc7e30299c8342b1c613a2c551f0c..68cf3756a5dbc14b9f96cf0258ac9312d060c118 100644
--- a/obj/NiTriBasedGeom.h
+++ b/obj/NiTriBasedGeom.h
@@ -4,8 +4,13 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRIBASEDGEOM_H_
 #define _NITRIBASEDGEOM_H_
 
+#include "NiAVObject.h"
+#include "Ref.h"
+#include "obj/NiTriBasedGeomData.h"
+#include "obj/NiSkinInstance.h"
+#include "obj/NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRI_BASED_GEOM_INCLUDE
 
 /*
  * NiTriBasedGeom
diff --git a/obj/NiTriBasedGeomData.cpp b/obj/NiTriBasedGeomData.cpp
index 301194e833124ae0b631befc24593eea97a68e9c..f24d33ea32da44bcff5bbf2c80b1ebb8b7dfdf3f 100644
--- a/obj/NiTriBasedGeomData.cpp
+++ b/obj/NiTriBasedGeomData.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTriBasedGeomData.h"
-#include "NiObject.h"
+#include "obj/NiTriBasedGeomData.h"
 
 //Definition of TYPE constant
 const Type NiTriBasedGeomData::TYPE("NiTriBasedGeomData", &NI_TRI_BASED_GEOM_DATA_PARENT::TYPE );
diff --git a/obj/NiTriBasedGeomData.h b/obj/NiTriBasedGeomData.h
index 1719e8291650ffe54e41a4b73bcae6ddae94085f..af76ac9b7a1eb8432c31e0b3915729ab0089b57e 100644
--- a/obj/NiTriBasedGeomData.h
+++ b/obj/NiTriBasedGeomData.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRIBASEDGEOMDATA_H_
 #define _NITRIBASEDGEOMDATA_H_
 
+#include "NiObject.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRI_BASED_GEOM_DATA_INCLUDE
 
 /*
  * NiTriBasedGeomData
diff --git a/obj/NiTriShape.cpp b/obj/NiTriShape.cpp
index ba347d606122b7029db9bf5f3b5f47764fa22a03..8f8c32c3f90c7271af4562bf8c9cbf7cee5b9dd7 100644
--- a/obj/NiTriShape.cpp
+++ b/obj/NiTriShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTriShape.h"
+#include "obj/NiTriShape.h"
 
 //Definition of TYPE constant
 const Type NiTriShape::TYPE("NiTriShape", &NI_TRI_SHAPE_PARENT::TYPE );
diff --git a/obj/NiTriShape.h b/obj/NiTriShape.h
index c83770f8ce075e7bc07f5b87ee228ea5f832ec22..c6b13e97eca75b2d715e947d12d676f26dc39140 100644
--- a/obj/NiTriShape.h
+++ b/obj/NiTriShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRISHAPE_H_
 #define _NITRISHAPE_H_
 
+#include "NiTriBasedGeom.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRI_SHAPE_INCLUDE
 
 /*
  * NiTriShape
diff --git a/obj/NiTriShapeData.cpp b/obj/NiTriShapeData.cpp
index a14018c6e265a801fb5c4d2679a7c653cb86acf9..4f5ba733ea7bd84a316f71de250f18034e3f9511 100644
--- a/obj/NiTriShapeData.cpp
+++ b/obj/NiTriShapeData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTriShapeData.h"
+#include "obj/NiTriShapeData.h"
+#include "gen/MatchGroup.h"
 
 //Definition of TYPE constant
 const Type NiTriShapeData::TYPE("NiTriShapeData", &NI_TRI_SHAPE_DATA_PARENT::TYPE );
diff --git a/obj/NiTriShapeData.h b/obj/NiTriShapeData.h
index b537305a3a906da10d3f3fb419fa9e9824a8ad43..110d84dfe9bb6ea7fa263c3011560f80f670c71d 100644
--- a/obj/NiTriShapeData.h
+++ b/obj/NiTriShapeData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRISHAPEDATA_H_
 #define _NITRISHAPEDATA_H_
 
+#include "NiTriBasedGeomData.h"
+#include "gen/MatchGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRI_SHAPE_DATA_INCLUDE
 
 /*
  * NiTriShapeData
diff --git a/obj/NiTriStrips.cpp b/obj/NiTriStrips.cpp
index 72ce2d36e64b22055febe9bdc21031a36a3ed59b..bb758cd0b3851df8b862ab07bd8530a15aa9388a 100644
--- a/obj/NiTriStrips.cpp
+++ b/obj/NiTriStrips.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTriStrips.h"
+#include "obj/NiTriStrips.h"
 
 //Definition of TYPE constant
 const Type NiTriStrips::TYPE("NiTriStrips", &NI_TRI_STRIPS_PARENT::TYPE );
diff --git a/obj/NiTriStrips.h b/obj/NiTriStrips.h
index 2c35f1cad69a827101d8e0ed9cd8450949f516ab..0b558aa5eb5092bd6c04b176260c054453246f01 100644
--- a/obj/NiTriStrips.h
+++ b/obj/NiTriStrips.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRISTRIPS_H_
 #define _NITRISTRIPS_H_
 
+#include "NiTriBasedGeom.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRI_STRIPS_INCLUDE
 
 /*
  * NiTriStrips
diff --git a/obj/NiTriStripsData.cpp b/obj/NiTriStripsData.cpp
index 2747b62db623edf29869e59527501e5404240acc..d4645c10b6b3d5b4ba69483893727428c64aa7e9 100644
--- a/obj/NiTriStripsData.cpp
+++ b/obj/NiTriStripsData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiTriStripsData.h"
+#include "obj/NiTriStripsData.h"
 
 //Definition of TYPE constant
 const Type NiTriStripsData::TYPE("NiTriStripsData", &NI_TRI_STRIPS_DATA_PARENT::TYPE );
diff --git a/obj/NiTriStripsData.h b/obj/NiTriStripsData.h
index 246376f4f6a446dec3b0560d4dc8095ca40836cd..f775a78a774a08e4e3d7180d0244508de5c0316e 100644
--- a/obj/NiTriStripsData.h
+++ b/obj/NiTriStripsData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NITRISTRIPSDATA_H_
 #define _NITRISTRIPSDATA_H_
 
+#include "NiTriBasedGeomData.h"
+
 #include "gen/obj_defines.h"
-#include NI_TRI_STRIPS_DATA_INCLUDE
 
 /*
  * NiTriStripsData
diff --git a/obj/NiUVController.cpp b/obj/NiUVController.cpp
index cf0b35fa019d3ea11630944e96c8847fba3471c9..b1c69460ff890840a14d46ec79987e54308de180 100644
--- a/obj/NiUVController.cpp
+++ b/obj/NiUVController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiUVController.h"
-#include "NiUVData.h"
+#include "obj/NiUVController.h"
 
 //Definition of TYPE constant
 const Type NiUVController::TYPE("NiUVController", &NI_U_V_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiUVController.h b/obj/NiUVController.h
index 269e4ea0d4af4f9dcae755527df5ce0c42c88ed4..d675069057ed3fca136c22e313d4337bb038ebd5 100644
--- a/obj/NiUVController.h
+++ b/obj/NiUVController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIUVCONTROLLER_H_
 #define _NIUVCONTROLLER_H_
 
+#include "NiTimeController.h"
+#include "Ref.h"
+#include "obj/NiUVData.h"
+
 #include "gen/obj_defines.h"
-#include NI_U_V_CONTROLLER_INCLUDE
 
 /*
  * NiUVController
diff --git a/obj/NiUVData.cpp b/obj/NiUVData.cpp
index da9cb229b370a3ed85a65c9cbdaa437f9a223b9c..819be46854a8b38c66d83f023f126fd46b4960e3 100644
--- a/obj/NiUVData.cpp
+++ b/obj/NiUVData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiUVData.h"
+#include "obj/NiUVData.h"
+#include "gen/KeyGroup.h"
 
 //Definition of TYPE constant
 const Type NiUVData::TYPE("NiUVData", &NI_U_V_DATA_PARENT::TYPE );
diff --git a/obj/NiUVData.h b/obj/NiUVData.h
index 341bc0465ccbd8c1857355b5a3d49762c18f613a..52e9c8d6d38eb35c57d30d861680213bb5412c66 100644
--- a/obj/NiUVData.h
+++ b/obj/NiUVData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIUVDATA_H_
 #define _NIUVDATA_H_
 
+#include "NiObject.h"
+#include "gen/KeyGroup.h"
+
 #include "gen/obj_defines.h"
-#include NI_U_V_DATA_INCLUDE
 
 /*
  * NiUVData
diff --git a/obj/NiVectorExtraData.cpp b/obj/NiVectorExtraData.cpp
index 5817ef3d41717602ba9c549411ff1661940b74c1..0a094f85770f56ed6fac26069b4aeab2a6da20ff 100644
--- a/obj/NiVectorExtraData.cpp
+++ b/obj/NiVectorExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiVectorExtraData.h"
+#include "obj/NiVectorExtraData.h"
 
 //Definition of TYPE constant
 const Type NiVectorExtraData::TYPE("NiVectorExtraData", &NI_VECTOR_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiVectorExtraData.h b/obj/NiVectorExtraData.h
index 42e1787ff1f7d8808920a9ac3a09f9beb00fc07d..6fcccabf7d1d4bd506cfbda66e5f0da70834f3c9 100644
--- a/obj/NiVectorExtraData.h
+++ b/obj/NiVectorExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIVECTOREXTRADATA_H_
 #define _NIVECTOREXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_VECTOR_EXTRA_DATA_INCLUDE
 
 /*
  * NiVectorExtraData
diff --git a/obj/NiVertWeightsExtraData.cpp b/obj/NiVertWeightsExtraData.cpp
index 84297de5390fb8180d6e27838dbdb7ff2679711c..f9165695cde63fada295b2b7e4515e8d228e7824 100644
--- a/obj/NiVertWeightsExtraData.cpp
+++ b/obj/NiVertWeightsExtraData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiVertWeightsExtraData.h"
+#include "obj/NiVertWeightsExtraData.h"
 
 //Definition of TYPE constant
 const Type NiVertWeightsExtraData::TYPE("NiVertWeightsExtraData", &NI_VERT_WEIGHTS_EXTRA_DATA_PARENT::TYPE );
diff --git a/obj/NiVertWeightsExtraData.h b/obj/NiVertWeightsExtraData.h
index b26aad1383aac2ce39c72a8b7713ff08d64ab663..493dc20462ab08c85e47a60d87791acd22732b27 100644
--- a/obj/NiVertWeightsExtraData.h
+++ b/obj/NiVertWeightsExtraData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIVERTWEIGHTSEXTRADATA_H_
 #define _NIVERTWEIGHTSEXTRADATA_H_
 
+#include "NiExtraData.h"
+
 #include "gen/obj_defines.h"
-#include NI_VERT_WEIGHTS_EXTRA_DATA_INCLUDE
 
 /*
  * NiVertWeightsExtraData
diff --git a/obj/NiVertexColorProperty.cpp b/obj/NiVertexColorProperty.cpp
index d25fb9fceb6c690da8f3d8aed78eebecd1e46aaf..7db1db067a1963343ef4803d8fce76b1581059ea 100644
--- a/obj/NiVertexColorProperty.cpp
+++ b/obj/NiVertexColorProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiVertexColorProperty.h"
+#include "obj/NiVertexColorProperty.h"
 
 //Definition of TYPE constant
 const Type NiVertexColorProperty::TYPE("NiVertexColorProperty", &NI_VERTEX_COLOR_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiVertexColorProperty.h b/obj/NiVertexColorProperty.h
index 77df5dff08a638db6e0a1e4786caeb4f29e6aef6..5e5504cad6a4d478a3e63d9aae5f270215b1b55f 100644
--- a/obj/NiVertexColorProperty.h
+++ b/obj/NiVertexColorProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIVERTEXCOLORPROPERTY_H_
 #define _NIVERTEXCOLORPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_VERTEX_COLOR_PROPERTY_INCLUDE
 
 /*
  * NiVertexColorProperty
diff --git a/obj/NiVisController.cpp b/obj/NiVisController.cpp
index c6a14c87474e47f1da5b45e9d7980fea2fab4c4e..e03fe7b4f15af566720b7fe89d8238714bac18cc 100644
--- a/obj/NiVisController.cpp
+++ b/obj/NiVisController.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiVisController.h"
-#include "NiVisData.h"
+#include "obj/NiVisController.h"
 
 //Definition of TYPE constant
 const Type NiVisController::TYPE("NiVisController", &NI_VIS_CONTROLLER_PARENT::TYPE );
diff --git a/obj/NiVisController.h b/obj/NiVisController.h
index 52eb3955634e30c3e07470eff9bac65980fe3a7b..091b4836f701aafc5d44e5b164b2dd99e250b8cf 100644
--- a/obj/NiVisController.h
+++ b/obj/NiVisController.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIVISCONTROLLER_H_
 #define _NIVISCONTROLLER_H_
 
+#include "NiSingleInterpolatorController.h"
+#include "Ref.h"
+#include "obj/NiVisData.h"
+
 #include "gen/obj_defines.h"
-#include NI_VIS_CONTROLLER_INCLUDE
 
 /*
  * NiVisController
diff --git a/obj/NiVisData.cpp b/obj/NiVisData.cpp
index 42bfb31c76d16310bb0cc4e301a1d12e3d9c53b8..0eda2e7e1ef3a5c8714f3145611208aacaf74808 100644
--- a/obj/NiVisData.cpp
+++ b/obj/NiVisData.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiVisData.h"
+#include "obj/NiVisData.h"
 
 //Definition of TYPE constant
 const Type NiVisData::TYPE("NiVisData", &NI_VIS_DATA_PARENT::TYPE );
diff --git a/obj/NiVisData.h b/obj/NiVisData.h
index e5a54dbf1f9fb290d05ec8b5574e68b92630d384..3d00d8bdd8dcad47f2b8742d967a1b581faa1fd9 100644
--- a/obj/NiVisData.h
+++ b/obj/NiVisData.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIVISDATA_H_
 #define _NIVISDATA_H_
 
+#include "AKeyedData.h"
+
 #include "gen/obj_defines.h"
-#include NI_VIS_DATA_INCLUDE
 
 /*
  * NiVisData
diff --git a/obj/NiWireframeProperty.cpp b/obj/NiWireframeProperty.cpp
index 0bc5aa13b75f2c09d1cba7ae5025993d4af22058..50a0849be4fbe5142efdae6c8500d99efb25eccf 100644
--- a/obj/NiWireframeProperty.cpp
+++ b/obj/NiWireframeProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiWireframeProperty.h"
+#include "obj/NiWireframeProperty.h"
 
 //Definition of TYPE constant
 const Type NiWireframeProperty::TYPE("NiWireframeProperty", &NI_WIREFRAME_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiWireframeProperty.h b/obj/NiWireframeProperty.h
index a556d54dd910aebcb627e13c5f4e5d1961ed7b70..149163be74f074cc4a31d6cde3c59b6bd661a1d1 100644
--- a/obj/NiWireframeProperty.h
+++ b/obj/NiWireframeProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIWIREFRAMEPROPERTY_H_
 #define _NIWIREFRAMEPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_WIREFRAME_PROPERTY_INCLUDE
 
 /*
  * NiWireframeProperty
diff --git a/obj/NiZBufferProperty.cpp b/obj/NiZBufferProperty.cpp
index f63ce68986c8f16d231638b7f483b12d4f10ef8b..1806f432b30702bd7d858bf18a9eb2e1e8b041e3 100644
--- a/obj/NiZBufferProperty.cpp
+++ b/obj/NiZBufferProperty.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "NiZBufferProperty.h"
+#include "obj/NiZBufferProperty.h"
 
 //Definition of TYPE constant
 const Type NiZBufferProperty::TYPE("NiZBufferProperty", &NI_Z_BUFFER_PROPERTY_PARENT::TYPE );
diff --git a/obj/NiZBufferProperty.h b/obj/NiZBufferProperty.h
index c78e124417af4287b4ad03e26845376aeb9e216a..bac2cef8733041c2784936bc56aca259d81c3101 100644
--- a/obj/NiZBufferProperty.h
+++ b/obj/NiZBufferProperty.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _NIZBUFFERPROPERTY_H_
 #define _NIZBUFFERPROPERTY_H_
 
+#include "NiProperty.h"
+
 #include "gen/obj_defines.h"
-#include NI_Z_BUFFER_PROPERTY_INCLUDE
 
 /*
  * NiZBufferProperty
diff --git a/obj/RootCollisionNode.cpp b/obj/RootCollisionNode.cpp
index 69f3766bde4f923d9b7f36bf5f81ed0cba636dc2..30a14064039f723e713757a58785950882856f30 100644
--- a/obj/RootCollisionNode.cpp
+++ b/obj/RootCollisionNode.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "RootCollisionNode.h"
+#include "obj/RootCollisionNode.h"
 
 //Definition of TYPE constant
 const Type RootCollisionNode::TYPE("RootCollisionNode", &ROOT_COLLISION_NODE_PARENT::TYPE );
diff --git a/obj/RootCollisionNode.h b/obj/RootCollisionNode.h
index f4955853b28db19dbf9c2f0bac97abdef28c859b..2791b358570b3ac737ec4b675fe19bf9668185c2 100644
--- a/obj/RootCollisionNode.h
+++ b/obj/RootCollisionNode.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _ROOTCOLLISIONNODE_H_
 #define _ROOTCOLLISIONNODE_H_
 
+#include "NiNode.h"
+
 #include "gen/obj_defines.h"
-#include ROOT_COLLISION_NODE_INCLUDE
 
 /*
  * RootCollisionNode
diff --git a/obj/bhkBlendCollisionObject.cpp b/obj/bhkBlendCollisionObject.cpp
index 486479fd05ed3abb55c8972ee4df3cb0a424b269..1783cecc90ff6dbe72ac3f1fd70266c728046ecb 100644
--- a/obj/bhkBlendCollisionObject.cpp
+++ b/obj/bhkBlendCollisionObject.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkBlendCollisionObject.h"
+#include "obj/bhkBlendCollisionObject.h"
 
 //Definition of TYPE constant
 const Type bhkBlendCollisionObject::TYPE("bhkBlendCollisionObject", &BHK_BLEND_COLLISION_OBJECT_PARENT::TYPE );
diff --git a/obj/bhkBlendCollisionObject.h b/obj/bhkBlendCollisionObject.h
index 0154c81e55f77b0b4b888270cd8c03b1ee9e6c79..14ddab76833d5fc4fe620c465876592f795c9b7e 100644
--- a/obj/bhkBlendCollisionObject.h
+++ b/obj/bhkBlendCollisionObject.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKBLENDCOLLISIONOBJECT_H_
 #define _BHKBLENDCOLLISIONOBJECT_H_
 
+#include "NiCollisionObject.h"
+
 #include "gen/obj_defines.h"
-#include BHK_BLEND_COLLISION_OBJECT_INCLUDE
 
 /*
  * bhkBlendCollisionObject
diff --git a/obj/bhkBlendController.cpp b/obj/bhkBlendController.cpp
index 8643ed91760c85e23802aea6131421258aa0f1b4..7ae28ac9de58d66c4cf395acaeb003aab38bf827 100644
--- a/obj/bhkBlendController.cpp
+++ b/obj/bhkBlendController.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkBlendController.h"
+#include "obj/bhkBlendController.h"
 
 //Definition of TYPE constant
 const Type bhkBlendController::TYPE("bhkBlendController", &BHK_BLEND_CONTROLLER_PARENT::TYPE );
diff --git a/obj/bhkBlendController.h b/obj/bhkBlendController.h
index d0a596d797b1f41106a6f06d31360aacae3c56b9..0bd7f15b1d3d6144bebc620ee127172e36da02ab 100644
--- a/obj/bhkBlendController.h
+++ b/obj/bhkBlendController.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKBLENDCONTROLLER_H_
 #define _BHKBLENDCONTROLLER_H_
 
+#include "NiTimeController.h"
+
 #include "gen/obj_defines.h"
-#include BHK_BLEND_CONTROLLER_INCLUDE
 
 /*
  * bhkBlendController
diff --git a/obj/bhkBoxShape.cpp b/obj/bhkBoxShape.cpp
index 7effabb25d3f9ed3c380541e4d1cfdfa20bb9257..486b2dab1633b92b97c17793206c79d6cbb2a5dc 100644
--- a/obj/bhkBoxShape.cpp
+++ b/obj/bhkBoxShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkBoxShape.h"
+#include "obj/bhkBoxShape.h"
 
 //Definition of TYPE constant
 const Type bhkBoxShape::TYPE("bhkBoxShape", &BHK_BOX_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkBoxShape.h b/obj/bhkBoxShape.h
index 52768fbffc78c5c279a73d4bd28078ffd3df1e55..d4d5b8d72107932059dd34b8e30669c3e466528e 100644
--- a/obj/bhkBoxShape.h
+++ b/obj/bhkBoxShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKBOXSHAPE_H_
 #define _BHKBOXSHAPE_H_
 
+#include "bhkConvexShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_BOX_SHAPE_INCLUDE
 
 /*
  * bhkBoxShape
diff --git a/obj/bhkCapsuleShape.cpp b/obj/bhkCapsuleShape.cpp
index 670118a8ac968ae6d5950ad95d9b2e4b878c1b6f..fdcd71449d46f946c14a6a2950138a27e18800c0 100644
--- a/obj/bhkCapsuleShape.cpp
+++ b/obj/bhkCapsuleShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkCapsuleShape.h"
+#include "obj/bhkCapsuleShape.h"
 
 //Definition of TYPE constant
 const Type bhkCapsuleShape::TYPE("bhkCapsuleShape", &BHK_CAPSULE_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkCapsuleShape.h b/obj/bhkCapsuleShape.h
index f19d7d87598b1a4e47c46f108f45ce81939a2f24..927f60c7adae20ed7e28e10dee9a5729bd13e9bf 100644
--- a/obj/bhkCapsuleShape.h
+++ b/obj/bhkCapsuleShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKCAPSULESHAPE_H_
 #define _BHKCAPSULESHAPE_H_
 
+#include "bhkConvexShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_CAPSULE_SHAPE_INCLUDE
 
 /*
  * bhkCapsuleShape
diff --git a/obj/bhkCollisionObject.cpp b/obj/bhkCollisionObject.cpp
index b3f126d2813f24608008ddcb22c16a3b92cd6eb3..9b7084f61f22c9049fc17afc4965140ea3f696c0 100644
--- a/obj/bhkCollisionObject.cpp
+++ b/obj/bhkCollisionObject.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkCollisionObject.h"
+#include "obj/bhkCollisionObject.h"
 
 //Definition of TYPE constant
 const Type bhkCollisionObject::TYPE("bhkCollisionObject", &BHK_COLLISION_OBJECT_PARENT::TYPE );
diff --git a/obj/bhkCollisionObject.h b/obj/bhkCollisionObject.h
index b4268bbaf1118d971d7546eb8d3c33bf74609b6d..7a9d06d2d8d8a984f3499f96c33a7b9c2bee51ad 100644
--- a/obj/bhkCollisionObject.h
+++ b/obj/bhkCollisionObject.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKCOLLISIONOBJECT_H_
 #define _BHKCOLLISIONOBJECT_H_
 
+#include "NiCollisionObject.h"
+
 #include "gen/obj_defines.h"
-#include BHK_COLLISION_OBJECT_INCLUDE
 
 /*
  * bhkCollisionObject
diff --git a/obj/bhkConvexShape.cpp b/obj/bhkConvexShape.cpp
index e1639ae492a4a2bf2d69c1463ee857980bd14a7f..80002bebba7562c21a5c708c6f8ff76d8e43726d 100644
--- a/obj/bhkConvexShape.cpp
+++ b/obj/bhkConvexShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkConvexShape.h"
+#include "obj/bhkConvexShape.h"
 
 //Definition of TYPE constant
 const Type bhkConvexShape::TYPE("bhkConvexShape", &BHK_CONVEX_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkConvexShape.h b/obj/bhkConvexShape.h
index c0aafdfc0c76227460674b20990789e5c170bad0..9a5db313f31b927743a00738a556d0da34580e12 100644
--- a/obj/bhkConvexShape.h
+++ b/obj/bhkConvexShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKCONVEXSHAPE_H_
 #define _BHKCONVEXSHAPE_H_
 
+#include "bhkSphereRepShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_CONVEX_SHAPE_INCLUDE
 
 /*
  * bhkConvexShape
diff --git a/obj/bhkConvexTransformShape.cpp b/obj/bhkConvexTransformShape.cpp
index e442beddfcb682a676dbbeea1d70e513e5e4d264..1ba26c6f85bbdd32135a9f15014912359aa11a1d 100644
--- a/obj/bhkConvexTransformShape.cpp
+++ b/obj/bhkConvexTransformShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkConvexTransformShape.h"
+#include "obj/bhkConvexTransformShape.h"
 
 //Definition of TYPE constant
 const Type bhkConvexTransformShape::TYPE("bhkConvexTransformShape", &BHK_CONVEX_TRANSFORM_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkConvexTransformShape.h b/obj/bhkConvexTransformShape.h
index 975890659592cab7f4e734f5a2f3495ac5894ac7..558920d87c4f682ccb1f98f136124472324e40ef 100644
--- a/obj/bhkConvexTransformShape.h
+++ b/obj/bhkConvexTransformShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKCONVEXTRANSFORMSHAPE_H_
 #define _BHKCONVEXTRANSFORMSHAPE_H_
 
+#include "bhkTransformShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_CONVEX_TRANSFORM_SHAPE_INCLUDE
 
 /*
  * bhkConvexTransformShape
diff --git a/obj/bhkConvexVerticesShape.cpp b/obj/bhkConvexVerticesShape.cpp
index c6b4af29c173eeaa770b17f3fd40b1b8937b584a..10969271f58295af9987e2ccbce1bb5d88a18f9e 100644
--- a/obj/bhkConvexVerticesShape.cpp
+++ b/obj/bhkConvexVerticesShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkConvexVerticesShape.h"
+#include "obj/bhkConvexVerticesShape.h"
 
 //Definition of TYPE constant
 const Type bhkConvexVerticesShape::TYPE("bhkConvexVerticesShape", &BHK_CONVEX_VERTICES_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkConvexVerticesShape.h b/obj/bhkConvexVerticesShape.h
index 5813e48b2c8ca5e37ced2fa5e00e8915e4b633ed..71e22e92fa2329b57653192faadf3de68e490ca1 100644
--- a/obj/bhkConvexVerticesShape.h
+++ b/obj/bhkConvexVerticesShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKCONVEXVERTICESSHAPE_H_
 #define _BHKCONVEXVERTICESSHAPE_H_
 
+#include "bhkSphereRepShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_CONVEX_VERTICES_SHAPE_INCLUDE
 
 /*
  * bhkConvexVerticesShape
diff --git a/obj/bhkEntity.cpp b/obj/bhkEntity.cpp
index 58d9c5204d143288c5016dfa88de0d1ad9312c7a..2d48de336dd2ca874c062726c4566347d639f39b 100644
--- a/obj/bhkEntity.cpp
+++ b/obj/bhkEntity.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkEntity.h"
-#include "bhkShape.h"
+#include "obj/bhkEntity.h"
 
 //Definition of TYPE constant
 const Type bhkEntity::TYPE("bhkEntity", &BHK_ENTITY_PARENT::TYPE );
diff --git a/obj/bhkEntity.h b/obj/bhkEntity.h
index c1adafef5efd3618c8e806522c3d040a0e1ebc57..c1148818fe9b3fa18d176bc078fd9ea7836457a3 100644
--- a/obj/bhkEntity.h
+++ b/obj/bhkEntity.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKENTITY_H_
 #define _BHKENTITY_H_
 
+#include "bhkWorldObject.h"
+#include "Ref.h"
+#include "obj/bhkShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_ENTITY_INCLUDE
 
 /*
  * bhkEntity
diff --git a/obj/bhkHingeConstraint.cpp b/obj/bhkHingeConstraint.cpp
index 68d3a9cf3792a7bf9d38322a26ee17ca53314c93..7cd698694370e801b8712538ed1c989733c287c6 100644
--- a/obj/bhkHingeConstraint.cpp
+++ b/obj/bhkHingeConstraint.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkHingeConstraint.h"
+#include "obj/bhkHingeConstraint.h"
 
 //Definition of TYPE constant
 const Type bhkHingeConstraint::TYPE("bhkHingeConstraint", &BHK_HINGE_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/bhkHingeConstraint.h b/obj/bhkHingeConstraint.h
index dd07614867f751c9988683dd397cd9f522a3595c..d851bcc38f20e08c008e8fad6e091b0f7e4a7429 100644
--- a/obj/bhkHingeConstraint.h
+++ b/obj/bhkHingeConstraint.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKHINGECONSTRAINT_H_
 #define _BHKHINGECONSTRAINT_H_
 
+#include "AbhkConstraint.h"
+
 #include "gen/obj_defines.h"
-#include BHK_HINGE_CONSTRAINT_INCLUDE
 
 /*
  * bhkHingeConstraint
diff --git a/obj/bhkLimitedHingeConstraint.cpp b/obj/bhkLimitedHingeConstraint.cpp
index 0b8bd537bfbf30e895b8a845e9e97f78808f5ad3..0d1255422151366985d85371736e172056c525e8 100644
--- a/obj/bhkLimitedHingeConstraint.cpp
+++ b/obj/bhkLimitedHingeConstraint.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkLimitedHingeConstraint.h"
+#include "obj/bhkLimitedHingeConstraint.h"
+#include "gen/LimitedHingeDescriptor.h"
 
 //Definition of TYPE constant
 const Type bhkLimitedHingeConstraint::TYPE("bhkLimitedHingeConstraint", &BHK_LIMITED_HINGE_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/bhkLimitedHingeConstraint.h b/obj/bhkLimitedHingeConstraint.h
index 75c001282d6bcf0cb95bce9504d82da7f26c04e6..be1b8159a5f417930167a47718e5f84a5c20c3eb 100644
--- a/obj/bhkLimitedHingeConstraint.h
+++ b/obj/bhkLimitedHingeConstraint.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKLIMITEDHINGECONSTRAINT_H_
 #define _BHKLIMITEDHINGECONSTRAINT_H_
 
+#include "AbhkConstraint.h"
+#include "gen/LimitedHingeDescriptor.h"
+
 #include "gen/obj_defines.h"
-#include BHK_LIMITED_HINGE_CONSTRAINT_INCLUDE
 
 /*
  * bhkLimitedHingeConstraint
diff --git a/obj/bhkListShape.cpp b/obj/bhkListShape.cpp
index c246361af93ce456b1bae69f944f6a0dee1bd36c..45c43429f120a19cbb04ff4d422eb48b93340c86 100644
--- a/obj/bhkListShape.cpp
+++ b/obj/bhkListShape.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkListShape.h"
-#include "bhkShape.h"
+#include "obj/bhkListShape.h"
 
 //Definition of TYPE constant
 const Type bhkListShape::TYPE("bhkListShape", &BHK_LIST_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkListShape.h b/obj/bhkListShape.h
index 7ca94099a7ecd56b5b89149c4c25dd099d8fbe78..14bf4546062912fa0b4573d7c60bfbe2466ba33d 100644
--- a/obj/bhkListShape.h
+++ b/obj/bhkListShape.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKLISTSHAPE_H_
 #define _BHKLISTSHAPE_H_
 
+#include "AbhkShapeCollection.h"
+#include "Ref.h"
+#include "obj/bhkShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_LIST_SHAPE_INCLUDE
 
 /*
  * bhkListShape
diff --git a/obj/bhkMalleableConstraint.cpp b/obj/bhkMalleableConstraint.cpp
index ff5168ff5948135a57abcbeea3f58d428fa744f2..12167bffdd2e8c948047866dedf9234c93bbfaa0 100644
--- a/obj/bhkMalleableConstraint.cpp
+++ b/obj/bhkMalleableConstraint.cpp
@@ -1,9 +1,9 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkMalleableConstraint.h"
-#include "NiObject.h"
-#include "NiObject.h"
+#include "obj/bhkMalleableConstraint.h"
+#include "gen/RagDollDescriptor.h"
+#include "gen/LimitedHingeDescriptor.h"
 
 //Definition of TYPE constant
 const Type bhkMalleableConstraint::TYPE("bhkMalleableConstraint", &BHK_MALLEABLE_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/bhkMalleableConstraint.h b/obj/bhkMalleableConstraint.h
index 7b5d8fe1c4dbc6e15c33eb58f3895f1985b63fe4..39d50f4d08b22509ee669c862e9d960934d348aa 100644
--- a/obj/bhkMalleableConstraint.h
+++ b/obj/bhkMalleableConstraint.h
@@ -4,8 +4,13 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKMALLEABLECONSTRAINT_H_
 #define _BHKMALLEABLECONSTRAINT_H_
 
+#include "AbhkConstraint.h"
+#include "Ref.h"
+#include "obj/NiObject.h"
+#include "gen/RagDollDescriptor.h"
+#include "gen/LimitedHingeDescriptor.h"
+
 #include "gen/obj_defines.h"
-#include BHK_MALLEABLE_CONSTRAINT_INCLUDE
 
 /*
  * bhkMalleableConstraint
diff --git a/obj/bhkMoppBvTreeShape.cpp b/obj/bhkMoppBvTreeShape.cpp
index ae0f223e4db5aaf63df2488e265c5dd4184f3dd1..a65a31f6fd0dc03f635075dd631e952484db9bea 100644
--- a/obj/bhkMoppBvTreeShape.cpp
+++ b/obj/bhkMoppBvTreeShape.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkMoppBvTreeShape.h"
-#include "bhkShape.h"
+#include "obj/bhkMoppBvTreeShape.h"
 
 //Definition of TYPE constant
 const Type bhkMoppBvTreeShape::TYPE("bhkMoppBvTreeShape", &BHK_MOPP_BV_TREE_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkMoppBvTreeShape.h b/obj/bhkMoppBvTreeShape.h
index e058820ea5fa215a7f3a6ef41428992a1541d593..37e311e15c48d44bd6c79818d61ff2f3a77f7c6f 100644
--- a/obj/bhkMoppBvTreeShape.h
+++ b/obj/bhkMoppBvTreeShape.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKMOPPBVTREESHAPE_H_
 #define _BHKMOPPBVTREESHAPE_H_
 
+#include "bhkShape.h"
+#include "Ref.h"
+#include "obj/bhkShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_MOPP_BV_TREE_SHAPE_INCLUDE
 
 /*
  * bhkMoppBvTreeShape
diff --git a/obj/bhkMultiSphereShape.cpp b/obj/bhkMultiSphereShape.cpp
index 4914c8a479c67cf941936d85b9ef947242e9ef81..3cb715d06ad0fc6c79eb14e0bdaa074945fdad32 100644
--- a/obj/bhkMultiSphereShape.cpp
+++ b/obj/bhkMultiSphereShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkMultiSphereShape.h"
+#include "obj/bhkMultiSphereShape.h"
 
 //Definition of TYPE constant
 const Type bhkMultiSphereShape::TYPE("bhkMultiSphereShape", &BHK_MULTI_SPHERE_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkMultiSphereShape.h b/obj/bhkMultiSphereShape.h
index 48619888684af0f1005f020fc2e6f2a456a2be7a..eae68f4975c290c31a825f52b29c8b35cb620495 100644
--- a/obj/bhkMultiSphereShape.h
+++ b/obj/bhkMultiSphereShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKMULTISPHERESHAPE_H_
 #define _BHKMULTISPHERESHAPE_H_
 
+#include "bhkSphereRepShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_MULTI_SPHERE_SHAPE_INCLUDE
 
 /*
  * bhkMultiSphereShape
diff --git a/obj/bhkNiTriStripsShape.cpp b/obj/bhkNiTriStripsShape.cpp
index 7bcafe15134af4dad105694ce474f4748a65555c..851ee6879008fa5e5faf93a977a3bf3adb1eae12 100644
--- a/obj/bhkNiTriStripsShape.cpp
+++ b/obj/bhkNiTriStripsShape.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkNiTriStripsShape.h"
-#include "NiTriStripsData.h"
+#include "obj/bhkNiTriStripsShape.h"
 
 //Definition of TYPE constant
 const Type bhkNiTriStripsShape::TYPE("bhkNiTriStripsShape", &BHK_NI_TRI_STRIPS_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkNiTriStripsShape.h b/obj/bhkNiTriStripsShape.h
index 93dcf7747803da53e4cfd5b1f8987b5066869363..c734b3bb552374221c27c226b062bae7e58bc95f 100644
--- a/obj/bhkNiTriStripsShape.h
+++ b/obj/bhkNiTriStripsShape.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKNITRISTRIPSSHAPE_H_
 #define _BHKNITRISTRIPSSHAPE_H_
 
+#include "bhkSphereRepShape.h"
+#include "Ref.h"
+#include "obj/NiTriStripsData.h"
+
 #include "gen/obj_defines.h"
-#include BHK_NI_TRI_STRIPS_SHAPE_INCLUDE
 
 /*
  * bhkNiTriStripsShape
diff --git a/obj/bhkPackedNiTriStripsShape.cpp b/obj/bhkPackedNiTriStripsShape.cpp
index 4709132c316bc13559e9e2a78aa808a54b467f4a..ec71526555551138594cd08998dce503af5b3499 100644
--- a/obj/bhkPackedNiTriStripsShape.cpp
+++ b/obj/bhkPackedNiTriStripsShape.cpp
@@ -1,8 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkPackedNiTriStripsShape.h"
-#include "hkPackedNiTriStripsData.h"
+#include "obj/bhkPackedNiTriStripsShape.h"
 
 //Definition of TYPE constant
 const Type bhkPackedNiTriStripsShape::TYPE("bhkPackedNiTriStripsShape", &BHK_PACKED_NI_TRI_STRIPS_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkPackedNiTriStripsShape.h b/obj/bhkPackedNiTriStripsShape.h
index 22013d977396e216467209002a15755e9b0da400..9396e96f5d770772c526f0733b6ea169f9389187 100644
--- a/obj/bhkPackedNiTriStripsShape.h
+++ b/obj/bhkPackedNiTriStripsShape.h
@@ -4,8 +4,11 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKPACKEDNITRISTRIPSSHAPE_H_
 #define _BHKPACKEDNITRISTRIPSSHAPE_H_
 
+#include "AbhkShapeCollection.h"
+#include "Ref.h"
+#include "obj/hkPackedNiTriStripsData.h"
+
 #include "gen/obj_defines.h"
-#include BHK_PACKED_NI_TRI_STRIPS_SHAPE_INCLUDE
 
 /*
  * bhkPackedNiTriStripsShape
diff --git a/obj/bhkPrismaticConstraint.cpp b/obj/bhkPrismaticConstraint.cpp
index 733c294ef50b35a2f3e061ccb74060e3294d1410..125d113074f2341dcbc2ee69e5ad3222c0fb2df5 100644
--- a/obj/bhkPrismaticConstraint.cpp
+++ b/obj/bhkPrismaticConstraint.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkPrismaticConstraint.h"
+#include "obj/bhkPrismaticConstraint.h"
 
 //Definition of TYPE constant
 const Type bhkPrismaticConstraint::TYPE("bhkPrismaticConstraint", &BHK_PRISMATIC_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/bhkPrismaticConstraint.h b/obj/bhkPrismaticConstraint.h
index fef8fd007648061b34ac11f1cb954b551717e8e6..1ec6b6ab72d57d68dcf9d027b5b4f3dcf5c2d234 100644
--- a/obj/bhkPrismaticConstraint.h
+++ b/obj/bhkPrismaticConstraint.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKPRISMATICCONSTRAINT_H_
 #define _BHKPRISMATICCONSTRAINT_H_
 
+#include "AbhkConstraint.h"
+
 #include "gen/obj_defines.h"
-#include BHK_PRISMATIC_CONSTRAINT_INCLUDE
 
 /*
  * bhkPrismaticConstraint
diff --git a/obj/bhkRagdollConstraint.cpp b/obj/bhkRagdollConstraint.cpp
index fe9ffbb2eb98f77ac72f6fdfa996184f801312b7..fab97db185a361d6cf0bab749330c9ae535a0ed6 100644
--- a/obj/bhkRagdollConstraint.cpp
+++ b/obj/bhkRagdollConstraint.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkRagdollConstraint.h"
+#include "obj/bhkRagdollConstraint.h"
 
 //Definition of TYPE constant
 const Type bhkRagdollConstraint::TYPE("bhkRagdollConstraint", &BHK_RAGDOLL_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/bhkRagdollConstraint.h b/obj/bhkRagdollConstraint.h
index 73f9f48fa51a12545b27df8bf6ae5fff0d89ca89..7e827370c943d5b68f01d3bb701949322a46161d 100644
--- a/obj/bhkRagdollConstraint.h
+++ b/obj/bhkRagdollConstraint.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKRAGDOLLCONSTRAINT_H_
 #define _BHKRAGDOLLCONSTRAINT_H_
 
+#include "AbhkRagdollConstraint.h"
+
 #include "gen/obj_defines.h"
-#include BHK_RAGDOLL_CONSTRAINT_INCLUDE
 
 /*
  * bhkRagdollConstraint
diff --git a/obj/bhkRefObject.cpp b/obj/bhkRefObject.cpp
index 348bb33af3eddd11072d5165c2ae71bffa401498..37325ece7724107ba6c5361960040a6b413941e6 100644
--- a/obj/bhkRefObject.cpp
+++ b/obj/bhkRefObject.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkRefObject.h"
+#include "obj/bhkRefObject.h"
 
 //Definition of TYPE constant
 const Type bhkRefObject::TYPE("bhkRefObject", &BHK_REF_OBJECT_PARENT::TYPE );
diff --git a/obj/bhkRefObject.h b/obj/bhkRefObject.h
index d451abbc997f26901d67d9a6781dfdf6c29e34f3..3a73a269a14075ffeb79d2e119dc7b2592e1a7b9 100644
--- a/obj/bhkRefObject.h
+++ b/obj/bhkRefObject.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKREFOBJECT_H_
 #define _BHKREFOBJECT_H_
 
+#include "NiObject.h"
+
 #include "gen/obj_defines.h"
-#include BHK_REF_OBJECT_INCLUDE
 
 /*
  * bhkRefObject
diff --git a/obj/bhkRigidBody.cpp b/obj/bhkRigidBody.cpp
index 3697fdc6999e29459fecf19c0d4c12727ff5ee09..0f29e5ddea0106aab352119a9ea4ac754c6c8404 100644
--- a/obj/bhkRigidBody.cpp
+++ b/obj/bhkRigidBody.cpp
@@ -1,8 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkRigidBody.h"
-#include "AbhkConstraint.h"
+#include "obj/bhkRigidBody.h"
+#include "gen/QuaternionXYZW.h"
 
 //Definition of TYPE constant
 const Type bhkRigidBody::TYPE("bhkRigidBody", &BHK_RIGID_BODY_PARENT::TYPE );
diff --git a/obj/bhkRigidBody.h b/obj/bhkRigidBody.h
index a1506c321331ac20ca7e62247e300d2e6f76ee38..b2782ed7035485117637bf2cf09e003d171e8a17 100644
--- a/obj/bhkRigidBody.h
+++ b/obj/bhkRigidBody.h
@@ -4,8 +4,12 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKRIGIDBODY_H_
 #define _BHKRIGIDBODY_H_
 
+#include "bhkEntity.h"
+#include "gen/QuaternionXYZW.h"
+#include "Ref.h"
+#include "obj/AbhkConstraint.h"
+
 #include "gen/obj_defines.h"
-#include BHK_RIGID_BODY_INCLUDE
 
 /*
  * bhkRigidBody
diff --git a/obj/bhkRigidBodyT.cpp b/obj/bhkRigidBodyT.cpp
index 9f1c8afe132f2c32c24ff3c8af0b23b6a57a1094..78fb464796ab4ea23c249c680539019062bf5f55 100644
--- a/obj/bhkRigidBodyT.cpp
+++ b/obj/bhkRigidBodyT.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkRigidBodyT.h"
+#include "obj/bhkRigidBodyT.h"
 
 //Definition of TYPE constant
 const Type bhkRigidBodyT::TYPE("bhkRigidBodyT", &BHK_RIGID_BODY_T_PARENT::TYPE );
diff --git a/obj/bhkRigidBodyT.h b/obj/bhkRigidBodyT.h
index b4bc8554479c17998718f962a27cfb289cae8325..64e78e71ed97b2a99d65b2bac94da4f41aa74feb 100644
--- a/obj/bhkRigidBodyT.h
+++ b/obj/bhkRigidBodyT.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKRIGIDBODYT_H_
 #define _BHKRIGIDBODYT_H_
 
+#include "bhkRigidBody.h"
+
 #include "gen/obj_defines.h"
-#include BHK_RIGID_BODY_T_INCLUDE
 
 /*
  * bhkRigidBodyT
diff --git a/obj/bhkSPCollisionObject.cpp b/obj/bhkSPCollisionObject.cpp
index 61dde3719ea6da5a7e43c3ae79a0388f3c99a789..4c3908444d1d34835072f873d1d8ff788851c349 100644
--- a/obj/bhkSPCollisionObject.cpp
+++ b/obj/bhkSPCollisionObject.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkSPCollisionObject.h"
+#include "obj/bhkSPCollisionObject.h"
 
 //Definition of TYPE constant
 const Type bhkSPCollisionObject::TYPE("bhkSPCollisionObject", &BHK_S_P_COLLISION_OBJECT_PARENT::TYPE );
diff --git a/obj/bhkSPCollisionObject.h b/obj/bhkSPCollisionObject.h
index 5b8577d4459b66ce1b5b408b97ca10f76f3c3de0..069836971453231ab91325ab7177f87b0ad28157 100644
--- a/obj/bhkSPCollisionObject.h
+++ b/obj/bhkSPCollisionObject.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKSPCOLLISIONOBJECT_H_
 #define _BHKSPCOLLISIONOBJECT_H_
 
+#include "NiCollisionObject.h"
+
 #include "gen/obj_defines.h"
-#include BHK_S_P_COLLISION_OBJECT_INCLUDE
 
 /*
  * bhkSPCollisionObject
diff --git a/obj/bhkSerializable.cpp b/obj/bhkSerializable.cpp
index 07e95c77c138c9535a5fa7047af8f5de77c7c175..64b719f4325b2a0247173ebbdf83185630950238 100644
--- a/obj/bhkSerializable.cpp
+++ b/obj/bhkSerializable.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkSerializable.h"
+#include "obj/bhkSerializable.h"
 
 //Definition of TYPE constant
 const Type bhkSerializable::TYPE("bhkSerializable", &BHK_SERIALIZABLE_PARENT::TYPE );
diff --git a/obj/bhkSerializable.h b/obj/bhkSerializable.h
index 2ee6ed891352fb5844502db4fd5f86962ded41c4..0c4edf3788b60c10d4af788faa2ffeb6d1bd3ec3 100644
--- a/obj/bhkSerializable.h
+++ b/obj/bhkSerializable.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKSERIALIZABLE_H_
 #define _BHKSERIALIZABLE_H_
 
+#include "bhkRefObject.h"
+
 #include "gen/obj_defines.h"
-#include BHK_SERIALIZABLE_INCLUDE
 
 /*
  * bhkSerializable
diff --git a/obj/bhkShape.cpp b/obj/bhkShape.cpp
index dddca21330a55c37a4ddb64c689b37bf8edb708e..37333ae175c433c008b1abc7913de3a797f7f3ae 100644
--- a/obj/bhkShape.cpp
+++ b/obj/bhkShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkShape.h"
+#include "obj/bhkShape.h"
 
 //Definition of TYPE constant
 const Type bhkShape::TYPE("bhkShape", &BHK_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkShape.h b/obj/bhkShape.h
index 68b3892614cd075e19e996b30248c356b1f38ba9..31ce298e530ba35ef0e8e588425203ca077e77e9 100644
--- a/obj/bhkShape.h
+++ b/obj/bhkShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKSHAPE_H_
 #define _BHKSHAPE_H_
 
+#include "bhkSerializable.h"
+
 #include "gen/obj_defines.h"
-#include BHK_SHAPE_INCLUDE
 
 /*
  * bhkShape
diff --git a/obj/bhkSimpleShapePhantom.cpp b/obj/bhkSimpleShapePhantom.cpp
index 19e1a5c0e94cb1cc349ad1f982fef2299e147234..236a350b75fc320a6d828a1893befcdb1cb6eec9 100644
--- a/obj/bhkSimpleShapePhantom.cpp
+++ b/obj/bhkSimpleShapePhantom.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkSimpleShapePhantom.h"
+#include "obj/bhkSimpleShapePhantom.h"
 
 //Definition of TYPE constant
 const Type bhkSimpleShapePhantom::TYPE("bhkSimpleShapePhantom", &BHK_SIMPLE_SHAPE_PHANTOM_PARENT::TYPE );
diff --git a/obj/bhkSimpleShapePhantom.h b/obj/bhkSimpleShapePhantom.h
index e53d4a8ac487d3acfa0e381080f828b38a5ac8f2..9e89f260125d1a1c14459e3c653b9377e3233aef 100644
--- a/obj/bhkSimpleShapePhantom.h
+++ b/obj/bhkSimpleShapePhantom.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKSIMPLESHAPEPHANTOM_H_
 #define _BHKSIMPLESHAPEPHANTOM_H_
 
+#include "bhkEntity.h"
+
 #include "gen/obj_defines.h"
-#include BHK_SIMPLE_SHAPE_PHANTOM_INCLUDE
 
 /*
  * bhkSimpleShapePhantom
diff --git a/obj/bhkSphereRepShape.cpp b/obj/bhkSphereRepShape.cpp
index cb9432045c2b4894acbc5736633b64016faaa010..4e92f3e7876d5b0c8d4202e0a791f1c070b203cf 100644
--- a/obj/bhkSphereRepShape.cpp
+++ b/obj/bhkSphereRepShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkSphereRepShape.h"
+#include "obj/bhkSphereRepShape.h"
 
 //Definition of TYPE constant
 const Type bhkSphereRepShape::TYPE("bhkSphereRepShape", &BHK_SPHERE_REP_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkSphereRepShape.h b/obj/bhkSphereRepShape.h
index 645a360c1e870e572934e406c76d09a8ab57b25a..7d9d7cca0f5c67e8912fad1951a8ff72b47f3933 100644
--- a/obj/bhkSphereRepShape.h
+++ b/obj/bhkSphereRepShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKSPHEREREPSHAPE_H_
 #define _BHKSPHEREREPSHAPE_H_
 
+#include "bhkShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_SPHERE_REP_SHAPE_INCLUDE
 
 /*
  * bhkSphereRepShape
diff --git a/obj/bhkSphereShape.cpp b/obj/bhkSphereShape.cpp
index b2b678af51bb931e90c72306fe94ec7782acaeb0..71bed08422a449bd7bc9b77bcb1504c41162e229 100644
--- a/obj/bhkSphereShape.cpp
+++ b/obj/bhkSphereShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkSphereShape.h"
+#include "obj/bhkSphereShape.h"
 
 //Definition of TYPE constant
 const Type bhkSphereShape::TYPE("bhkSphereShape", &BHK_SPHERE_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkSphereShape.h b/obj/bhkSphereShape.h
index 605b3299f44ba432b5d313a17509fafbc3fb56ea..72c6e3024ea3b7e15262763e5c6626c9a7023a2c 100644
--- a/obj/bhkSphereShape.h
+++ b/obj/bhkSphereShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKSPHERESHAPE_H_
 #define _BHKSPHERESHAPE_H_
 
+#include "bhkConvexShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_SPHERE_SHAPE_INCLUDE
 
 /*
  * bhkSphereShape
diff --git a/obj/bhkStiffSpringConstraint.cpp b/obj/bhkStiffSpringConstraint.cpp
index fdcd3dcd59ac4e546a3f274bebc9f0d9863dd6f6..9124feb5f613d70c438171b5248ef5c3c97c278f 100644
--- a/obj/bhkStiffSpringConstraint.cpp
+++ b/obj/bhkStiffSpringConstraint.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkStiffSpringConstraint.h"
+#include "obj/bhkStiffSpringConstraint.h"
 
 //Definition of TYPE constant
 const Type bhkStiffSpringConstraint::TYPE("bhkStiffSpringConstraint", &BHK_STIFF_SPRING_CONSTRAINT_PARENT::TYPE );
diff --git a/obj/bhkStiffSpringConstraint.h b/obj/bhkStiffSpringConstraint.h
index 980dfc222249efdcc922a80a244124dc91ae2471..0dd83dfde1c5d882b5e945cee9454f2b150956d6 100644
--- a/obj/bhkStiffSpringConstraint.h
+++ b/obj/bhkStiffSpringConstraint.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKSTIFFSPRINGCONSTRAINT_H_
 #define _BHKSTIFFSPRINGCONSTRAINT_H_
 
+#include "AbhkConstraint.h"
+
 #include "gen/obj_defines.h"
-#include BHK_STIFF_SPRING_CONSTRAINT_INCLUDE
 
 /*
  * bhkStiffSpringConstraint
diff --git a/obj/bhkTransformShape.cpp b/obj/bhkTransformShape.cpp
index d7dea44092c12bcd21997bb12e58a5003d02c171..a8fa5371535bda16358d6dd06e1b4332a3f466ca 100644
--- a/obj/bhkTransformShape.cpp
+++ b/obj/bhkTransformShape.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkTransformShape.h"
+#include "obj/bhkTransformShape.h"
 
 //Definition of TYPE constant
 const Type bhkTransformShape::TYPE("bhkTransformShape", &BHK_TRANSFORM_SHAPE_PARENT::TYPE );
diff --git a/obj/bhkTransformShape.h b/obj/bhkTransformShape.h
index 4374afa191f2179c4eab7852816ee033965f5fd3..094b2bd53ed9fccb3138d514111d2aa701aaeb49 100644
--- a/obj/bhkTransformShape.h
+++ b/obj/bhkTransformShape.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKTRANSFORMSHAPE_H_
 #define _BHKTRANSFORMSHAPE_H_
 
+#include "bhkEntity.h"
+
 #include "gen/obj_defines.h"
-#include BHK_TRANSFORM_SHAPE_INCLUDE
 
 /*
  * bhkTransformShape
diff --git a/obj/bhkWorldObject.cpp b/obj/bhkWorldObject.cpp
index b5cce9d06dd8a1055012b40ce4d7911de03ecf08..2b05653b19aa40258d0a4dc21e4ade5394fc964b 100644
--- a/obj/bhkWorldObject.cpp
+++ b/obj/bhkWorldObject.cpp
@@ -1,7 +1,7 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "bhkWorldObject.h"
+#include "obj/bhkWorldObject.h"
 
 //Definition of TYPE constant
 const Type bhkWorldObject::TYPE("bhkWorldObject", &BHK_WORLD_OBJECT_PARENT::TYPE );
diff --git a/obj/bhkWorldObject.h b/obj/bhkWorldObject.h
index 54c4aaf4f19a1df904ca3b97056fba07a90f6964..6f89ffa0deb5f130b15de61edf3cbc7e5ed12aa2 100644
--- a/obj/bhkWorldObject.h
+++ b/obj/bhkWorldObject.h
@@ -4,8 +4,9 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _BHKWORLDOBJECT_H_
 #define _BHKWORLDOBJECT_H_
 
+#include "bhkShape.h"
+
 #include "gen/obj_defines.h"
-#include BHK_WORLD_OBJECT_INCLUDE
 
 /*
  * bhkWorldObject
diff --git a/obj/hkPackedNiTriStripsData.cpp b/obj/hkPackedNiTriStripsData.cpp
index 381e24246c4dd2e163e2134b11bddbe259880184..17cc12d92697464b15cfd8beb8872958979b923c 100644
--- a/obj/hkPackedNiTriStripsData.cpp
+++ b/obj/hkPackedNiTriStripsData.cpp
@@ -1,7 +1,8 @@
 /* Copyright (c) 2006, NIF File Format Library and Tools
 All rights reserved.  Please see niflib.h for licence. */
 
-#include "hkPackedNiTriStripsData.h"
+#include "obj/hkPackedNiTriStripsData.h"
+#include "gen/hkTriangle.h"
 
 //Definition of TYPE constant
 const Type hkPackedNiTriStripsData::TYPE("hkPackedNiTriStripsData", &HK_PACKED_NI_TRI_STRIPS_DATA_PARENT::TYPE );
diff --git a/obj/hkPackedNiTriStripsData.h b/obj/hkPackedNiTriStripsData.h
index 15648b480f947e34617b020572baaaa076c3a065..412ed2576bf00f717278594ad3fe169579e5d692 100644
--- a/obj/hkPackedNiTriStripsData.h
+++ b/obj/hkPackedNiTriStripsData.h
@@ -4,8 +4,10 @@ All rights reserved.  Please see niflib.h for licence. */
 #ifndef _HKPACKEDNITRISTRIPSDATA_H_
 #define _HKPACKEDNITRISTRIPSDATA_H_
 
+#include "AbhkShapeCollection.h"
+#include "gen/hkTriangle.h"
+
 #include "gen/obj_defines.h"
-#include HK_PACKED_NI_TRI_STRIPS_DATA_INCLUDE
 
 /*
  * hkPackedNiTriStripsData