 		{
 			sort();
 			
-			var numEq : uint = _equations.length;
-			for (var eqId : int = 0; eqId < numEq; ++eqId)
-				for (var eqId2 : int = eqId + 1; eqId2 < numEq; ++eqId2)
-					simplify(eqId2, eqId, eqId);
+			var numEquations	: uint = _equations.length;
+			var equationId		: int;
 			
-			for (eqId = numEq - 1; eqId >= 0; --eqId)
-				for (eqId2 = 0; eqId2 < eqId; ++eqId2)
-					simplify(eqId2, eqId, eqId);
+			for (equationId = 0; equationId < numEquations; ++equationId)
+				for (var eqId2 : int = equationId + 1; eqId2 < numEquations; ++eqId2)
+					simplify(eqId2, equationId, equationId);
+			
+			for (equationId = numEquations - 1; equationId >= 0; --equationId)
+				for (eqId2 = 0; eqId2 < equationId; ++eqId2)
+					simplify(eqId2, equationId, equationId);
 			
 			var result : Vector.<Number> = new Vector.<Number>();
-			for (eqId = 0; eqId < _numVariables; ++eqId)
-				result.push(_equations[eqId][_numVariables] / _equations[eqId][eqId]);
+			for (equationId = 0; equationId < _numVariables; ++equationId)
+				result.push(_equations[equationId][_numVariables] / _equations[equationId][equationId]);
 			
 			return result;
 		}
 		
 		private function sort() : void
 		{
-			var numEq : uint = _equations.length;
+			var numEquations : uint = _equations.length;
 			
-			for (var eqId : uint = 0; eqId < numEq; ++eqId)
-				for (var eqId2 : uint = eqId; eqId2 < numEq; ++eqId2)
-					if (_equations[eqId2][eqId] != 0)
+			for (var equationId1 : uint = 0; equationId1 < numEquations; ++equationId1)
+				for (var equationId2 : uint = equationId1; equationId2 < numEquations; ++equationId2)
+					if (_equations[equationId2][equationId1] != 0)
 					{
-						var tmp : Vector.<Number>	= _equations[eqId];
-						_equations[eqId]			= _equations[eqId2];
-						_equations[eqId2]			= tmp;
+						var tmp : Vector.<Number>	= _equations[equationId1];
+						_equations[equationId1]		= _equations[equationId2];
+						_equations[equationId2]		= tmp;
 						break;
 					}
 		}

		
		public function GaussianSystem(numVariables : uint)
		{
			_numVariables = numVariables;
			_equations = new Vector.<Vector.<Number>>();
		}
		
		public function addEquation(v : Vector.<Number>) : void
		{
			_equations.push(v);
		}
		

			var ratio : Number = 
				_equations[targetLine][targetComponent] / _equations[targetComponent][targetComponent];
			
			for (var variableId : uint = 0; variableId <= _numVariables; ++variableId)
				_equations[targetLine][variableId] -= _equations[sourceLine][variableId] * ratio;
		}
	}
}