Index: /trunk/src/org/expeditee/actions/Simple.java
===================================================================
--- /trunk/src/org/expeditee/actions/Simple.java	(revision 201)
+++ /trunk/src/org/expeditee/actions/Simple.java	(revision 202)
@@ -325,6 +325,6 @@
 	}
 
-	private static void RunFrame(Frame frame, Text current, boolean acceptKeyboardInput,
-			boolean step, int pause, Color color) {
+	private static void RunFrame(Frame frame, Text current,
+			boolean acceptKeyboardInput, boolean step, int pause, Color color) {
 		try {
 			DisplayIO.addToBack(current.getParent());
@@ -354,5 +354,6 @@
 	}
 
-	public static void RunFrame(Frame frame, Text current, boolean acceptKeyboardInput) {
+	public static void RunFrame(Frame frame, Text current,
+			boolean acceptKeyboardInput) {
 		RunFrame(frame, current, acceptKeyboardInput, false, 0, null);
 	}
@@ -368,5 +369,6 @@
 	 * @param pause
 	 */
-	public static void DebugFrame(Frame frame, Text current, float pause, Color color) {
+	public static void DebugFrame(Frame frame, Text current, float pause,
+			Color color) {
 		if (isProgramRunning()) {
 			stop();
@@ -794,30 +796,29 @@
 			// Add the variables in the system
 			context.getPrimitives().addToParser(myParser);
-			Node equation = myParser.parseExpression(toCalculate);
-			// TODO get the answer
-			if (equation == null) {
+			try {
+				Node equation = myParser.parse(toCalculate);
+				String value = myParser.evaluate(equation, false);
+				// Add a new variable if its an assignment statement
+				String newVar = SReal.prefix + myParser.getNewVariable();
+				if (newVar.length() > 0) {
+					try {
+						context.getPrimitives().setValue(newVar,
+								new SString(value));
+					} catch (IncorrectTypeException e) {
+						result = false;
+						error = e.getMessage();
+					}
+				}
+				if (tokens.length > 2) {
+					context.getPrimitives().setValue(tokens[2],
+							new SString(value));
+				}
+				// TODO get the answer
+			} catch (Throwable e) {
 				result = false;
-				error = myParser.getErrorInfo().replace("\n", "");
-			} else {
-				double value = myParser.getValue();
-				if (myParser.hasError()) {
-					result = false;
+				if (myParser.getErrorInfo() == null) {
+					error = e.getMessage();
+				} else {
 					error = myParser.getErrorInfo().replace("\n", "");
-				} else {
-					// Add a new variable if its an assignment statement
-					String newVar = myParser.getNewVariable();
-					if (newVar.length() > 0) {
-						try {
-							context.getPrimitives().setValue(newVar,
-									new SReal(value));
-						} catch (IncorrectTypeException e) {
-							result = false;
-							error = e.getMessage();
-						}
-					}
-					if (tokens.length > 2) {
-						context.getPrimitives().setValue(tokens[2],
-								new SReal(value));
-					}
 				}
 			}
Index: /trunk/src/org/expeditee/gui/DisplayIO.java
===================================================================
--- /trunk/src/org/expeditee/gui/DisplayIO.java	(revision 201)
+++ /trunk/src/org/expeditee/gui/DisplayIO.java	(revision 202)
@@ -65,5 +65,5 @@
 	 * The title to display in the Title bar.
 	 */
-	public static final String TITLE = "Exp07Aug2008A";
+	public static final String TITLE = "Exp08Aug2008A";
 
 	private DisplayIO() {
Index: /trunk/src/org/expeditee/math/ExpediteeJEP.java
===================================================================
--- /trunk/src/org/expeditee/math/ExpediteeJEP.java	(revision 201)
+++ /trunk/src/org/expeditee/math/ExpediteeJEP.java	(revision 202)
@@ -50,8 +50,13 @@
 	}
 
-	public String evaluate(Node node) throws ParseException{
+	public String evaluate(Node node) throws ParseException {
+		return evaluate(node, true);
+	}
+
+	public String evaluate(Node node, boolean prependVarName)
+			throws ParseException {
 		Object rawResult = super.evaluate(node);
 		if (rawResult instanceof Double) {
-			Double result = (Double)rawResult;
+			Double result = (Double) rawResult;
 			if (result.isNaN()) {
 				return null;
@@ -64,5 +69,6 @@
 			String varName = observer.toString();
 			if (varName.length() > 0)
-				return varName + ": " + nf.format(result);
+				return (prependVarName ? (varName + ": ") : "")
+						+ nf.format(result);
 
 			return nf.format(result);
@@ -88,5 +94,5 @@
 						frame, t.getEnclosedShape());
 				String variableName = t.getText().toLowerCase();
-				
+
 				addVectorVariable(enclosed, variableName);
 			}
@@ -102,6 +108,5 @@
 		for (Item i : items) {
 			if (i instanceof Text && !i.isLineEnd()) {
-				Double value = AttributeUtils.getDoubleValue(i
-						.getText());
+				Double value = AttributeUtils.getDoubleValue(i.getText());
 				if (value != null) {
 					vector.add(value);
@@ -110,6 +115,5 @@
 		}
 		if (vector.size() > 0)
-			addVariable(variableName, MVector
-					.getInstance(vector.toArray()));
+			addVariable(variableName, MVector.getInstance(vector.toArray()));
 	}
 
Index: /trunk/src/org/expeditee/simple/Primitives.java
===================================================================
--- /trunk/src/org/expeditee/simple/Primitives.java	(revision 201)
+++ /trunk/src/org/expeditee/simple/Primitives.java	(revision 202)
@@ -272,5 +272,5 @@
 			try {
 				Double value = var.doubleValue();
-				myParser.addVariable(var.getName(), value);
+				myParser.addVariable(var.getName().substring(SReal.prefix.length()), value);
 			} catch (Exception e) {
 			}
