Index: trunk/tests/org/expeditee/actions/SimpleTest.java
===================================================================
--- trunk/tests/org/expeditee/actions/SimpleTest.java	(revision 80)
+++ trunk/tests/org/expeditee/actions/SimpleTest.java	(revision 80)
@@ -0,0 +1,201 @@
+package org.expeditee.actions;
+
+import junit.framework.TestCase;
+
+import org.expeditee.actions.Simple;
+import org.expeditee.gui.Browser;
+import org.expeditee.gui.Frame;
+import org.expeditee.gui.FrameIO;
+import org.expeditee.items.Text;
+import org.expeditee.simple.Context;
+
+public class SimpleTest extends TestCase {
+	static Browser b = Browser._theBrowser;
+
+	Context context;
+	
+	protected void setUp() throws Exception {
+		if(b == null)
+			b = new Browser();
+		super.setUp();
+		context = new Context();
+	}
+
+	public void runSimpleTest(String testFrameName) {
+		String frameName = testFrameName;
+		String frameTitle = null;
+		try {
+			Frame testFrame = FrameIO.LoadFrame(frameName);
+			Text runFrameItem = testFrame.getTitleItem();
+			runFrameItem.setLink(testFrameName);
+			frameTitle = runFrameItem.getFirstLine();
+			Simple.RunFrameAndReportError(runFrameItem, context);
+			System.out.println(frameName + ": " + frameTitle + " ran OK");
+		} catch (Exception e) {
+			System.out.println("FAILED TEST: " + e.getMessage());
+			fail(frameName + ": " + (frameTitle != null ? frameTitle : "")
+					+ " threw unexpected exception");
+		}
+	}
+
+	public void runExceptionTest(String testFrameName) {
+		String frameName = testFrameName;
+		String frameTitle = null;
+		try {
+			Frame testFrame = FrameIO.LoadFrame(frameName);
+			Text runFrameItem = testFrame.getTitleItem();
+			frameTitle = runFrameItem.getFirstLine();
+			Simple.RunFrameAndReportError(runFrameItem, context);
+
+			String message = frameName + ": " + frameTitle
+					+ " unexpectedly ran OK";
+			System.out.println("FAILED TEST! " + message);
+			fail(message);
+		} catch (Exception e) {
+			System.out.println(frameName + ": "
+					+ (frameTitle != null ? frameTitle : "")
+					+ " threw expected exception");
+		}
+	}
+
+	public void testRunFrame() {
+		try {
+			runExceptionTest("SimpleTest1");
+			runExceptionTest("SimpleTest6");
+			runSimpleTest("SimpleTest7");
+			runSimpleTest("SimpleTest9");
+			assertTrue(context.size() == 6);
+
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testCallStatement() {
+		try {
+			runSimpleTest("SimpleTest10");
+			assertTrue(context.getPrimitives().getIntegerValue("$i.1") == 24);
+			assertTrue(context.getPrimitives().getIntegerValue("$i.2") == 42);
+
+			runSimpleTest("SimpleTest11");
+			assertEquals(context.getPrimitives().getStringValue("$s.1"),
+					"String2");
+			assertEquals(context.getPrimitives().getStringValue("$s.2"),
+					"String1");
+
+			runSimpleTest("SimpleTest13");
+			assertEquals(context.getPrimitives().getStringValue("$s.1"),
+					"String2");
+			assertEquals(context.getPrimitives().getStringValue("$s.2"),
+					"String1");
+
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testExitAllStatement() {
+		try {
+			runSimpleTest("SimpleTest15");
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testReturnStatement() {
+		try {
+			runSimpleTest("SimpleTest17");
+			assertEquals(context.getPrimitives().getBooleanValue("$b.Flag"),
+					true);
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testBreakStatement() {
+		try {
+			runSimpleTest("SimpleTest23");
+			assertEquals(context.getPrimitives().getIntegerValue("$i.Result"),
+					243);
+			assertEquals(
+					context.getPrimitives().getIntegerValue("$i.Exponent"), 0);
+
+			runSimpleTest("SimpleTest30");
+			assertEquals(context.getPrimitives().getIntegerValue("$i.Result"),
+					243);
+			assertEquals(
+					context.getPrimitives().getIntegerValue("$i.Exponent"), 0);
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testIfStatements() {
+		try {
+			runExceptionTest("SimpleTest36");
+			runSimpleTest("SimpleTest37");
+			assertEquals(13, context.getPrimitives().getIntegerValue("$i.Counter"));
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testReadFrame() {
+		try {
+			runSimpleTest("SimpleTest42");
+			assertEquals(25, context.getPrimitives().getIntegerValue(
+					"$i.ItemCount"));
+			assertEquals(9, context.getPrimitives().getIntegerValue(
+					"$i.BodyTextCount"));
+			assertEquals(5, context.getPrimitives().getIntegerValue(
+					"$i.AnnotationCount"));
+			assertEquals(3, context.getPrimitives().getIntegerValue(
+					"$i.LinkedCount"));
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testBooleans() {
+		try {
+			runSimpleTest("SimpleTest42");
+			assertEquals(25, context.getPrimitives().getIntegerValue(
+					"$i.ItemCount"));
+			assertEquals(context.getPrimitives().getIntegerValue(
+					"$i.BodyTextCount"), 9);
+			assertEquals(context.getPrimitives().getIntegerValue(
+					"$i.AnnotationCount"), 5);
+			assertEquals(context.getPrimitives().getIntegerValue(
+					"$i.LinkedCount"), 3);
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+
+	public void testDefaultParametres() {
+		try {
+			runSimpleTest("SimpleTest64");
+			assertEquals(context.getPrimitives().getIntegerValue("$i."), 7);
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+	
+	public void testSimpleTestSuite() {
+		try {
+			Simple.RunSimpleTests("SimpleTestSuite");
+		} catch (Exception e) {
+			System.out.println("EVALUATION ERROR: " + e.getMessage());
+			fail(e.getMessage());
+		}
+	}
+}
Index: trunk/tests/org/expeditee/gui/FrameTest.java
===================================================================
--- trunk/tests/org/expeditee/gui/FrameTest.java	(revision 73)
+++ trunk/tests/org/expeditee/gui/FrameTest.java	(revision 80)
@@ -8,4 +8,14 @@
 
 public class FrameTest extends TestCase {
+	Frame f1, f2, f3,f4, root, f5;
+	public void setUp(){
+		 f1 = new Frame(); f1.setName("dgad3");
+		 f2 = new Frame(); f2.setName("f4df5");
+		 f3 = new Frame(); f3.setName("iu5yf4");
+		 f4 = new Frame(); f4.setName("r6s3");
+		 f5 = new Frame(); f4.setName("r6ssdf456");
+		
+		 root = new Frame(); root.setName("roottest1");
+	}
 	
 	public void testConstructor() { // the most trivial test in the world
@@ -52,9 +62,4 @@
 		FrameGraphics.setMaxSize(new Dimension(100,100));
 		
-		Frame f1 = new Frame(); f1.setFrameset("dgadag"); f1.setFrameName("dgad3ag");
-		Frame f2 = new Frame(); f2.setFrameset("fsdf"); f2.setFrameName("f4df");
-		Frame f3 = new Frame(); f3.setFrameset("iuyf"); f3.setFrameName("iu5yf");
-		Frame f4 = new Frame(); f4.setFrameset("rs"); f4.setFrameName("r6s");
-		
 		Overlay o1 = new Overlay(f1, 0);
 		Overlay o2 = new Overlay(f2, 1);
@@ -62,6 +67,4 @@
 		Overlay o4 = new Overlay(f4, 3);
 		
-		Frame root = new Frame(); root.setFrameset("roottest"); root.setFrameName("roottest");
-		
 		root.addOverlay(o1);
 		
@@ -90,6 +93,6 @@
 		for (Overlay o : overlays) {
 			if (o.Frame.getFramesetName() == null) {
-				o.Frame.setFrameName(framesetname);
-				o.Frame.setFrameName(framesetname + "name");
+				o.Frame.setName(framesetname+"1");
+				o.Frame.setName(framesetname + "name"+"1");
 				framesetname = framesetname + "X";
 				
@@ -120,9 +123,9 @@
 		String framesetname = "X";
 		for (Overlay o : overlays) {
-			o.Frame.setFrameName(framesetname);
-			o.Frame.setFrameName(framesetname + "name");
-			framesetname = framesetname + "X";
-		}
-		Frame root = new Frame(); root.setFrameset("roottest"); root.setFrameName("roottest");
+			o.Frame.setName(framesetname + "1");
+			o.Frame.setName(framesetname + "name"+ "1");
+			framesetname = framesetname + "X"+ "1";
+		}
+		Frame root = new Frame(); root.setName("roottest1");
 		
 		root.addAllOverlays(overlays);
@@ -148,9 +151,8 @@
 		String framesetname = "X";
 		for (Overlay o : overlays) {
-			o.Frame.setFrameName(framesetname);
-			o.Frame.setFrameName(framesetname + "name");
+			o.Frame.setName(framesetname+ "1");
+			o.Frame.setName(framesetname + "name"+ "1");
 			framesetname = framesetname + "X";
 		}
-		Frame root = new Frame(); root.setFrameset("roottest"); root.setFrameName("roottest");
 		
 		root.addAllOverlays(overlays);
@@ -169,10 +171,4 @@
 		// TODO: REMOVE THIS LINE - THIS SHOULD NOT BE NEEDED - OTHER TEST CAPTURE THIS ERROR
 		FrameGraphics.setMaxSize(new Dimension(100,100));
-		
-		Frame f1 = new Frame(); f1.setFrameset("dgadag"); f1.setFrameName("dgad3ag");
-		Frame f2 = new Frame(); f2.setFrameset("fsdf"); f2.setFrameName("f4df");
-		Frame f3 = new Frame(); f3.setFrameset("iuyf"); f3.setFrameName("iu5yf");
-		Frame f4 = new Frame(); f4.setFrameset("rs"); f4.setFrameName("r6s");
-		Frame f5 = new Frame(); f5.setFrameset("danfui"); f5.setFrameName("hfjty");
 		
 		Overlay o0 = new Overlay(f1, 0);
@@ -187,6 +183,4 @@
 		f3.addOverlay(o4);
 		
-		Frame root = new Frame(); root.setFrameset("roottest"); root.setFrameName("roottest");
-		
 		
 		root.addOverlay(o0);
@@ -230,7 +224,7 @@
 		for (Overlay o : overlays) {
 			if (o.Frame.getFramesetName() == null) {
-				o.Frame.setFrameName(framesetname);
-				o.Frame.setFrameName(framesetname + "name");
-				framesetname = framesetname + "X";
+				o.Frame.setName(framesetname + "1");
+				o.Frame.setName(framesetname + "name" + "1");
+				framesetname = framesetname + "X" + "1";
 				
 			}
Index: trunk/tests/org/expeditee/io/ConversionTest.java
===================================================================
--- trunk/tests/org/expeditee/io/ConversionTest.java	(revision 73)
+++ trunk/tests/org/expeditee/io/ConversionTest.java	(revision 80)
@@ -4,4 +4,5 @@
 import java.awt.Font;
 import java.awt.Point;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -15,17 +16,25 @@
 
 	public final void testGetColor() {
-		assertTrue(Conversion.getColor("100 0 0", Color.white)
-				.equals(Color.red));
-		assertTrue(Conversion.getColor("0 100 0", Color.white).equals(
-				Color.green));
-		assertTrue(Conversion.getColor("0 0 100", Color.white).equals(
-				Color.blue));
-		assertTrue(Conversion.getColor("100 100 100", Color.white).equals(
+		assertEquals(null, Conversion.getColor("TrAnSpArEnT", Color.white));
+		assertEquals(null, Conversion.getColor("Clear", Color.white));
+		assertEquals(null, Conversion.getColor("Auto", Color.white));
+		assertEquals(null, Conversion.getColor("Default", Color.white));
+		assertEquals(null, Conversion.getColor("adf", Color.red));
+		assertEquals(null, Conversion.getColor("none", Color.red));
+		assertEquals(null, Conversion.getColor("null", Color.red));
+		assertEquals(null, Conversion.getColor(null, Color.red));
+		assertEquals(null, Conversion.getColor("a0a0a0", Color.white));
+
+		assertEquals(Color.red, Conversion.getColor("100 0 0", Color.white));
+		assertEquals(Color.green, Conversion.getColor("0 100 0", Color.white));
+		assertEquals(Color.blue, Conversion.getColor("0 0 100", Color.white));
+		assertEquals(Color.white, Conversion.getColor("100 100 100",
 				Color.white));
+		assertEquals(Color.gray, Conversion.getColor("50 50 50", Color.white));
 		assertEquals(Color.green, Conversion.getColor("-100 +0 -100",
 				Color.white));
-		assertEquals(Conversion.getColor("+0 +100 +0", Color.black),
-				Color.green);
-		assertEquals(Color.white, Conversion.getColor("a0a0a0", Color.white));
+		assertEquals(Color.green, Conversion.getColor("-10 +100 +0", Color.black));
+		assertEquals(Color.green, Conversion.getColor("+0 +110 +0", null));
+		
 		assertEquals(Conversion.getColor("red9", Color.white), new Color(0.9F,
 				0.0F, 0.0F));
@@ -34,34 +43,36 @@
 		assertEquals(Conversion.getColor("GREEN0", Color.white), new Color(
 				0.0F, 0.0F, 0.0F));
-		assertEquals(Color.red, Conversion.getColor("adf", Color.red));
-		assertEquals(Color.red, Conversion.getColor("none", Color.red));
-		assertEquals(Color.red, Conversion.getColor("null", Color.red));
-		assertEquals(Color.red, Conversion.getColor(null, Color.red));
-	}
-
-	public final void testGetKMSColorCode() {
-		assertTrue(Conversion.getKMSColorCode(Color.red).equals("100 0 0"));
-		assertTrue(Conversion.getKMSColorCode(Color.green).equals("0 100 0"));
-		assertTrue(Conversion.getKMSColorCode(Color.blue).equals("0 0 100"));
-	}
-
-	public final void testGetKMSFontCode() {
+		assertEquals(Conversion.getColor("GREEN3", Color.white), new Color(
+				0.0F, 0.3F, 0.0F));
+		assertEquals(Conversion.getColor("Blue1", Color.white), new Color(
+				0.0F, 0.0F, 0.1F));
+	}
+
+	public final void testGetExpediteeColorCode() {
+		assertTrue(Conversion.getExpediteeColorCode(Color.red)
+				.equals("100 0 0"));
+		assertTrue(Conversion.getExpediteeColorCode(Color.green).equals(
+				"0 100 0"));
+		assertTrue(Conversion.getExpediteeColorCode(Color.blue).equals(
+				"0 0 100"));
+	}
+
+	public final void testGetExpediteeFontCode() {
 		Font testFont = new Font(Text.FONT_WHEEL[1], Font.BOLD, 18);
 		Font testFont2 = new Font(Text.FONT_WHEEL[4], Font.ITALIC, 20);
-		Font testFont3 = new Font("xxx123", Font.ITALIC | Font.BOLD,
-				10);
+		Font testFont3 = new Font("xxx123", Font.ITALIC | Font.BOLD, 10);
 		Font testFont4 = new Font(Text.FONT_WHEEL[0], Font.PLAIN, 2);
 
 		String result = Text.FONT_CHARS[1] + "b18";
-		assertEquals(result, Conversion.getKMSFontCode(testFont));
-		
+		assertEquals(result, Conversion.getExpediteeFontCode(testFont));
+
 		result = Text.FONT_CHARS[4] + "i20";
-		assertEquals(result, Conversion.getKMSFontCode(testFont2));
-		
+		assertEquals(result, Conversion.getExpediteeFontCode(testFont2));
+
 		result = "dp10";
-		assertEquals(result, Conversion.getKMSFontCode(testFont3));
-		
+		assertEquals(result, Conversion.getExpediteeFontCode(testFont3));
+
 		result = Text.FONT_CHARS[0] + "r2";
-		assertEquals(result, Conversion.getKMSFontCode(testFont4));
+		assertEquals(result, Conversion.getExpediteeFontCode(testFont4));
 	}
 
@@ -75,11 +86,11 @@
 		String code = Text.FONT_CHARS[1] + "b18";
 		assertEquals(testFont, Conversion.getFont(code));
-		
+
 		code = Text.FONT_CHARS[4] + "i20";
 		assertEquals(testFont2, Conversion.getFont(code));
-		
+
 		code = Text.FONT_CHARS[3] + "p10";
 		assertEquals(testFont3, Conversion.getFont(code));
-		
+
 		code = Text.FONT_CHARS[0] + "r2";
 		assertEquals(testFont4, Conversion.getFont(code));
@@ -119,26 +130,33 @@
 	}
 
-	public final void testGetKMSJustificationCode() {
+	public final void testGetExpediteeJustificationCode() {
 		assertEquals("C", Conversion
-				.getKMSJustificationCode(Item.JUSTIFICATION_CENTER));
+				.getExpediteeJustificationCode(Item.JUSTIFICATION_CENTER));
 		assertEquals("L", Conversion
-				.getKMSJustificationCode(Item.JUSTIFICATION_LEFT));
+				.getExpediteeJustificationCode(Item.JUSTIFICATION_LEFT));
 		assertEquals("R", Conversion
-				.getKMSJustificationCode(Item.JUSTIFICATION_RIGHT));
+				.getExpediteeJustificationCode(Item.JUSTIFICATION_RIGHT));
 		assertEquals("F", Conversion
-				.getKMSJustificationCode(Item.JUSTIFICATION_FULL));
+				.getExpediteeJustificationCode(Item.JUSTIFICATION_FULL));
 		assertEquals(null, Conversion
-				.getKMSJustificationCode(Item.JUSTIFICATION_NONE));
+				.getExpediteeJustificationCode(Item.JUSTIFICATION_NONE));
 		assertEquals(null, Conversion
-				.getKMSJustificationCode(Integer.MAX_VALUE));
+				.getExpediteeJustificationCode(Integer.MAX_VALUE));
 		assertEquals(null, Conversion
-				.getKMSJustificationCode(Integer.MIN_VALUE));
+				.getExpediteeJustificationCode(Integer.MIN_VALUE));
 	}
 
 	public final void testConvertClassString() {
-		assertEquals("Test", Conversion.Convert(String.class, "Test"));
+		assertEquals(null, Conversion.Convert(Class.class, null));
+
+		assertEquals("Test", Conversion.Convert(String.class, "  Test   "));
 		assertEquals(null, Conversion.Convert(String.class, ""));
-		assertEquals(Conversion.getFont("tr16"), Conversion.Convert(Font.class,
-				"tr16"));
+
+		// Test fonts
+		assertEquals(Conversion.getFont("tR16"), Conversion.Convert(Font.class,
+				"Tr16"));
+		assertEquals(Conversion.getFont("tR16"), Conversion.Convert(Font.class,
+				"Tr16"));
+
 		// Test Color Conversion
 		assertEquals(Color.darkGray, Conversion.Convert(Color.class,
@@ -153,16 +171,19 @@
 		assertEquals(Color.blue, Conversion.Convert(Color.class, "0 0 100"));
 		// Test Boolean Conversion
+		assertEquals(true, Conversion.Convert(boolean.class, ""));
 		assertEquals(true, Conversion.Convert(boolean.class, "tRuE"));
 		assertEquals(true, Conversion.Convert(boolean.class, "T"));
 		assertEquals(true, Conversion.Convert(boolean.class, "yes"));
 		assertEquals(true, Conversion.Convert(boolean.class, "Y"));
-		assertEquals(true, Conversion.Convert(boolean.class, ""));
 		assertEquals(false, Conversion.Convert(boolean.class, "FALSE"));
 		assertEquals(false, Conversion.Convert(boolean.class, "no"));
 		assertEquals(false, Conversion.Convert(boolean.class, "n"));
 		assertEquals(false, Conversion.Convert(boolean.class, "f"));
+		assertEquals(false, Conversion.Convert(boolean.class, "XXX"));
 	}
 
 	public final void testConvertClassStringObject() {
+		assertEquals(new Color(255,0,255), Conversion.Convert(Color.class, "+100 +0 +100",
+				null));
 		assertEquals(Color.red, Conversion.Convert(Color.class, "+100 +0 -100",
 				Color.blue));
@@ -181,13 +202,91 @@
 		assertEquals(-8, Conversion.Convert(int.class, "+2", -10));
 		assertEquals(8, Conversion.Convert(int.class, "-2", 10));
-	}
-
-	public final void testConvertMethodString() {
+		assertEquals(-1, Conversion.Convert(int.class, "null", 10));
+
+		// Integer Array test
+		int[] expectedResult = {2,10,4,5};
+		int[] actualResult = (int[])Conversion.Convert(int[].class, "2 10 4 5", null);
+		for(int i = 0; i < expectedResult.length; i++)
+			assertEquals(expectedResult[i], actualResult[i]);
+
+		// Point test
+		assertEquals(new Point(-2, 20), Conversion.Convert(Point.class,
+				" -2  20  ", null));
+		assertEquals(new Point(-12, 20), Conversion.Convert(Point.class,
+				"-2 20", new Point(-10, -20)));
+		assertEquals(new Point(-8, -30), Conversion.Convert(Point.class,
+				"+2 -10", new Point(-10, -20)));
 	}
 
 	public final void testConvertMethodStringObject() {
-	}
-
-	public final void testConvertToKMS() {
+		try {
+			Method setPosition = Item.class.getMethod("setPosition",
+					new Class[] { Point.class });
+			Method setJustification = Text.class.getMethod("setJustification",
+					new Class[] { int.class });
+			Method setArrow = Text.class.getMethod("setArrow", new Class[] {
+					int.class, double.class });
+			Method setActions = Text.class.getMethod("setActions",
+					new Class[] { List.class });
+
+			// Test that the two methods return the same value
+			assertEquals(Conversion.Convert(setPosition, " 10  20 ")[0],
+					Conversion.Convert(setPosition, " 10   20", null)[0]);
+			Object[] result = Conversion.Convert(setPosition, " 10   20", null);
+			assertEquals(1, result.length);
+			assertEquals(new Point(10, 20), result[0]);
+			
+			result = Conversion.Convert(setPosition, "-10 20", null);
+			assertEquals(1, result.length);
+			assertEquals(new Point(-10, 20), result[0]);
+
+			// Test justification method
+			String justificationCode = "  f  ";
+			result = Conversion.Convert(setJustification, justificationCode,
+					null);
+			assertEquals(1, result.length);
+			assertEquals(Conversion.getJustification(justificationCode),
+					result[0]);
+			
+			justificationCode = "f";
+			result = Conversion.Convert(setJustification, justificationCode,
+					"");
+			assertEquals(1, result.length);
+			assertEquals(Conversion.getJustification(justificationCode),
+					result[0]);
+
+			// Test the setting of Arrows
+			result = Conversion.Convert(setArrow, " 20  10.5 ", null);
+			assertEquals(2, result.length);
+			assertEquals(20, result[0]);
+			assertEquals(10.5, result[1]);
+
+			result = Conversion.Convert(setArrow, "+20 9.5", "10 10.5");
+			assertEquals(30, result[0]);
+			assertEquals(9.5, result[1]);
+
+			result = Conversion.Convert(setArrow, " 20  +2.5 ", "10 10.5");
+			assertEquals(20, result[0]);
+			assertEquals(13.0, result[1]);
+			
+			assertEquals(null, Conversion.Convert(setArrow, " 23423 "));
+
+			// Test a setMethod with list parameter
+			String actionsString = "action1\naction2\naction3";
+			result = Conversion.Convert(setActions, actionsString, null);
+			assertTrue(result[0] instanceof List);
+			List resultList = (List) result[0];
+			assertEquals(3, resultList.size());
+			assertEquals("action1", resultList.get(0));
+			assertEquals("action2", resultList.get(1));
+			assertEquals("action3", resultList.get(2));
+
+		} catch (Exception e) {
+			fail();
+			e.printStackTrace();
+		}
+	}
+
+	public final void testConvertToExpeditee() {
 		try {
 			java.lang.reflect.Method getPosition = Item.class.getMethod(
@@ -196,41 +295,43 @@
 					"getJustification", new Class[] {});
 
-			assertEquals("C", Conversion.ConvertToKMS(getJustification,
+			assertEquals("C", Conversion.ConvertToExpeditee(getJustification,
 					Item.JUSTIFICATION_CENTER));
 
-			assertEquals("Test", Conversion.ConvertToKMS(getPosition,
+			assertEquals("Test", Conversion.ConvertToExpeditee(getPosition,
 					(Object) "Test"));
-			assertEquals("0", Conversion.ConvertToKMS(getPosition, (Object) 0));
-			assertEquals("0.0", Conversion.ConvertToKMS(getPosition,
+			assertEquals("0", Conversion.ConvertToExpeditee(getPosition,
+					(Object) 0));
+			assertEquals("0.0", Conversion.ConvertToExpeditee(getPosition,
 					(Object) 0.0F));
-			assertEquals(null, Conversion.ConvertToKMS(getPosition,
+			assertEquals(null, Conversion.ConvertToExpeditee(getPosition,
 					(new Integer(-1))));
-			assertEquals(null, Conversion.ConvertToKMS(getPosition, (new Float(
-					-0.1F))));
-			assertEquals(null, Conversion.ConvertToKMS(getPosition,
+			assertEquals(null, Conversion.ConvertToExpeditee(getPosition,
+					(new Float(-0.1F))));
+			assertEquals(null, Conversion.ConvertToExpeditee(getPosition,
 					(new Boolean(true))));
-			assertEquals("F", Conversion.ConvertToKMS(getPosition,
+			assertEquals("F", Conversion.ConvertToExpeditee(getPosition,
 					(new Boolean(false))));
-			assertEquals(null, Conversion.ConvertToKMS(getPosition,
+			assertEquals(null, Conversion.ConvertToExpeditee(getPosition,
 					(new int[] {})));
-			assertEquals("1 22 333", Conversion.ConvertToKMS(getPosition,
+			assertEquals("1 22 333", Conversion.ConvertToExpeditee(getPosition,
 					(new int[] { 1, 22, 333 })));
 
-			assertEquals("22 44", Conversion.ConvertToKMS(getPosition,
+			assertEquals("22 44", Conversion.ConvertToExpeditee(getPosition,
 					(new Point(22, 44))));
 
-			assertEquals("100 0 0", Conversion.ConvertToKMS(getPosition,
+			assertEquals("100 0 0", Conversion.ConvertToExpeditee(getPosition,
 					Color.red));
 
-			assertEquals(null, Conversion.ConvertToKMS(getPosition, null));
+			assertEquals(null, Conversion.ConvertToExpeditee(getPosition, null));
 			List<String> testList = new ArrayList<String>();
 			testList.add("test");
 
-			assertEquals(testList, Conversion.ConvertToKMS(getPosition,
+			assertEquals(testList, Conversion.ConvertToExpeditee(getPosition,
 					testList));
 
 			Font testFont = new Font(Text.FONT_WHEEL[1], Font.BOLD, 18);
 			String result = Text.FONT_CHARS[1] + "b18";
-			assertEquals(result, Conversion.ConvertToKMS(getPosition, testFont));
+			assertEquals(result, Conversion.ConvertToExpeditee(getPosition,
+					testFont));
 		} catch (Exception e) {
 			e.printStackTrace();
Index: trunk/tests/org/expeditee/io/DefaultFrameWriterTest.java
===================================================================
--- trunk/tests/org/expeditee/io/DefaultFrameWriterTest.java	(revision 80)
+++ trunk/tests/org/expeditee/io/DefaultFrameWriterTest.java	(revision 80)
@@ -0,0 +1,13 @@
+package org.expeditee.io;
+
+import junit.framework.TestCase;
+
+public class DefaultFrameWriterTest extends TestCase {
+
+	public final void testGetValidFilename() {
+		assertEquals("", DefaultFrameWriter.getValidFilename(""));
+		assertEquals("_b_c", DefaultFrameWriter.getValidFilename(" b c"));
+		assertEquals("Test_txt", DefaultFrameWriter.getValidFilename("Test.txt"));
+	}
+
+}
Index: trunk/tests/org/expeditee/items/ItemUtilsTest.java
===================================================================
--- trunk/tests/org/expeditee/items/ItemUtilsTest.java	(revision 80)
+++ trunk/tests/org/expeditee/items/ItemUtilsTest.java	(revision 80)
@@ -0,0 +1,62 @@
+package org.expeditee.items;
+
+import junit.framework.TestCase;
+
+public class ItemUtilsTest extends TestCase {
+
+	public final void testContainsTagListOfItemString() {
+		// fail("Not yet implemented");
+	}
+
+	public final void testContainsExactTagListOfItemString() {
+		// fail("Not yet implemented");
+	}
+
+	public final void testFindTagListOfItemString() {
+		// fail("Not yet implemented");
+	}
+
+	public final void testFindExactTagListOfItemInt() {
+		// fail("Not yet implemented");
+	}
+
+	public final void testIsTagItemIntBoolean() {
+		// fail("Not yet implemented");
+	}
+
+	public final void testIsTagItemStringBoolean() {
+		Text text = new Text(1, "");
+		String[] valid = new String[] { "@i", "@I:", "   @i:  ",
+				"@i: 111 111 111" };
+		String[] invalid = new String[] { "", "@isTest", "i:", "@i : 111","@ i: 111",
+				"@i; 111" };
+
+		for (int i = 0; i < valid.length; i++) {
+			text.setText(valid[i]);
+			assertTrue(ItemUtils.startsWithTag(text, "@i"));
+		}
+		for (int i = 0; i < invalid.length; i++) {
+			text.setText(invalid[i]);
+			assertFalse(ItemUtils.startsWithTag(text, "@i"));
+		}
+		text.setText("@LongItem: test test");
+		assertTrue(ItemUtils.startsWithTag(text, "@lOnGiTeM"));
+	}
+
+	public final void testStripTagStringString() {
+		// fail("Not yet implemented");
+	}
+	
+	public final void testStripTagSymbol() {
+		String[][] params = new String[][] { { "@item", "item" },
+				{ "@", "" }, { null, null }, { "", "" } };
+		for (int i = 0; i < params.length; i++) {
+			assertEquals(params[i][1], ItemUtils.StripTagSymbol(params[i][0]));
+		}
+	}
+
+	public final void testGetTag() {
+		// fail("Not yet implemented");
+	}
+
+}
Index: trunk/tests/org/expeditee/simple/ContextTest.java
===================================================================
--- trunk/tests/org/expeditee/simple/ContextTest.java	(revision 80)
+++ trunk/tests/org/expeditee/simple/ContextTest.java	(revision 80)
@@ -0,0 +1,40 @@
+package org.expeditee.simple;
+
+import org.expeditee.items.Text;
+import org.expeditee.simple.Context;
+
+import junit.framework.TestCase;
+
+public class ContextTest extends TestCase {
+
+    private Context context;
+
+    protected void setUp() throws Exception {
+	super.setUp();
+	context = new Context();
+	try {
+	    context.getPrimitives().setValue("$i.test", "5");
+	    context.getPrimitives().set("$r.test", "$i.test");
+	    context.getPointers().setObject("$ip.test", new Text(1, "test"));
+	    context.getPointers().set("$ip.test2", "$ip.test");
+	} catch (Exception e) {
+	}
+    }
+
+    public void testSize() {
+	assertEquals(context.size(), 4);
+    }
+
+    public void testClear() {
+	context.clear();
+	assertEquals(context.size(), 0);
+    }
+
+    public void testEqualValues() {
+	try {
+	    assertTrue(context.equalValues("$i.test", "$r.Test"));
+	} catch (Exception e) {
+
+	}
+    }
+}
Index: trunk/tests/org/expeditee/simple/PrimitivesTest.java
===================================================================
--- trunk/tests/org/expeditee/simple/PrimitivesTest.java	(revision 80)
+++ trunk/tests/org/expeditee/simple/PrimitivesTest.java	(revision 80)
@@ -0,0 +1,544 @@
+package org.expeditee.simple;
+
+import org.expeditee.simple.Primitives;
+
+import junit.framework.TestCase;
+
+public class PrimitivesTest extends TestCase {
+
+    private Primitives primitives;
+
+    protected void setUp() throws Exception {
+	super.setUp();
+	primitives = new Primitives();
+    }
+
+    public void testSet() {
+	// Variable doesnt exist
+	try {
+	    primitives.set("$i.Test", "$i.Testing");
+	    fail("Exception not thrown for variable that doesnt exist!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.set("$i.Test", "Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.set("$i.Test", "t.Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.set("$i.Test", null);
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.set("$i.Test", "i.Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.set("$i.test", "10");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+
+	// Now test adding some valid variables
+	try {
+	    primitives.setValue("$i.Test", "10");
+	    primitives.set("$i.Test2", "$i.Test");
+	    long iTest = primitives.getIntegerValue("$i.Test");
+	    assertEquals(iTest, primitives.getIntegerValue("$i.Test2"));
+	    primitives.set("$i.Test", "$i.Test");
+	    long newITest = primitives.getIntegerValue("$i.Test");
+	    assertEquals(iTest, newITest);
+
+	    primitives.set("$r.Test", "$i.Test");
+	    assertEquals(primitives.getIntegerValue("$r.Test"), newITest);
+	} catch (Exception e) {
+	    fail("Exception thrown for valid variables");
+	}
+    }
+
+    public void testsetValue() {
+	// First add a few bad variables
+	try {
+	    primitives.setValue("$i.Test", "Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.setValue("$t.Test", "Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.setValue("$i.", "Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.setValue("%i.Test", "Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.setValue("i.Test", "Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+	try {
+	    primitives.setValue("Test", "Test");
+	    fail("Exception not thrown for invalid variable!");
+	} catch (Exception e) {
+	}
+
+	// Now test adding some valid variables
+	try {
+	    primitives.setValue("$i.Test", "10");
+	    primitives.setValue("$i.Test", "15");
+	    assertEquals(primitives.getIntegerValue("$i.Test"), 15);
+
+	    primitives.setValue("$r.Test", "10.0");
+	    primitives.setValue("$r.Test", "15.0");
+	    assertEquals(primitives.getDoubleValue("$r.Test"), 15.0);
+
+	    primitives.setValue("$b.Test", "True");
+	    primitives.setValue("$s.Test", "Testing 1, 2, 3");
+	    assertEquals(primitives.size(), 4);
+	} catch (Exception e) {
+	    fail("Exception thrown for valid variables");
+	}
+    }
+
+    public void testEqualValues() {
+	// Do the basic cases
+	try {
+	    primitives.setValue("$i.1", "5");
+	    primitives.setValue("$i.2", "5");
+	    primitives.setValue("$i.3", "-10");
+	    assertTrue(primitives.equalValues("$i.1", "$i.1"));
+	    assertTrue(primitives.equalValues("$i.3", "$i.3"));
+	    assertTrue(primitives.equalValues("$i.1", "$i.2"));
+	    assertFalse(primitives.equalValues("$i.1", "$i.3"));
+	} catch (Exception e) {
+	    fail("1. " + e.getMessage());
+	}
+
+	// Different vars and rounding checking
+	try {
+	    primitives.setValue("$i.4", "-5");
+	    primitives.setValue("$r.1", "-5.1");
+	    primitives.setValue("$s.1", "-4.9");
+	    primitives.setValue("$s.2", "-5.1");
+	    primitives.setValue("$s.3", "-5.6");
+	    assertTrue(primitives.equalValues("$i.4", "$r.1"));
+	    assertFalse(primitives.equalValues("$r.1", "$s.3"));
+	    assertTrue(primitives.equalValues("$r.1", "$s.2"));
+	    assertFalse(primitives.equalValues("$r.1", "$s.1"));
+	} catch (Exception e) {
+	    fail("2. " + e.getMessage());
+	}
+
+	// Strings
+	try {
+	    primitives.setValue("$s.1", "Testing");
+	    primitives.setValue("$s.2", "Test");
+	    primitives.setValue("$s.3", "Test");
+	    assertTrue(primitives.equalValues("$s.1", "$s.1"));
+	    assertTrue(primitives.equalValues("$s.2", "$s.3"));
+	    assertFalse(primitives.equalValues("$s.1", "$s.3"));
+	} catch (Exception e) {
+	    fail("2. " + e.getMessage());
+	}
+
+	// Adding to variable that doesnt exist
+	try {
+	    primitives.equalValues("$i.4", "$i.7");
+	    fail("7. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	// Adding a variable that doesnt exist
+	try {
+	    primitives.equalValues("$i.7", "$i.4");
+	    fail("8. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+    }
+
+    public void testAdd() {
+	// Do a simple addition with answer var not yet created
+	try {
+	    primitives.setValue("$i.1", "5");
+	    primitives.setValue("$i.2", "15");
+	    primitives.add("$i.1", "$i.2", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), 20);
+	} catch (Exception e) {
+	    fail("1. " + e.getMessage());
+	}
+
+	// With negatives and existing variable for answer
+	try {
+	    primitives.setValue("$i.4", "-5");
+	    primitives.setValue("$i.2", "15");
+	    primitives.add("$i.4", "$i.2", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), 10);
+	} catch (Exception e) {
+	    fail("2. " + e.getMessage());
+	}
+
+	// Make sure it can handle 0 and reuse of variable as answer
+	try {
+	    primitives.setValue("$i.5", "0");
+	    primitives.setValue("$i.2", "15");
+	    primitives.add("$i.5", "$i.2", "$i.2");
+	    assertEquals(primitives.getIntegerValue("$i.2"), 15);
+	} catch (Exception e) {
+	    fail("3. " + e.getMessage());
+	}
+
+	// Adding a variable to itself
+	try {
+	    primitives.setValue("$i.6", "22222");
+	    primitives.add("$i.6", "$i.6", "$i.6");
+	    assertEquals(primitives.getIntegerValue("$i.6"), 44444);
+	} catch (Exception e) {
+	    fail("4. " + e.getMessage());
+	}
+
+	// Adding a reals
+	try {
+	    primitives.setValue("$r.1", "24.7");
+	    primitives.setValue("$r.2", "5");
+	    primitives.add("$r.1", "$r.2", "$r.3");
+	    assertEquals(primitives.getDoubleValue("$r.3"), 29.7);
+	} catch (Exception e) {
+	    fail("5. " + e.getMessage());
+	}
+
+	// Adding a reals and ints
+	try {
+	    primitives.setValue("$r.4", "20.7");
+	    primitives.setValue("$i.1", "7");
+	    primitives.add("$r.4", "$i.1", "$r.5");
+	    assertEquals(primitives.getDoubleValue("$r.5"), 27.7);
+	} catch (Exception e) {
+	    fail("6. " + e.getMessage());
+	}
+
+	// Adding to variable that doesnt exist
+	try {
+	    primitives.add("$i.4", "$i.7", "$i.3");
+	    fail("7. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	// Adding a variable that doesnt exist
+	try {
+	    primitives.add("$i.7", "$i.4", "$i.3");
+	    fail("8. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+    }
+
+    public void testSubtract() {
+	// Do a simple addition with answer var not yet created
+	try {
+	    primitives.setValue("$i.1", "5");
+	    primitives.setValue("$i.2", "15");
+	    primitives.subtract("$i.2", "$i.1", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), 10);
+	} catch (Exception e) {
+	    fail("1. " + e.getMessage());
+	}
+
+	// With negatives and existing variable for answer
+	try {
+	    primitives.setValue("$i.4", "-5");
+	    primitives.setValue("$i.2", "15");
+	    primitives.subtract("$i.4", "$i.2", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), -20);
+	} catch (Exception e) {
+	    fail("2. " + e.getMessage());
+	}
+
+	// Make sure it can handle 0 and reuse of variable as answer
+	try {
+	    primitives.setValue("$i.5", "0");
+	    primitives.setValue("$i.2", "15");
+	    primitives.subtract("$i.5", "$i.2", "$i.2");
+	    assertEquals(primitives.getIntegerValue("$i.2"), -15);
+	} catch (Exception e) {
+	    fail("3. " + e.getMessage());
+	}
+
+	// Subtracting a variable from itself
+	try {
+	    primitives.setValue("$i.6", "22222");
+	    primitives.subtract("$i.6", "$i.6", "$i.6");
+	    assertEquals(primitives.getIntegerValue("$i.6"), 0);
+	} catch (Exception e) {
+	    fail("4. " + e.getMessage());
+	}
+
+	// Subtracting from variable that doesnt exist
+	try {
+	    primitives.subtract("$i.4", "$i.7", "$i.3");
+	    fail("5. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	// Subtracting a variable that doesnt exist
+	try {
+	    primitives.subtract("$i.7", "$i.4", "$i.3");
+	    fail("6. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	assertEquals(primitives.size(), 6);
+    }
+
+    public void testDivide() {
+	// Do a simple addition with answer var not yet created
+	try {
+	    primitives.setValue("$i.1", "15");
+	    primitives.setValue("$i.2", "5");
+	    primitives.divide("$i.1", "$i.2", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), 3);
+	} catch (Exception e) {
+	    fail("1. " + e.getMessage());
+	}
+
+	// With negatives and existing variable for answer
+	try {
+	    primitives.setValue("$i.4", "-100");
+	    primitives.setValue("$i.2", "10");
+	    primitives.divide("$i.4", "$i.2", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), -10);
+	} catch (Exception e) {
+	    fail("2. " + e.getMessage());
+	}
+
+	// Make sure it can handle 0 and reuse of variable as answer
+	try {
+	    primitives.setValue("$i.5", "0");
+	    primitives.setValue("$i.2", "15");
+	    primitives.divide("$i.5", "$i.2", "$i.2");
+	    assertEquals(primitives.getIntegerValue("$i.2"), 0);
+	} catch (Exception e) {
+	    fail("3. " + e.getMessage());
+	}
+
+	// Make sure it can handle 0 and reuse of variable as answer
+	try {
+	    primitives.setValue("$i.5", "15");
+	    primitives.setValue("$i.2", "0");
+	    primitives.divide("$i.5", "$i.2", "$i.2");
+	    // $i.2 now equals infinity
+	    assertEquals(Long.MAX_VALUE, primitives.getIntegerValue("$i.2"));
+	} catch (Exception e) {
+	    fail("4. " + e.getMessage());
+	}
+
+	// divideing a variable from itself
+	try {
+	    primitives.setValue("$i.6", "22222");
+	    primitives.divide("$i.6", "$i.6", "$i.6");
+	    assertEquals(primitives.getIntegerValue("$i.6"), 1);
+	} catch (Exception e) {
+	    fail("5. " + e.getMessage());
+	}
+
+	// divideing by variable that doesnt exist
+	try {
+	    primitives.divide("$i.4", "$i.7", "$i.3");
+	    fail("6. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	// divideing a variable that doesnt exist
+	try {
+	    primitives.divide("$i.7", "$i.4", "$i.3");
+	    fail("7. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	// Reals and ints
+	try {
+	    primitives.setValue("$r.1", "71");
+	    primitives.setValue("$i.2", "10");
+	    primitives.divide("$r.1", "$i.2", "$r.2");
+	    assertEquals(primitives.getDoubleValue("$r.2"), 7.1);
+	} catch (Exception e) {
+	    fail("8. " + e.getMessage());
+	}
+    }
+
+    public void testMultiply() {
+	// Do a simple multiplication with answer var not yet created
+	try {
+	    primitives.setValue("$i.1", "15");
+	    primitives.setValue("$i.2", "5");
+	    primitives.multiply("$i.1", "$i.2", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), 75);
+	} catch (Exception e) {
+	    fail("1. " + e.getMessage());
+	}
+
+	// With negatives and existing variable for answer
+	try {
+	    primitives.setValue("$i.4", "-100");
+	    primitives.setValue("$i.2", "10");
+	    primitives.multiply("$i.4", "$i.2", "$i.3");
+	    assertEquals(primitives.getIntegerValue("$i.3"), -1000);
+	} catch (Exception e) {
+	    fail("2. " + e.getMessage());
+	}
+
+	// Make sure it can handle 0 and reuse of variable as answer
+	try {
+	    primitives.setValue("$i.5", "0");
+	    primitives.setValue("$i.2", "15");
+	    primitives.multiply("$i.5", "$i.2", "$i.2");
+	    assertEquals(primitives.getIntegerValue("$i.2"), 0);
+	} catch (Exception e) {
+	    fail("3. " + e.getMessage());
+	}
+
+	// Make sure it can handle 0 and reuse of variable as answer
+	try {
+	    primitives.setValue("$i.5", "15");
+	    primitives.setValue("$i.2", "0");
+	    primitives.multiply("$i.2", "$i.5", "$i.5");
+	    assertEquals(primitives.getIntegerValue("$i.5"), 0);
+	} catch (Exception e) {
+	    fail("4. " + e.getMessage());
+	}
+
+	// multiplying a variable by itself
+	try {
+	    primitives.setValue("$i.6", "12");
+	    primitives.multiply("$i.6", "$i.6", "$i.6");
+	    assertEquals(primitives.getIntegerValue("$i.6"), 144);
+	} catch (Exception e) {
+	    fail("5. " + e.getMessage());
+	}
+
+	// multiplying by variable that doesnt exist
+	try {
+	    primitives.multiply("$i.4", "$i.7", "$i.3");
+	    fail("6. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	// multiplying a variable that doesnt exist
+	try {
+	    primitives.multiply("$i.7", "$i.4", "$i.3");
+	    fail("7. Variable did not exist but did not throw an exception");
+	} catch (Exception e) {
+	}
+
+	// Reals and ints
+	try {
+	    primitives.setValue("$r.1", "2.55");
+	    primitives.setValue("$i.2", "100");
+	    primitives.multiply("$r.1", "$i.2", "$r.2");
+	    assertEquals(2.55 * 100, primitives.getDoubleValue("$r.2"));
+	} catch (Exception e) {
+	    fail("8. " + e.getMessage());
+	}
+
+	// Reals
+	try {
+	    primitives.setValue("$r.1", "2.5");
+	    primitives.setValue("$r.2", "1.5");
+	    primitives.multiply("$r.1", "$r.2", "$r.3");
+	    assertEquals(2.5 * 1.5, primitives.getDoubleValue("$r.3"));
+	} catch (Exception e) {
+	    fail("9. " + e.getMessage());
+	}
+    }
+
+    public void testCompareValues() {
+	try {
+	    // Do integer tests
+	    primitives.setValue("$i.Test1", "10");
+	    primitives.setValue("$i.Test2", "15");
+	    assertTrue(primitives.compareValues("$i.Test1", "$i.Test2") < 0);
+	    primitives.setValue("$i.Test1", "3024");
+	    primitives.setValue("$i.Test2", "3024");
+	    assertTrue(primitives.compareValues("$i.Test1", "$i.Test2") == 0);
+	    primitives.setValue("$i.Test1", "3");
+	    primitives.setValue("$i.Test2", "-3");
+	    assertTrue(primitives.compareValues("$i.Test1", "$i.Test2") > 0);
+	    primitives.setValue("$i.Test1", "-0");
+	    primitives.setValue("$i.Test2", "0");
+	    assertTrue(primitives.compareValues("$i.Test1", "$i.Test2") == 0);
+	    // Do real tests
+	    primitives.setValue("$r.Test1", "-0.0");
+	    primitives.setValue("$r.Test2", "0");
+	    assertTrue(primitives.compareValues("$r.Test1", "$r.Test2") == 0);
+	    primitives.setValue("$r.Test1", "-4.5");
+	    primitives.setValue("$r.Test2", "-4.49");
+	    assertTrue(primitives.compareValues("$r.Test1", "$r.Test2") < 0);
+	    primitives.setValue("$r.Test1", "100025.01");
+	    primitives.setValue("$r.Test2", "100025");
+	    assertTrue(primitives.compareValues("$r.Test1", "$r.Test2") > 0);
+	    // Do real vs integer
+	    primitives.setValue("$r.Test", "55.5");
+	    primitives.setValue("$i.Test", "55.1");
+	    assertTrue(primitives.compareValues("$r.Test", "$i.Test") == 0);
+	    primitives.setValue("$r.Test", "-55.5");
+	    primitives.setValue("$i.Test", "-55");
+	    assertTrue(primitives.compareValues("$i.Test", "$r.Test") == 0);
+	    primitives.setValue("$r.Test", "-0.1");
+	    primitives.setValue("$i.Test", "0");
+	    assertTrue(primitives.compareValues("$r.Test", "$i.Test") == 0);
+	    primitives.setValue("$r.Test", "2.1");
+	    primitives.setValue("$i.Test", "1.9");
+	    assertTrue(primitives.compareValues("$r.Test", "$i.Test") > 0);
+	    primitives.setValue("$r.Test", "-4444.999999");
+	    primitives.setValue("$i.Test", "-4445");
+	    assertTrue(primitives.compareValues("$i.Test", "$r.Test") < 0);
+	    // Do some string tests
+	    primitives.setValue("$s.Test1", "Testing... 1, 2, 3");
+	    primitives.setValue("$s.Test2", "Testing... 1, 2, 3");
+	    assertTrue(primitives.compareValues("$s.Test1", "$s.Test2") == 0);
+	    primitives.setValue("$s.Test2", "tESTING... 1, 2, 3");
+	    assertTrue(primitives.compareValues("$s.Test1", "$s.Test2") < 0);
+	    primitives.setValue("$s.Test1", "rob");
+	    primitives.setValue("$s.Test2", "michael");
+	    assertTrue(primitives.compareValues("$s.Test1", "$s.Test2") > 0);
+	} catch (Exception e) {
+	    fail(e.getMessage());
+	}
+
+	// Try comparing variables that wont compare
+	try {
+	    primitives.setValue("$s.Test1", "Zero");
+	    primitives.setValue("$r.Test2", "0.0");
+	    primitives.compareValues("$s.Test1", "$r.Test2");
+	    fail("Attempted comparison of text and real but did not throw an exception");
+	} catch (Exception e) {
+	}
+    }
+    
+    public void testNot() {
+	try {
+	    // Do integer tests
+	    primitives.setValue("$b.Test", "F");
+	    primitives.not("$b.Test", "$b.Result");
+	    assertTrue(primitives.getBooleanValue("$b.Result"));
+	    primitives.setValue("$b.Test", "True");
+	    primitives.not("$b.Test", "$b.Result");
+	    assertFalse(primitives.getBooleanValue("$b.Result"));
+	} catch (Exception e) {
+	    fail(e.getMessage());
+	}
+    }
+
+}
