Index: GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h	(revision 720)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h	(revision 727)
@@ -57,5 +57,5 @@
 		/// the probability that this node contains view point
 		float mProbability;
-		/// geometry of node induced by half planes
+		/// geometry of node as induced by planes
 		BspNodeGeometry *mGeometry;
 		/// pvs size
@@ -63,9 +63,9 @@
 		/// how often this branch has missed the max-cost ratio
 		int mMaxCostMisses;
-		/// if this node is a kd-node (i.e., boundaries are axis aligned)
+		/// if this node is a kd-node (i.e., boundaries are axis aligned
 		bool mIsKdNode;
-		/// current split axis: used for octree
+		// current axis
 		int mAxis;
-		/// for priority traversal: priority of this traversal data
+		// current priority
 		float mPriority;
 
@@ -89,5 +89,6 @@
 		mMaxCostMisses(0), 
 		mIsKdNode(false),
-		mPriority(0)
+		mPriority(0),
+		mAxis(0)
 		{}
 		
@@ -108,5 +109,6 @@
 		mMaxCostMisses(0),
 		mIsKdNode(false),
-		mPriority(0)
+		mPriority(0),
+		mAxis(0)
 		{}
 
@@ -123,5 +125,6 @@
 		mGeometry(geom),
 		mMaxCostMisses(0),
-		mIsKdNode(false)
+		mIsKdNode(false),
+		mAxis(0)
 		{}
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.h	(revision 710)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.h	(revision 727)
@@ -914,11 +914,13 @@
 				  int &contributingSamples);
 
-	/** Preprocesses polygons and throws out all polygons which are coincident to
-		the view space box faces (they can be problematic).
+	/** Preprocesses polygons and throws out all polygons which 
+		are coincident to the view space box faces:
+		These polygons can can be problematic for bsp because they create
+		bad view cells.
 	*/
 	void PreprocessPolygons(PolygonContainer &polys);
 
-	/** Returns view cell corresponding to 
-		the invalid view space. If it does not exist, it is created.
+	/** Returns view cell corresponding to the invalid view space. 
+		If it does not exist, it is created.
 	*/
 	BspViewCell *GetOrCreateOutOfBoundsCell();
Index: GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 726)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 727)
@@ -2463,6 +2463,7 @@
 			if (!onlyValid || node->TreeValid())
 			{
-				ViewCell *viewCell = 
-					mViewCellsTree->GetActiveViewCell(dynamic_cast<BspLeaf *>(node)->GetViewCell());
+				ViewCell *leafVc = dynamic_cast<BspLeaf *>(node)->GetViewCell();
+
+				ViewCell *viewCell = mViewCellsTree->GetActiveViewCell(leafVc);
 						
 				if (!onlyUnmailed || !viewCell->Mailed()) 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 726)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 727)
@@ -324,4 +324,5 @@
 		ConstructSubdivision(preprocessor->mObjects, initialSamples);
 
+	// initial samples count for overall samples ...
 	numSamples += numInitialSamples;
 
@@ -369,4 +370,6 @@
 	{
 		cout << "casting " << mSamplesPerPass << " samples of " << n << " ... ";
+		Debug << "casting " << mSamplesPerPass << " samples of " << n << " ... ";
+
 		VssRayContainer constructionSamples;
 
@@ -378,4 +381,5 @@
 		if (0) dirSamples = !dirSamples; // toggle sampling method
 
+		// cast new samples
 		numSamples += CastPassSamples(mSamplesPerPass, 
 									  samplingType,
@@ -386,6 +390,6 @@
 		cout << "computing sample contribution for " << (int)constructionSamples.size() << " samples ... ";
 
-		// TODO: leak?
-		if (1 || SAMPLE_AFTER_SUBDIVISION)
+		// computes sample contribution of cast rays TODO: leak?
+		if (SAMPLE_AFTER_SUBDIVISION)
 			ComputeSampleContributions(constructionSamples, true, false);
 
