Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Buffer.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Buffer.h	(revision 2090)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Buffer.h	(revision 2291)
@@ -7,92 +7,92 @@
 {
 	template<class T>
-	class buffer : public array<T> {
-	protected:
-		int fill;
-	public:
-		buffer() { init(8); }
-		buffer(int l) { init(l); }
-    
-		inline void init(int l) { array<T>::init(l); fill=0; }
+		class buffer : public array<T> {
+			protected:
+				int fill;
+			public:
+				buffer() { init(8); }
+				buffer(int l) { init(l); }
 
-		inline int add(const T& t);
-		inline void reset();
-		inline int find(const T&);
-		inline T remove(int i);
-		inline int addAll(const buffer<T>& buf);
-		inline void removeDuplicates();
+				inline void init(int l) { array<T>::init(l); fill=0; }
 
-		inline int length() const { return fill; }
-		inline int maxLength() const { return len; }
-		inline void setFill(int l){fill	=	l;}
-	};
+				inline int add(const T& t);
+				inline void reset();
+				inline int find(const T&);
+				inline T remove(int i);
+				inline int addAll(const buffer<T>& buf);
+				inline void removeDuplicates();
+
+				inline int length() const { return fill; }
+				inline int maxLength() const { return len; }
+				inline void setFill(int l){fill	=	l;}
+		};
 
 	template<class T>
-	inline int buffer<T>::add(const T& t)
-	{
-		if( fill == len )
+		inline int buffer<T>::add(const T& t)
 		{
-			resize( len*2 );
+			if(fill == len)
+			{
+				resize(len * 2);
+			}
+
+			data[fill] = t;
+
+			return fill++;
 		}
 
-		data[fill] = t;
-
-		return fill++;
-	}
+	template<class T>
+		inline void buffer<T>::reset()
+		{
+			fill = 0;
+		}
 
 	template<class T>
-	inline void buffer<T>::reset()
-	{
-		fill = 0;
-	}
+		inline int buffer<T>::find(const T& t)
+		{
+			for(int i=0;i<fill;i++)
+				if( data[i] == t )
+					return i;
+
+			return -1;
+		}
 
 	template<class T>
-	inline int buffer<T>::find(const T& t)
-	{
-		for(int i=0;i<fill;i++)
-		if( data[i] == t )
-			return i;
+		inline T buffer<T>::remove(int i)
+		{
+#ifdef SAFETY
+			assert( i>=0 );
+			assert( i<fill );
+#endif
 
-		return -1;
-	}
+			fill--;
+			T temp = data[i];
+			data[i] = data[fill];
+
+			return temp;
+		}
 
 	template<class T>
-	inline T buffer<T>::remove(int i)
-	{
-	#ifdef SAFETY
-		assert( i>=0 );
-		assert( i<fill );
-	#endif
+		inline int buffer<T>::addAll(const buffer<T>& buf)
+		{
+			for (int i=0; i<buf.fill; i++)
+				add(buf(i));
 
-		fill--;
-		T temp = data[i];
-		data[i] = data[fill];
-
-		return temp;
-	}
+			return fill;
+		}
 
 	template<class T>
-	inline int buffer<T>::addAll(const buffer<T>& buf)
-	{
-		for(int i=0; i<buf.fill; i++)
-		add(buf(i));
-
-		return fill;
-	}
-
-	template<class T>
-	inline void buffer<T>::removeDuplicates()
-	{
-		for(int i=0; i<fill; i++)
+		inline void buffer<T>::removeDuplicates()
 		{
-		for(int j=i+1; j<fill; )
-		{
-			if( data[j] == data[i] )
-			remove(j);
-			else
-			j++;
+			for (int i=0; i<fill; i++)
+			{
+				for (int j=i+1; j<fill; )
+				{
+					if ( data[j] == data[i] )
+						remove(j);
+					else
+						j++;
+				}
+			}
 		}
-		}
-	}
 }
 
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Heap.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Heap.h	(revision 1600)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Heap.h	(revision 2291)
@@ -33,4 +33,5 @@
 	{
 		public:
+
 			float import;
 			Heapable *obj;
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Array.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Array.h	(revision 1526)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Array.h	(revision 2291)
@@ -37,6 +37,6 @@
 		inline void array<T>::init(int l)
 		{
-			data = new T[l];
-			len = l;
+			data	=	new T[l];
+			len		=	l;
 		}
 
@@ -44,7 +44,7 @@
 		inline void array<T>::f_r_e_e()
 		{
-			if( data )
+			if(data)
 			{
-				delete[] data;
+				delete	[] data;
 				data = NULL;
 			}
@@ -55,6 +55,6 @@
 		{
 #ifdef SAFETY
-			assert( data );
-			assert( i>=0 && i<len );
+			assert(data);
+			assert(i >= 0 && i < len);
 #endif
 			return data[i];
@@ -65,6 +65,6 @@
 		{
 #ifdef SAFETY
-			assert( data );
-			assert( i>=0 && i<len );
+			assert(data);
+			assert(i >= 0 && i < len);
 #endif
 			return data[i];
@@ -74,9 +74,10 @@
 		inline void array<T>::resize(int l)
 		{
-			T *old = data;
-			data = new T[l];
-			data = (T *)memcpy(data,old,MIN(len,l)*sizeof(T));
-			len = l;
-			delete[] old;
+			T *old	=	data;
+			data		=	new T[l];
+			data		=	(T *)memcpy(data,old,MIN(len,l)*sizeof(T));
+			len			=	l;
+
+			delete	[] old;
 		}
 }
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/simplif.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/simplif.h	(revision 1526)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/simplif.h	(revision 2291)
@@ -13,4 +13,5 @@
 	{
 		public:
+
 			Vertex *v0, *v1;
 
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.cpp	(revision 2194)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.cpp	(revision 2291)
@@ -44,9 +44,9 @@
 	simplif::Vertex *v1 = auxpair->v1;
 
-	simplif::vert_info& v0_info = vertex_info(v0);
-	simplif::vert_info& v1_info = vertex_info(v1);
-
-	simplif::Mat4 Q 		=	v0_info.Q + v1_info.Q;
-	simplif::real norm	=	v0_info.norm + v1_info.norm;
+	simplif::vert_info	*v0_info = vertex_info(v0);
+	simplif::vert_info	*v1_info = vertex_info(v1);
+
+	simplif::Mat4 Q 		=	v0_info->Q + v1_info->Q;
+	simplif::real norm	=	v0_info->norm + v1_info->norm;
 
 	auxpair->cost = simplif::quadrix_pair_target(	Q,
@@ -178,5 +178,5 @@
 																					simplif::Vertex *v1)
 {
-	const simplif::pair_buffer& pairs = vertex_info(v0).pairs;
+	const simplif::pair_buffer& pairs = vertex_info(v0)->pairs;
 
 	for(int i=0; i<pairs.length(); i++)
@@ -197,11 +197,11 @@
 																										simplif::Vertex *v1)
 {
-	simplif::vert_info& v0_info = vertex_info(v0);
-	simplif::vert_info& v1_info = vertex_info(v1);
-
 	simplif::pair_info *pair = new simplif::pair_info(v0,v1);
 
-	v0_info.pairs.add(pair);
-	v1_info.pairs.add(pair);
+	simplif::vert_info		*v0_info = vertex_info(v0);
+	v0_info->pairs.add(pair);
+
+	simplif::vert_info		*v1_info = vertex_info(v1);
+	v1_info->pairs.add(pair);
 
 	return pair;
@@ -213,11 +213,11 @@
 void SimplificationMethod::delete_pair(simplif::pair_info *auxpair)
 {
-	simplif::vert_info& v0_info = vertex_info(auxpair->v0);
-	simplif::vert_info& v1_info = vertex_info(auxpair->v1);
-
-	v0_info.pairs.remove(v0_info.pairs.find(auxpair));
-	v1_info.pairs.remove(v1_info.pairs.find(auxpair));
-
-	if ( auxpair->isInHeap() )
+	simplif::vert_info	*v0_info = vertex_info(auxpair->v0);
+	simplif::vert_info	*v1_info = vertex_info(auxpair->v1);
+
+	v0_info->pairs.remove(v0_info->pairs.find(auxpair));
+	v1_info->pairs.remove(v1_info->pairs.find(auxpair));
+
+	if (auxpair->isInHeap())
 	{
 		heap->kill(auxpair->getHeapPos());
@@ -272,6 +272,6 @@
 	}
 
-	simplif::vert_info&	v0_info = vertex_info(v0);
-	simplif::vert_info&	v1_info = vertex_info(v1);
+	simplif::vert_info	*v0_info = vertex_info(v0);
+	simplif::vert_info	*v1_info = vertex_info(v1);
 
 	//	Simplification step.
@@ -314,6 +314,6 @@
 
 	//	Make v0 be the new vertex
-	v0_info.Q			+= v1_info.Q;
-	v0_info.norm	+= v1_info.norm;
+	v0_info->Q		+= v1_info->Q;
+	v0_info->norm	+= v1_info->norm;
 
 	simplif::Vec3 p(vnew);
@@ -405,7 +405,7 @@
 
 	//	Recalculate pairs associated with v0.
-	for (i	=	0;	i < v0_info.pairs.length();	i++)
-	{
-		simplif::pair_info *p = v0_info.pairs(i);
+	for (i	=	0;	i < v0_info->pairs.length();	i++)
+	{
+		simplif::pair_info *p = v0_info->pairs(i);
 		compute_pair_info(p);
 	}
@@ -418,7 +418,7 @@
 
 	//	Recalculate pairs associated with v1.
-	for (i	=	0;	i < v1_info.pairs.length(); i++)
-	{
-		simplif::pair_info *p = v1_info.pairs(i);
+	for (i	=	0;	i < v1_info->pairs.length(); i++)
+	{
+		simplif::pair_info *p = v1_info->pairs(i);
 
 		simplif::Vertex *u;
@@ -445,5 +445,5 @@
 			p->v1	=	u;
 
-			v0_info.pairs.add(p);
+			v0_info->pairs.add(p);
 			compute_pair_info(p);
 		}
@@ -461,5 +461,5 @@
 
 	//	Safety precaution.
-	v1_info.pairs.reset();
+	v1_info->pairs.reset();
 }
 
@@ -471,5 +471,5 @@
 	if( vinfo.length() > 0 )
 	{
-		Q = vinfo(v->uniqID).Q;
+		Q = vinfo(v->uniqID)->Q;
 		return true;
 	}
@@ -607,184 +607,166 @@
 	float								x,y,z;
 
-	/*
-	if ((*v0) != (*v1))
-	{
-	*/
-		//	Gets the vertex that is not the candidate.
-		if ((*v1) == candidate)
-		{
-			vert 								= v0;
-			v0									=	v1;
-			v1									=	vert;
-		}
-
-		take_bone_from_vert = v0;
-
-		f0	=	_float3_((*v0)[X],(*v0)[Y],(*v0)[Z]);
-		f1	=	_float3_((*v1)[X],(*v1)[Y],(*v1)[Z]);
-
-		while ((it = vertexMultimap.find(f1)) != vertexMultimap.end())
-		{
-			twin_found	=	false;
-
-			lonely_vert	=	m.vertex((*it).second);
-
+	//	Gets the vertex that is not the candidate.
+	if ((*v1) == candidate)
+	{
+		vert 								= v0;
+		v0									=	v1;
+		v1									=	vert;
+	}
+
+	take_bone_from_vert = v0;
+
+	f0	=	_float3_((*v0)[X],(*v0)[Y],(*v0)[Z]);
+	f1	=	_float3_((*v1)[X],(*v1)[Y],(*v1)[Z]);
+
+	while ((it = vertexMultimap.find(f1)) != vertexMultimap.end())
+	{
+		twin_found	=	false;
+
+		lonely_vert	=	m.vertex((*it).second);
+
+		//	Debug.
+		if ((*it).second == 10988)
+		{
+			cout	<<	"Lonely: "
+				<<	lonely_vert->vID
+				<<	endl;
+		}
+
+		for (int	i	=	0;	i < lonely_vert->edgeUses().length();	i++)
+		{
+			econ	=	lonely_vert->edgeUses()(i);
+
+			if (((*econ->org()) == (*v0))
+					||
+					((*econ->dest()) == (*v0)))
+			{
+				lb	=	vertexMultimap.lower_bound(f0);
+				ub	=	vertexMultimap.upper_bound(f0);
+
+				//	For each vertex.
+				while	(lb != ub)
+				{
+					//	If removed vertex is found.
+					if (((*lb).second == econ->org()->vID)
+							||
+							((*lb).second == econ->dest()->vID))
+					{
+						twin_found	=	true;
+
+						//	Break while.
+						lb	=	ub;
+					}
+					else
+					{
+						//	Next iteration.
+						lb++;
+					}
+				}
+
+				break;
+			}
+		}
+
+		//	If a twin edge has been found.
+		if (twin_found)
+		{
 			//	Debug.
-			if ((*it).second == 10988)
-			{
-				cout	<<	"Lonely: "
-							<<	lonely_vert->vID
-							<<	endl;
-			}
-			
-			for (int	i	=	0;	i < lonely_vert->edgeUses().length();	i++)
-			{
-				econ	=	lonely_vert->edgeUses()(i);
-
-				if (((*econ->org()) == (*v0))
-						||
-						((*econ->dest()) == (*v0)))
-				{
-					lb	=	vertexMultimap.lower_bound(f0);
-					ub	=	vertexMultimap.upper_bound(f0);
-
-					//	For each vertex.
-					while	(lb != ub)
-					{
-						//	If removed vertex is found.
-						if (((*lb).second == econ->org()->vID)
-								||
-								((*lb).second == econ->dest()->vID))
-						{
-							twin_found	=	true;
-
-							//	Break while.
-							lb	=	ub;
-						}
-						else
-						{
-							//	Next iteration.
-							lb++;
-						}
-					}
-
-					break;
-				}
-			}
-
-			//	If a twin edge has been found.
-			if (twin_found)
-			{
-				//	Debug.
-				cout	<<	"Twin Contracted..."	<<	endl;
-
-				//	Extract twin edge from heap.
-				pair	=	new_pair(econ->org(),econ->dest());
-
-				//	Copy candidate.
-				pair->candidate	=	candidate;
-
-				pair->notInHeap();
-
-				//	Contract twin pair.
-				do_contract(m, pair, 1);
-				M0.validVertCount--;
-			}
-			else
-			{
-				//	Debug.
-				cout	<<	"Contracting new pair..."	<<	endl;
-
-				new_vert	=	m.newVertex(candidate[X],candidate[Y],candidate[Z]);
-
-				//	Add new vert to multimap.
-				x	=	(*new_vert)[X];
-				y	=	(*new_vert)[Y];
-				z	=	(*new_vert)[Z];
-
-				simplif::Vertex	*v;
-
-				//	Debug.
-				if (new_vert->vID == 10988)
-				{
-					cout	<<	"["
-								<<	x
-								<<	","
-								<<	y
-								<<	","
-								<<	z
-								<<	"]"
-								<<	endl;
-
-					
-					v	=	m.vertex(10988);
-				}
-
-				//	Adds new vertex to multimap.
-				vertexMultimap.insert(vertex_pair(_float3_(x,y,z),new_vert->vID));
-
-				//	Creates new edge.
-				edge	=	m.newEdge(new_vert,lonely_vert);
-
-				//	We assume here there are the same number of vertices
-				//	and texture coordinates and normals.
-
-				// Assign a texture coordinate for the vertex.
-				simplif::Vec2 newtexcoord = m.texcoord(lonely_vert->vID);
-				m.in_TexCoord(newtexcoord);
-
-				//	Assign a normal coordinate for the vbertex.
-				simplif::Vec3 newnormal = m.normal(lonely_vert->vID);
-				m.in_Normal(newnormal);
-
-				//	Adds new vertex information to simplification sequence.
-				vertex_added.id				=	new_vert->vID;
-
-				vertex_added.bonefrom	=	take_bone_from_vert->vID;
-
-				vertex_added.position	=	Vector3(candidate[X],
-																				candidate[Y],
-																				candidate[Z]);
-
-				simplif::Vec2 tc 			= m.texcoord(new_vert->vID);
-				vertex_added.texcoord	=	Vector2(tc[X],tc[Y]);
-
-				simplif::Vec3 vn 		= m.normal(new_vert->vID);
-				vertex_added.normal	=	Vector3(vn[X],vn[Y],vn[Z]);
-
-				msimpseq->mNewVertices.push_back(vertex_added);
-
-				pair						=	new_pair(new_vert,lonely_vert);
-				pair->candidate	=	candidate;
-				pair->notInHeap();
-
-				//	Debug.
-				cout	<<	"new: "
-							<<	new_vert->vID
-							<<	"("
-							<<	(*new_vert)[X]
-							<<	","
-							<<	(*new_vert)[Y]
-							<<	","
-							<<	(*new_vert)[Z]
-							<<	") lonely: "
-							<<	lonely_vert->vID
-							<<	"("
-							<<	(*lonely_vert)[X]
-							<<	","
-							<<	(*lonely_vert)[Y]
-							<<	","
-							<<	(*lonely_vert)[Z]
-							<<	")"
-							<<	endl;
-
-				//	Contract new pair.
-				do_contract(m, pair, 1);
-				M0.validVertCount--;
-			}
-		}
-	/*
-	}
-	*/
+			cout	<<	"Twin Contracted..."	<<	endl;
+
+			//	Extract twin edge from heap.
+			pair	=	new_pair(econ->org(),econ->dest());
+
+			//	Copy candidate.
+			pair->candidate	=	candidate;
+
+			pair->notInHeap();
+
+			//	Contract twin pair.
+			do_contract(m, pair, 1);
+			M0.validVertCount--;
+		}
+		else
+		{
+			//	Debug.
+			cout	<<	"Contracting new pair..."	<<	endl;
+
+			new_vert	=	m.newVertex(candidate[X],candidate[Y],candidate[Z]);
+
+			//	Add new vert to multimap.
+			x	=	(*new_vert)[X];
+			y	=	(*new_vert)[Y];
+			z	=	(*new_vert)[Z];
+
+			//	Adds new vertex to multimap.
+			vertexMultimap.insert(vertex_pair(_float3_(x,y,z),new_vert->vID));
+
+			//	Creates new edge.
+			edge	=	m.newEdge(new_vert,lonely_vert);
+
+			//	We assume here there are the same number of vertices
+			//	and texture coordinates and normals.
+
+			// Assign a texture coordinate for the vertex.
+			simplif::Vec2 newtexcoord = m.texcoord(lonely_vert->vID);
+			m.in_TexCoord(newtexcoord);
+
+			//	Assign a normal coordinate for the vbertex.
+			simplif::Vec3 newnormal = m.normal(lonely_vert->vID);
+			m.in_Normal(newnormal);
+
+			//	Adds new vertex information to simplification sequence.
+			vertex_added.id				=	new_vert->vID;
+
+			vertex_added.bonefrom	=	take_bone_from_vert->vID;
+
+			vertex_added.position	=	Vector3(candidate[X],
+																			candidate[Y],
+																			candidate[Z]);
+
+			simplif::Vec2 tc 			= m.texcoord(new_vert->vID);
+			vertex_added.texcoord	=	Vector2(tc[X],tc[Y]);
+
+			simplif::Vec3 vn 		= m.normal(new_vert->vID);
+			vertex_added.normal	=	Vector3(vn[X],vn[Y],vn[Z]);
+
+			msimpseq->mNewVertices.push_back(vertex_added);
+
+			//	Debug.
+			vert_info		*new_vert_info;
+			new_vert_info	=	new vert_info();
+
+			vinfo.add(new_vert_info);
+			//------------------------------
+
+			pair						=	new_pair(new_vert,lonely_vert);
+			pair->candidate	=	candidate;
+			pair->notInHeap();
+
+			//	Debug.
+			cout	<<	"new: "
+				<<	new_vert->vID
+				<<	"("
+				<<	(*new_vert)[X]
+				<<	","
+				<<	(*new_vert)[Y]
+				<<	","
+				<<	(*new_vert)[Z]
+				<<	") lonely: "
+				<<	lonely_vert->vID
+				<<	"("
+				<<	(*lonely_vert)[X]
+				<<	","
+				<<	(*lonely_vert)[Y]
+				<<	","
+				<<	(*lonely_vert)[Z]
+				<<	")"
+				<<	endl;
+
+			//	Contract new pair.
+			do_contract(m, pair, 1);
+			M0.validVertCount--;
+		}
+	}
 }
 
@@ -793,14 +775,14 @@
 simplif::real SimplificationMethod::decimate_error(simplif::Vertex *v)
 {
-	simplif::vert_info& info = vertex_info(v);
-
-	simplif::real err = simplif::quadrix_evaluate_vertex(*v, info.Q);
-
-    if ( simplif::will_weight_by_area )
-		{
-			err /= info.norm;
-		}
-
-    return err;
+	simplif::vert_info	*info = vertex_info(v);
+
+	simplif::real err = simplif::quadrix_evaluate_vertex(*v, info->Q);
+
+	if ( simplif::will_weight_by_area )
+	{
+		err /= info->norm;
+	}
+
+	return err;
 }
 
@@ -817,5 +799,5 @@
 		top = heap->top();
 		
-		if( !top )
+		if(!top)
 		{
 			return -1.0;
@@ -824,5 +806,5 @@
 		pair = (simplif::pair_info *)top->obj;
 
-		if( pair->isValid() )
+		if(pair->isValid())
 		{
 			break;
@@ -844,5 +826,5 @@
 
 	for(int i=0; i<m.vertCount(); i++)
-		if( m.vertex(i)->isValid() )
+		if(m.vertex(i)->isValid())
 		{
 			max_err = MAX(max_err, decimate_error(m.vertex(i)));
@@ -861,5 +843,12 @@
 
 	//	Reserve memory for vert_info array.
-	vinfo.init(m.vertCount()*2);
+
+	for (i	=	0; i < m.vertCount(); i++)
+	{
+		vert_info			*new_vert_info;
+		new_vert_info	=	new vert_info();
+
+		vinfo.add(new_vert_info);
+	}
 
 	if (simplif::will_use_vertex_constraint)
@@ -872,5 +861,5 @@
 			if (v->isValid())
 			{
-				vertex_info(v).Q = simplif::quadrix_vertex_constraint(*v);
+				vertex_info(v)->Q = simplif::quadrix_vertex_constraint(*v);
 			}
 		}
@@ -895,6 +884,6 @@
 				for (j	=	0;	j < 3;	j++)
 				{
-					vertex_info(m.face(i)->vertex(j)).Q			+=	Q;
-					vertex_info(m.face(i)->vertex(j)).norm	+=	norm;
+					vertex_info(m.face(i)->vertex(j))->Q		+=	Q;
+					vertex_info(m.face(i)->vertex(j))->norm	+=	norm;
 				}
 			}
@@ -919,8 +908,9 @@
 
 				B *= simplif::boundary_constraint_weight;
-				vertex_info(m.edge(i)->org()).Q += B;
-				vertex_info(m.edge(i)->org()).norm += norm;
-				vertex_info(m.edge(i)->dest()).Q += B;
-				vertex_info(m.edge(i)->dest()).norm += norm;
+
+				vertex_info(m.edge(i)->org())->Q			+= B;
+				vertex_info(m.edge(i)->org())->norm		+= norm;
+				vertex_info(m.edge(i)->dest())->Q			+= B;
+				vertex_info(m.edge(i)->dest())->norm	+= norm;
 			}
 		}
@@ -937,5 +927,7 @@
 		if (m.edge(i)->isValid())
 		{
-			simplif::pair_info *pair = new_pair(m.edge(i)->org(), m.edge(i)->dest());
+			simplif::pair_info *pair = new_pair(m.edge(i)->org(),
+																					m.edge(i)->dest());
+
 			//pointers_to_remove.push_back(pair);
 
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.h	(revision 2194)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.h	(revision 2291)
@@ -78,8 +78,8 @@
 		simplif::Model M0;
 
-		simplif::buffer<simplif::vert_info> vinfo;
+		simplif::buffer<simplif::vert_info *> vinfo;
 
 		simplif::Heap *heap;
-		simplif::real proximity_limit;    // distance threshold squared
+		simplif::real proximity_limit;	// Distance threshold squared.
 
 		int initialVertCount;
@@ -90,21 +90,21 @@
 		MeshSimplificationSequence	*msimpseq;
 
-		inline simplif::vert_info& vertex_info(simplif::Vertex *v)
+		inline simplif::vert_info	* vertex_info(simplif::Vertex *v)
 		{
 			return vinfo(v->validID());
 		}
 
-		simplif::real pair_mesh_penalty(simplif::Model& M,
-				simplif::Vertex *v1,
-				simplif::Vertex *v2,
-				simplif::Vec3& vnew);
-
-		int predict_face(simplif::Face& F,
-				simplif::Vertex *v1,
-				simplif::Vertex *v2,
-				simplif::Vec3& vnew,
-				simplif::Vec3& f1,
-				simplif::Vec3& f2,
-				simplif::Vec3& f3);
+		simplif::real pair_mesh_penalty(simplif::Model	&M,
+																		simplif::Vertex *v1,
+																		simplif::Vertex *v2,
+																		simplif::Vec3& vnew);
+
+		int predict_face(	simplif::Face		&F,
+											simplif::Vertex *v1,
+											simplif::Vertex *v2,
+											simplif::Vec3& vnew,
+											simplif::Vec3& f1,
+											simplif::Vec3& f2,
+											simplif::Vec3& f3);
 
 		bool check_for_pair(simplif::Vertex *v0, simplif::Vertex *v1);
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/AdjModel.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/AdjModel.h	(revision 1526)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/AdjModel.h	(revision 2291)
@@ -70,19 +70,19 @@
 			// Basic model accessor functions
 			//
-			simplif::Vertex *vertex(int i) { return vertices(i); }
-			simplif::Vec3 & normal(int i){ return normals(i); }
-			simplif::Vec2 & texcoord(int i){ return texcoords(i); }
-			simplif::Edge *edge(int i) { return edges(i); }
-			simplif::Face *face(int i) { return faces(i); }
+			simplif::Vertex *vertex(int i) {return vertices(i);}
+			simplif::Vec3 & normal(int i){return normals(i);}
+			simplif::Vec2 & texcoord(int i){return texcoords(i);}
+			simplif::Edge *edge(int i) {return edges(i);}
+			simplif::Face *face(int i) {return faces(i);}
 
-			int vertCount() { return vertices.length(); }
-			int normCount() { return normals.length();  }
-			int texcoordCount() { return texcoords.length();  }
-			int edgeCount() { return edges.length();    }
-			int faceCount() { return faces.length();    }
+			int vertCount() {return vertices.length();}
+			int normCount() {return normals.length();}
+			int texcoordCount() {return texcoords.length();}
+			int edgeCount() {return edges.length();}
+			int faceCount() {return faces.length();}
 
-			vert_buffer& allVertices() { return vertices; }
-			edge_buffer& allEdges()    { return edges;    }
-			face_buffer& allFaces()    { return faces;    }
+			vert_buffer& allVertices() {return vertices;}
+			edge_buffer& allEdges()    {return edges;}
+			face_buffer& allFaces()    {return faces;}
 
 			//
@@ -124,5 +124,5 @@
 			int in_TexCoord(const Vec2&);
 
-			int in_Face(int v1, int v2, int v3, 
+			int in_Face(int v1, int v2, int v3,
 									int n1, int n2, int n3,
 									int t1, int t2, int t3);
