 
 			return quadBatchID;
 		}
-
-
-		// properties
-		public function get numQuads():int
-		{
-			return _numQuads;
-		}
-
-
-		public function get tinted():Boolean
-		{
-			return _tinted;
-		}
-
-
-		public function get texture():Texture2D
-		{
-			return _texture;
-		}
-
-
-		public function get smoothing():String
-		{
-			return _smoothing;
-		}
-
-
-		private function get capacity():int
-		{
-			return _vertexData.numVertices / 4;
-		}
-
-
-		// program management
+		
+		
+		/**
+		 * @private
+		 */
 		private static function registerPrograms():void
 		{
 			var target:Render2D = Render2D.current;
-			if (target.hasProgram(QUAD_PROGRAM_NAME)) return;
-			// already registered
-
-			var assembler:AGALMiniAssembler = new AGALMiniAssembler();
-			var vertexProgramCode:String;
-			var fragmentProgramCode:String;
+			if (target.hasProgram(QUAD_PROGRAM_NAME)) return; // already registered
+			
+			var agal:AGALMiniAssembler = new AGALMiniAssembler();
 
 			// this is the input data we'll pass to the shaders:
 			//

			// fs0 -> texture

			// Quad:

			vertexProgramCode = "m44 op, va0, vc1 \n" + // 4x4 matrix transform to output clipspace 
			"mul v0, va1, vc0 \n";
			// multiply alpha (vc0) with color (va1)

			fragmentProgramCode = "mov oc, v0       \n";
			// output color

			target.registerProgram(QUAD_PROGRAM_NAME, assembler.assemble(Context3DProgramType.VERTEX, vertexProgramCode), assembler.assemble(Context3DProgramType.FRAGMENT, fragmentProgramCode));

			// Image:
			// Each combination of tinted/repeat/mipmap/smoothing has its own fragment shader.

			for each (var tinted:Boolean in [true, false])
			{
				vertexProgramCode = tinted ? "m44 op, va0, vc1 \n" + // 4x4 matrix transform to output clipspace 
				"mul v0, va1, vc0 \n" + // multiply alpha (vc0) with color (va1) 
				"mov v1, va2      \n"   // pass texture coordinates to fragment program
				: "m44 op, va0, vc1 \n" + // 4x4 matrix transform to output clipspace 
				"mov v1, va2      \n";
				// pass texture coordinates to fragment program

				fragmentProgramCode = tinted ? "tex ft1,  v1, fs0 <???> \n" + // sample texture 0 
				"mul  oc, ft1,  v0       \n"   // multiply color with texel color
				: "tex  oc,  v1, fs0 <???> \n";
				// sample texture 0

				var smoothingTypes:Array = [TextureSmoothing2D.NONE, TextureSmoothing2D.BILINEAR, TextureSmoothing2D.TRILINEAR];

				var formats:Array = [Context3DTextureFormat.BGRA, Context3DTextureFormat.COMPRESSED, "compressedAlpha"// use explicit string for compatibility
				];

				for each (var repeat:Boolean in [true, false])
				{
					for each (var mipmap:Boolean in [true, false])

	import flash.utils.getQualifiedClassName;
	
	
	/**
	 * 	Optimizes rendering of a number of quads with an identical state.
	 * 
	 *  <p>The majority of all rendered objects in Render2D are quads. In fact, all the default
	 *  leaf nodes of Render2D are quads (the Image and Quad classes). The rendering of those 
