private AlgebraicParticle constructExpression(boolean sign, ArrayList<AlgebraicParticle> list, int exponent) {
		if(list.size() == 0) {
			//if the exponent isn't one then it needs to be carried over to the number
			if(exponent != 1) return Number.ZERO.cloneWithNewSignAndExponent(sign, exponent);
			return Number.ZERO;
		}
		else if(list.size() == 1) {
			AlgebraicParticle a = list.get(0);
			boolean resultingSign = sign == a.sign();
			//if sign and exponent are right already
			if(exponent == 1 && a.sign() == resultingSign) return a;
			else if((exponent == 1 || a.exponent() == 1)) {
				// Set the sign, and exponent. At least one exponent is 1, so multiplying gives us 
				// the one that isn't.
				return a.cloneWithNewSignAndExponent(resultingSign, exponent * a.exponent());
			}
			// Neither exponent is 1. 
			// Return a single-element term. Maybe a bad idea; not sure what to do.
			else {
				return new Term(resultingSign, list, exponent);
			}
		}
		else return new Expression(sign, list, exponent);
	}