Index: java/main/src/test/java/com/framsticks/communication/ConnectionTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/communication/ConnectionTest.java	(revision 96)
+++ java/main/src/test/java/com/framsticks/communication/ConnectionTest.java	(revision 96)
@@ -0,0 +1,15 @@
+package com.framsticks.communication;
+
+import org.testng.annotations.Test;
+
+import com.framsticks.test.TestConfiguration;
+
+@Test
+public class ConnectionTest extends TestConfiguration {
+
+	@Test
+	public void patterns() {
+	}
+
+
+}
Index: java/main/src/test/java/com/framsticks/communication/RequestTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/communication/RequestTest.java	(revision 96)
+++ java/main/src/test/java/com/framsticks/communication/RequestTest.java	(revision 96)
@@ -0,0 +1,54 @@
+package com.framsticks.communication;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import com.framsticks.communication.queries.CallRequest;
+import com.framsticks.communication.queries.GetRequest;
+import com.framsticks.communication.queries.InfoRequest;
+import com.framsticks.communication.queries.SetRequest;
+import com.framsticks.communication.queries.UseRequest;
+import com.framsticks.communication.queries.VersionRequest;
+import com.framsticks.test.TestConfiguration;
+import com.framsticks.util.lang.Pair;
+
+import static org.fest.assertions.Assertions.*;
+
+@Test
+public class RequestTest extends TestConfiguration {
+
+	@Test
+	public void genericParsing() {
+		assertThat(Request.takeIdentifier("first second")).isEqualTo(Pair.make("first", "second"));
+		assertThat(Request.takeIdentifier(" first ")).isEqualTo(Pair.make("first", ""));
+
+		assertThat(Request.takeString(" \"a long comment\" second")).isEqualTo(Pair.make("a long comment", "second"));
+		assertThat(Request.takeString(" simple second")).isEqualTo(Pair.make("simple", "second"));
+
+		assertThat(Request.takeRequestId(true, " 2 simple second")).isEqualTo(Pair.make(2, "simple second"));
+	}
+
+	@Test(dataProvider = "requests", dependsOnMethods = "genericParsing")
+	public void parsingAndPrintingRequests(Class<? extends Request> requestClass, String line) {
+		Pair<CharSequence, CharSequence> pair = Request.takeIdentifier(line);
+		Request request = Request.parse(pair.first, pair.second);
+		assertThat(request).isInstanceOf(requestClass);
+		assertThat(request.stringRepresentation()).isEqualTo(line);
+	}
+
+	@DataProvider
+	public Object[][] requests() {
+		return new Object[][] {
+			{ CallRequest.class, "call /object function first second \"thi rd\""},
+			{ GetRequest.class, "get /test"},
+			{ GetRequest.class, "get /test one_field"},
+			{ GetRequest.class, "get /test first_field,second_field"},
+			{ SetRequest.class, "set /test field value"},
+			{ SetRequest.class, "set /test field \"value with spaces\""},
+			{ VersionRequest.class, "version 4"},
+			{ InfoRequest.class, "info /some/path"},
+			{ UseRequest.class, "use request_id"}
+		};
+	}
+
+}
Index: java/main/src/test/java/com/framsticks/core/FramsticksTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/core/FramsticksTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/core/FramsticksTest.java	(revision 96)
@@ -20,6 +20,6 @@
 		Framsticks framsticks = Framsticks.loadConfiguration(stream);
 		assertThat(framsticks).isNotNull();
-		assertThat(framsticks.getObservables().size()).isEqualTo(1);
-		assertThat(framsticks.getObservables().get("browser")).isInstanceOf(Browser.class);
+		assertThat(framsticks.size()).isEqualTo(1);
+		assertThat(framsticks.get("browser")).isInstanceOf(Browser.class);
 	}
 
Index: java/main/src/test/java/com/framsticks/core/ObjectInstanceTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/core/ObjectInstanceTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/core/ObjectInstanceTest.java	(revision 96)
@@ -19,4 +19,7 @@
 import com.framsticks.params.ReflectionAccess;
 import com.framsticks.params.types.FloatParam;
+
+import static com.framsticks.core.InstanceUtils.*;
+
 
 import static org.fest.assertions.Assertions.*;
@@ -48,5 +51,5 @@
 	public void startInstance() {
 		instance = new ObjectInstance();
-		instance.getRegistry().takeAllFrom(schema.getRegistry());
+		instance.takeAllFrom(schema.getRegistry());
 
 		instance.setRootObject(model);
@@ -62,20 +65,20 @@
 			})).isEqualTo("bla");
 
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
 				assertThat(instance.getRootObject(Model.class).getNeuroDefinitions().get(2).details).isEqualTo("G");
 
-				Path path = instance.getPath("/");
+				Path path = Path.to(instance, "/");
 				assertThat(path.isResolved());
-				AccessInterface access = instance.bindAccess(path);
+				AccessInterface access = InstanceUtils.bindAccess(path);
 				assertThat(access.get("se", Double.class)).isEqualTo(1.0);
 
-				assertThat(instance.bindAccess("/parts/2").getFramsClass().getParamEntry("m", FloatParam.class).getDef(Double.class)).isEqualTo(1.0);
-				assertThat(instance.bindAccess("/parts/2").getFramsClass().getParamEntry("m", FloatParam.class).getMax(Double.class)).isEqualTo(999.0);
-				assertThat(instance.bindAccess("/parts/2")).isInstanceOf(ReflectionAccess.class);
-				assertThat(instance.getPath("/neurodefs").getTopObject()).isInstanceOf(ArrayList.class);
-				assertThat(instance.getPath("/joints/1").getTopObject()).isInstanceOf(Joint.class);
-				assertThat(instance.bindAccess("/parts/2").get("i", String.class)).isEqualTo("bla");
+				assertThat(bindAccess(instance, "/parts/2").getFramsClass().getParamEntry("m", FloatParam.class).getDef(Double.class)).isEqualTo(1.0);
+				assertThat(bindAccess(instance, "/parts/2").getFramsClass().getParamEntry("m", FloatParam.class).getMax(Double.class)).isEqualTo(999.0);
+				assertThat(bindAccess(instance, "/parts/2")).isInstanceOf(ReflectionAccess.class);
+				assertThat(Path.to(instance, "/neurodefs").getTopObject()).isInstanceOf(ArrayList.class);
+				assertThat(Path.to(instance, "/joints/1").getTopObject()).isInstanceOf(Joint.class);
+				assertThat(bindAccess(instance, "/parts/2").get("i", String.class)).isEqualTo("bla");
 			}
 		});
Index: java/main/src/test/java/com/framsticks/core/XmlBasedTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/core/XmlBasedTest.java	(revision 96)
+++ java/main/src/test/java/com/framsticks/core/XmlBasedTest.java	(revision 96)
@@ -0,0 +1,31 @@
+package com.framsticks.core;
+
+import java.io.InputStream;
+
+import org.testng.annotations.Test;
+
+import com.framsticks.core.Framsticks;
+import com.framsticks.test.MonitorBasedTest;
+import com.framsticks.util.dispatching.Joinable;
+
+// import static org.fest.assertions.Assertions.*;
+
+@Test
+public abstract class XmlBasedTest extends MonitorBasedTest {
+
+	protected Framsticks framsticks;
+
+	@Override
+	protected Joinable createSubject() {
+		framsticks = Framsticks.loadConfiguration(getConfigurationStream());
+		return framsticks;
+	}
+
+	protected InputStream getConfigurationStream() {
+		return XmlBasedTest.class.getResourceAsStream("/configs/" + getConfigurationName());
+	}
+
+	protected abstract String getConfigurationName();
+
+
+}
Index: java/main/src/test/java/com/framsticks/dumping/StreamTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/dumping/StreamTest.java	(revision 96)
+++ java/main/src/test/java/com/framsticks/dumping/StreamTest.java	(revision 96)
@@ -0,0 +1,36 @@
+package com.framsticks.dumping;
+
+public class StreamTest {
+
+	public void testLoad() {
+
+		// dispatch(new RunAt<Instance>() {
+
+		// 	@Override
+		// 	public void run() {
+		// 		assert isActive();
+
+		// 		try {
+		// 			LoadStream stream = new LoadStream(FileInstance.this.getPath("/"), new BufferedReader(new InputStreamReader(new FileInputStream(file), Encoding.getFramsticksCharset())), FileInstance.this, new Future<Path>() {
+		// 				@Override
+		// 				public void result(Path result, Exception e) {
+		// 					if (e != null) {
+		// 						log.error("failed to load file instance " + FileInstance.this + ": " + e);
+		// 						fireRun(e);
+		// 						return;
+		// 					}
+		// 					log.info("loaded file instance " + FileInstance.this);
+		// 					fireRun(null);
+		// 				}
+		// 			});
+		// 			stream.load();
+		// 		} catch (IOException e) {
+		// 			log.error("io failure: " + e);
+		// 			fireRun(e);
+		// 		}
+		// 	}
+
+		// });
+	}
+
+}
Index: java/main/src/test/java/com/framsticks/gui/BrowserBaseTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/gui/BrowserBaseTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/gui/BrowserBaseTest.java	(revision 96)
@@ -9,10 +9,8 @@
 import org.fest.swing.fixture.FrameFixture;
 import org.fest.swing.fixture.JTreeFixture;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.framsticks.test.TestConfiguration;
-import com.framsticks.util.dispatching.Monitor;
+import com.framsticks.test.MonitorBasedTest;
+import com.framsticks.util.dispatching.Joinable;
 
 import static org.fest.assertions.Assertions.assertThat;
@@ -22,9 +20,8 @@
 
 @Test
-public abstract class BrowserBaseTest extends TestConfiguration {
+public abstract class BrowserBaseTest extends MonitorBasedTest {
 
 	private static final Logger log = Logger.getLogger(BrowserTest.class);
 
-	protected Monitor monitor;
 	protected Browser browser;
 	protected static Robot robot;
@@ -39,13 +36,11 @@
 	}
 
-	@BeforeClass(timeOut = 5000)
-	public void setUp() {
+	@Override
+	protected Joinable createSubject() {
+		configureBrowser();
+		return browser;
+	}
 
-		configureBrowser();
-
-		monitor = new Monitor(browser);
-
-		monitor.use();
-
+	protected void setUpAfterUse() {
 		frame = new FrameFixture(robot,
 				GuiActionRunner.execute(new GuiQuery<JFrame>() {
@@ -57,6 +52,8 @@
 
 		tree = frame.tree("tree");
+
 		log.debug("frame fixture done");
 	}
+
 
 	protected abstract void configureBrowser();
@@ -71,8 +68,3 @@
 	}
 
-	@AfterClass(timeOut = 5000)
-	public void tearDown() {
-		monitor.drop().join();
-	}
-
 }
Index: java/main/src/test/java/com/framsticks/gui/BrowserTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/gui/BrowserTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/gui/BrowserTest.java	(revision 96)
@@ -10,5 +10,5 @@
 
 import com.framsticks.model.ModelPackage;
-import com.framsticks.remote.RemoteInstance;
+import com.framsticks.remote.SimulatorInstance;
 
 public class BrowserTest extends BrowserBaseTest {
@@ -16,5 +16,5 @@
 	private static final Logger log = Logger.getLogger(BrowserTest.class);
 
-	RemoteInstance localhost;
+	SimulatorInstance localhost;
 
 	@Override
@@ -22,5 +22,5 @@
 		browser = new Browser();
 
-		localhost = new RemoteInstance();
+		localhost = new SimulatorInstance();
 		localhost.setName("localhost");
 		localhost.setAddress("localhost:9009");
Index: java/main/src/test/java/com/framsticks/gui/ObjectInstanceBrowserTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/gui/ObjectInstanceBrowserTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/gui/ObjectInstanceBrowserTest.java	(revision 96)
@@ -11,4 +11,6 @@
 import com.framsticks.parsers.XmlLoader;
 import com.framsticks.util.dispatching.RunAt;
+
+import static com.framsticks.core.InstanceUtils.*;
 
 @Test
@@ -29,5 +31,5 @@
 	@Test(timeOut = 10000)
 	public void testShow() {
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
@@ -40,8 +42,8 @@
 		clickAndExpandPath("model/parts/2");
 
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
-				assertThat(instance.bindAccess("/parts/2").getFramsClass().getParamEntry("m", FloatParam.class).getMax(Double.class)).isEqualTo(999.0);
+				assertThat(bindAccess(instance, "/parts/2").getFramsClass().getParamEntry("m", FloatParam.class).getMax(Double.class)).isEqualTo(999.0);
 			}
 		});
Index: java/main/src/test/java/com/framsticks/gui/ProcedureBrowserTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/gui/ProcedureBrowserTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/gui/ProcedureBrowserTest.java	(revision 96)
@@ -16,4 +16,5 @@
 import com.framsticks.test.TestClass;
 import com.framsticks.util.dispatching.RunAt;
+import static com.framsticks.core.InstanceUtils.*;
 
 @Test
@@ -34,5 +35,5 @@
 	@Test(timeOut = 10000)
 	public void testShow() {
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
@@ -43,8 +44,8 @@
 		clickAndExpandPath("test");
 
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
-				assertThat(instance.bindAccess("/").getFramsClass().getParam("history")).isInstanceOf(StringParam.class);
+				assertThat(bindAccess(instance, "/").getFramsClass().getParam("history")).isInstanceOf(StringParam.class);
 			}
 		});
@@ -52,8 +53,8 @@
 		// monitor.useFor(4.0);
 
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
-				AccessInterface access = instance.bindAccess("/");
+				AccessInterface access = bindAccess(instance, "/");
 				assertThat(access).isInstanceOf(ReflectionAccess.class);
 				FramsClass framsClass = access.getFramsClass();
@@ -74,8 +75,8 @@
 		waitForIdle();
 
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
-				assertThat(instance.bindAccess("/").get("history", String.class)).isEqualTo("argument|");
+				assertThat(bindAccess(instance, "/").get("history", String.class)).isEqualTo("argument|");
 			}
 		});
@@ -84,8 +85,8 @@
 		waitForIdle();
 
-		assertDispatch(instance, new RunAt<Instance>() {
+		instance.dispatch(new RunAt<Instance>() {
 			@Override
 			public void run() {
-				assertThat(instance.bindAccess("/").get("history", String.class)).isEqualTo("");
+				assertThat(bindAccess(instance, "/").get("history", String.class)).isEqualTo("");
 			}
 		});
Index: java/main/src/test/java/com/framsticks/hosting/ServerTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/hosting/ServerTest.java	(revision 96)
+++ java/main/src/test/java/com/framsticks/hosting/ServerTest.java	(revision 96)
@@ -0,0 +1,156 @@
+package com.framsticks.hosting;
+
+// import org.apache.log4j.Logger;
+import org.testng.annotations.Test;
+
+import com.framsticks.core.ObjectInstance;
+import com.framsticks.core.Path;
+import com.framsticks.core.XmlBasedTest;
+import com.framsticks.remote.RemoteInstance;
+
+import com.framsticks.test.TestClass;
+import com.framsticks.core.Instance;
+import com.framsticks.params.FramsClass;
+import com.framsticks.util.AbstractStateFunctor;
+import com.framsticks.util.dispatching.Dispatching;
+import com.framsticks.params.AccessInterface;
+import com.framsticks.params.PropertiesAccess;
+import com.framsticks.params.ValueParam;
+import com.framsticks.params.types.ProcedureParam;
+import com.framsticks.util.dispatching.Dispatching.Waiter;
+import com.framsticks.util.dispatching.Future;
+import com.framsticks.util.dispatching.RunAt;
+
+import static com.framsticks.core.InstanceUtils.*;
+
+import static org.fest.assertions.Assertions.*;
+
+@Test
+public class ServerTest extends XmlBasedTest {
+
+	protected RemoteInstance remote;
+	protected FramsClass remoteTestFramsClass;
+	protected Path remotePath;
+
+	protected Server server;
+	protected ObjectInstance hosted;
+	protected TestClass hostedObject;
+
+	@Override
+	protected String getConfigurationName() {
+		return "ServerTest.xml";
+	}
+
+	@Test
+	public void runServer() {
+		assertThat(framsticks.size()).isEqualTo(2);
+		assertThat(framsticks.get("test")).isInstanceOf(Server.class);
+		assertThat(framsticks.get("remote")).isInstanceOf(RemoteInstance.class);
+
+		server = (Server) framsticks.get("test");
+		remote = (RemoteInstance) framsticks.get("remote");
+		assertThat(server.getHosted()).isInstanceOf(ObjectInstance.class);
+		hosted = (ObjectInstance) server.getHosted();
+		assertThat(hosted.getRootObject()).isInstanceOf(TestClass.class);
+		hostedObject = hosted.getRootObject(TestClass.class);
+	}
+
+	@Test(dependsOnMethods = "runServer")
+	public void fetchInfo() {
+		remote.dispatch(new RunAt<Instance>() {
+			@Override
+			public void run() {
+				remote.fetchInfo(Path.to(remote, "/"), new Future<FramsClass>(failOnException()) {
+					@Override
+					protected void result(FramsClass result) {
+						remoteTestFramsClass = result;
+						assertThat(result.getId()).isEqualTo("TestClass");
+					}
+				});
+			}
+		});
+
+		Dispatching.synchronize(remote, 1.0);
+	}
+
+	@Test(dependsOnMethods = "fetchInfo")
+	public void resolveAndfetchRootObject() {
+		final Waiter waiter = produceWaiter(1.0);
+
+		remote.dispatch(new RunAt<Instance>() {
+			@Override
+			public void run() {
+				final Path path = Path.to(remote, "/");
+				assertThat(path.isResolved()).isFalse();
+
+				remote.resolve(path, new Future<Path>(failOnException()) {
+					@Override
+					protected void result(final Path result) {
+						assertThat(result.isResolved()).isTrue();
+						remotePath = result;
+						remote.fetchValues(result, new AbstractStateFunctor(failOnException()) {
+							@Override
+							public void call() {
+								AccessInterface access = bindAccess(result);
+								assertThat(access).isInstanceOf(PropertiesAccess.class);
+								assertThat(access.get("name", String.class)).isEqualTo("a test name");
+								waiter.pass();
+							}
+						});
+					}
+				});
+			}
+		});
+	}
+
+	@Test(dependsOnMethods = "resolveAndfetchRootObject")
+	public void setValueName() {
+		final Waiter waiter = produceWaiter(2.0);
+
+		storeValue(remotePath, remoteTestFramsClass.getParamEntry("name", ValueParam.class), "new name", new AbstractStateFunctor(failOnException()) {
+			@Override
+			public void call() {
+				/** And now check directly whether it was really set. */
+				hosted.dispatch(new RunAt<Instance>() {
+					@Override
+					public void run() {
+						assertThat(hostedObject.getName()).isEqualTo("new name");
+						waiter.pass();
+					}
+				});
+			}
+		});
+	}
+
+	@Test(dependsOnMethods = "setValueName")
+	public void callMethod() {
+		final Waiter firstWaiter = produceWaiter(2.0);
+		final Waiter waiter = produceWaiter(2.0);
+
+		call(remotePath, remoteTestFramsClass.getParamEntry("resetHistory", ProcedureParam.class), new Object[] {}, new Future<Object>(failOnException()) {
+			@Override
+			protected void result(Object result) {
+				firstWaiter.pass();
+			}
+		});
+
+		call(remotePath, remoteTestFramsClass.getParamEntry("appendHistory", ProcedureParam.class), new Object[] {"next word"}, new Future<Object>(failOnException()) {
+			@Override
+			protected void result(Object result) {
+				hosted.dispatch(new RunAt<Instance>() {
+					@Override
+					public void run() {
+						assertThat(hostedObject.getHistory()).isEqualTo("next word|");
+						waiter.pass();
+					}
+				});
+			}
+		});
+
+	}
+
+	@Test(dependsOnMethods = "callMethod")
+	public void endWait() {
+		monitor.useFor(1.0);
+	}
+}
Index: java/main/src/test/java/com/framsticks/params/FramsClassBuilderTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/params/FramsClassBuilderTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/params/FramsClassBuilderTest.java	(revision 96)
@@ -1,4 +1,5 @@
 package com.framsticks.params;
 
+import java.util.Arrays;
 
 import org.testng.annotations.BeforeClass;
@@ -7,4 +8,5 @@
 import com.framsticks.params.types.ProcedureParam;
 import com.framsticks.params.types.StringParam;
+import com.framsticks.parsers.Savers;
 import com.framsticks.test.TestClass;
 import com.framsticks.test.TestConfiguration;
@@ -17,5 +19,4 @@
 	ReflectionAccess access;
 	TestClass test;
-
 
 	@BeforeClass
@@ -36,4 +37,5 @@
 		assertThat(framsClass.getParam("appendHistory")).isInstanceOf(ProcedureParam.class);
 		assertThat(framsClass.getParam("resetHistory")).isInstanceOf(ProcedureParam.class);
+
 		ProcedureParam appendHistory = framsClass.getParamEntry("appendHistory", ProcedureParam.class);
 		assertThat(appendHistory.getArgumentsType().size()).isEqualTo(1);
@@ -42,4 +44,37 @@
 
 	@Test(dependsOnMethods = "checkProcedureParams")
+	public void print() {
+		assertThat(Savers.saveFramsClass(new ListSink(), framsClass).getOut()).isEqualTo(
+				Arrays.asList(
+					"class:",
+					"name:TestClass",
+					"id:TestClass",
+					"",
+					"prop:",
+					"id:name",
+					"name:Name",
+					"type:s",
+					"",
+					"prop:",
+					"id:history",
+					"name:History",
+					"type:s",
+					"",
+					"prop:",
+					"id:appendHistory",
+					"name:AppendHistory",
+					"type:p d(s arg0)",
+					"",
+					"prop:",
+					"id:resetHistory",
+					"name:ResetHistory",
+					"type:p()",
+					""
+				)
+			);
+	}
+
+
+	@Test(dependsOnMethods = "print")
 	public void callProcedures() {
 		access = new ReflectionAccess(TestClass.class, framsClass);
Index: java/main/src/test/java/com/framsticks/params/ParamBuilderTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/params/ParamBuilderTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/params/ParamBuilderTest.java	(revision 96)
@@ -23,4 +23,5 @@
 		assertThat(builderFramsClass.getName()).isEqualTo("prop");
 		assertThat(builderFramsClass.getId()).isEqualTo("prop");
+		assertThat(builderFramsClass.getParamEntry("flags", ValueParam.class).getDef(Object.class)).isEqualTo(new Integer(0));
 		assertThat(builderFramsClass.getParamEntry("id", Param.class)).isInstanceOf(StringParam.class);
 	}
Index: java/main/src/test/java/com/framsticks/running/FramsServerTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/running/FramsServerTest.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/running/FramsServerTest.java	(revision 96)
@@ -3,36 +3,24 @@
 import org.testng.annotations.Test;
 
-import com.framsticks.core.Framsticks;
-import com.framsticks.test.TestConfiguration;
-import com.framsticks.util.dispatching.Monitor;
+import com.framsticks.core.XmlBasedTest;
 
 import static org.fest.assertions.Assertions.*;
 
 @Test
-public class FramsServerTest extends TestConfiguration {
+public class FramsServerTest extends XmlBasedTest {
+
+	@Override
+	protected String getConfigurationName() {
+		return "FramsServerTest.xml";
+	}
 
 	@Test(timeOut = 3000)
 	public void runServer() {
-		Framsticks framsticks = Framsticks.loadConfiguration(FramsServerTest.class.getResourceAsStream("/configs/FramsServerTest.xml"));
+		assertThat(framsticks.size()).isEqualTo(1);
+		assertThat(framsticks.get("frams")).isInstanceOf(FramsServer.class);
 
-		assertThat(framsticks.getObservables().size()).isEqualTo(1);
-		assertThat(framsticks.getObservables().get("frams")).isInstanceOf(FramsServer.class);
-		// assertThat(framsticks.getObservables().get("remote")).isInstanceOf(RemoteInstance.class);
-
-		new Monitor(framsticks).use().useFor(1.0).drop().join();
-
-		// monitor.use();
-
-		// Dispatching.sleep(1000);
-
-		// // monitor.waitFor();
-		// monitor.drop();
-		// monitor.join();
-
-		// framsticks.start();
-
-		// framsticks.waitForObservables();
-
+		monitor.useFor(1.0);
 	}
 
+
 }
Index: java/main/src/test/java/com/framsticks/test/MonitorBasedTest.java
===================================================================
--- java/main/src/test/java/com/framsticks/test/MonitorBasedTest.java	(revision 96)
+++ java/main/src/test/java/com/framsticks/test/MonitorBasedTest.java	(revision 96)
@@ -0,0 +1,36 @@
+package com.framsticks.test;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import com.framsticks.util.dispatching.Joinable;
+import com.framsticks.util.dispatching.Monitor;
+
+@Test
+public abstract class MonitorBasedTest extends TestConfiguration {
+
+	protected Monitor monitor;
+	protected Joinable subject;
+
+	protected abstract Joinable createSubject();
+
+	@BeforeClass(timeOut = 2000)
+	public void setUp() {
+		subject = createSubject();
+
+		monitor = new Monitor(subject);
+		monitor.setTaskExceptionHandler(createExceptionHandler());
+		monitor.use();
+
+		setUpAfterUse();
+	}
+
+	protected void setUpAfterUse() {
+	}
+
+	@AfterClass(timeOut = 3000)
+	public void tearDown() {
+		monitor.drop().join();
+	}
+}
Index: java/main/src/test/java/com/framsticks/test/TestClass.java
===================================================================
--- java/main/src/test/java/com/framsticks/test/TestClass.java	(revision 90)
+++ 	(revision )
@@ -1,56 +1,0 @@
-package com.framsticks.test;
-
-import com.framsticks.params.annotations.FramsClassAnnotation;
-import com.framsticks.params.annotations.ParamAnnotation;
-import com.framsticks.params.types.ProcedureParam;
-
-@FramsClassAnnotation(order = {"name", "history", "appendHistory", "resetHistory"})
-public class TestClass {
-
-	protected String name = "test";
-	protected String history = "";
-
-	/**
-	 * @return the name
-	 */
-	@ParamAnnotation
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * @param name the name to set
-	 */
-	@ParamAnnotation
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	/**
-	 * @return the history
-	 */
-	@ParamAnnotation
-	public String getHistory() {
-		return history;
-	}
-
-	/**
-	 * @param history the history to set
-	 */
-	@ParamAnnotation
-	public void setHistory(String history) {
-		this.history = history;
-	}
-
-	@ParamAnnotation(paramType = ProcedureParam.class)
-	public int appendHistory(String line) {
-		history = history + line + "|";
-		return history.length();
-	}
-
-	@ParamAnnotation(paramType = ProcedureParam.class)
-	public void resetHistory() {
-		history = "";
-	}
-
-}
Index: java/main/src/test/java/com/framsticks/test/TestConfiguration.java
===================================================================
--- java/main/src/test/java/com/framsticks/test/TestConfiguration.java	(revision 90)
+++ java/main/src/test/java/com/framsticks/test/TestConfiguration.java	(revision 96)
@@ -1,6 +1,8 @@
 package com.framsticks.test;
 
+import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.log4j.Logger;
@@ -8,6 +10,12 @@
 import org.testng.annotations.*;
 
+import com.framsticks.util.FramsticksException;
 import com.framsticks.util.dispatching.Dispatcher;
-import com.framsticks.util.dispatching.RunAt;
+import com.framsticks.util.dispatching.Dispatching;
+import com.framsticks.util.dispatching.Dispatching.Waiter;
+import com.framsticks.util.dispatching.ExceptionHandler;
+import com.framsticks.util.dispatching.ExceptionResultHandler;
+
+import static org.fest.assertions.Assertions.*;
 
 public class TestConfiguration {
@@ -21,70 +29,71 @@
 	}
 
-	private final List<AsyncAssert<?>> asyncAssertions = new LinkedList<AsyncAssert<?>>();
+	private final List<AssertionError> asyncAssertions = new LinkedList<>();
 
-	public class AsyncAssert<C> extends RunAt<C> {
-		final RunAt<? extends C> runnable;
-		boolean done = false;
-		AssertionError assertion;
+	public ExceptionHandler createExceptionHandler() {
+		return new ExceptionHandler() {
+			@Override
+			public boolean handle(Dispatcher<?> dispatcher, Throwable throwable) {
+				AssertionError ae;
+				if (AssertionError.class.isInstance(throwable)) {
+					ae = AssertionError.class.cast(throwable);
+				} else {
+					ae = new AssertionError();
+					ae.initCause(throwable);
+				}
+				synchronized (asyncAssertions) {
+					asyncAssertions.add(ae);
+				}
+				return true;
+			}
+		};
+	}
 
-		/**
-		 * @param runnable
-		 */
-		public AsyncAssert(RunAt<? extends C> runnable) {
-			this.runnable = runnable;
-		}
-
-		@Override
-		public void run() {
+	@AfterMethod
+	public void waitForWaiters() {
+		for (Waiter w : waiters) {
 			try {
-				runnable.run();
-			} catch (AssertionError e) {
-				assertion = e;
-			}
-			synchronized (this) {
-				done = true;
-				this.notifyAll();
+				w.waitFor();
+			} catch (FramsticksException e) {
+				AssertionError ae = new AssertionError();
+				ae.initCause(e);
+				asyncAssertions.add(ae);
 			}
 		}
 	}
 
-	public <C> void assertDispatch(Dispatcher<C> dispatcher, RunAt<? extends C> runnable) {
-		AsyncAssert<C> assertion = new AsyncAssert<C>(runnable);
+	@AfterMethod(timeOut = 1000, dependsOnMethods = "waitForWaiters")
+	public void processAsyncAssertions() {
 		synchronized (asyncAssertions) {
-			asyncAssertions.add(assertion);
-		}
-		dispatcher.dispatch(assertion);
-	}
-
-	@BeforeMethod
-	public void clearAsyncAsserts() {
-		synchronized (asyncAssertions) {
-			asyncAssertions.clear();
+			if (asyncAssertions.isEmpty()) {
+				return;
+			}
+			AssertionError a = asyncAssertions.get(0);
+			asyncAssertions.remove(0);
+			throw a;
 		}
 	}
 
-	@AfterMethod(timeOut = 5000)
-	public void waitForAsyncAsserts() {
-		while (true) {
-			AsyncAssert<?> assertion;
-			synchronized (asyncAssertions) {
-				if (asyncAssertions.isEmpty()) {
-					return;
-				}
-				assertion = asyncAssertions.get(0);
-				asyncAssertions.remove(0);
+	final Set<Waiter> waiters = new HashSet<>();
+
+	@BeforeMethod
+	public void clearWaiters() {
+		waiters.clear();
+	}
+
+	protected Dispatching.Waiter produceWaiter(double timeOut) {
+		Waiter waiter = new Waiter(timeOut);
+		waiters.add(waiter);
+		return waiter;
+	}
+
+	public static ExceptionResultHandler failOnException() {
+		return new ExceptionResultHandler() {
+			@Override
+			public void handle(FramsticksException e) {
+				assertThat(e).isNull();
 			}
-			synchronized (assertion) {
-				while (!assertion.done) {
-					try {
-						assertion.wait();
-					} catch (InterruptedException ignored) {
-					}
-				}
-				if (assertion.assertion != null) {
-					throw assertion.assertion;
-				}
-			}
-		}
+		};
+
 	}
 }
Index: java/main/src/test/resources/configs/ServerTest.xml
===================================================================
--- java/main/src/test/resources/configs/ServerTest.xml	(revision 96)
+++ java/main/src/test/resources/configs/ServerTest.xml	(revision 96)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Framsticks>
+	<import class="com.framsticks.hosting.Server" />
+	<import class="com.framsticks.remote.RemoteInstance" />
+	<import class="com.framsticks.core.ObjectInstance" />
+	<import class="com.framsticks.test.TestClass" />
+	<import class="com.framsticks.running.LoggingOutputListener" />
+	<Server name="server" port="9007">
+		<ObjectInstance name="test">
+			<TestClass name="a test name" />
+		</ObjectInstance>
+	</Server>
+	<RemoteInstance name="remote" address="localhost:9007" />
+</Framsticks>
Index: java/main/src/test/resources/configs/test.xml
===================================================================
--- java/main/src/test/resources/configs/test.xml	(revision 90)
+++ java/main/src/test/resources/configs/test.xml	(revision 96)
@@ -2,7 +2,7 @@
 <Framsticks>
 	<import class="com.framsticks.gui.Browser" />
-	<import class="com.framsticks.remote.RemoteInstance" />
+	<import class="com.framsticks.remote.SimulatorInstance" />
 	<Browser name="browser">
-		<RemoteInstance name="localhost:9009" address="localhost:9009" />
+		<SimulatorInstance name="localhost:9009" address="localhost:9009" />
 	</Browser>
 </Framsticks>
Index: java/main/src/test/resources/log4j.properties
===================================================================
--- java/main/src/test/resources/log4j.properties	(revision 90)
+++ java/main/src/test/resources/log4j.properties	(revision 96)
@@ -27,4 +27,7 @@
 
 log4j.logger.com.framsticks=INFO
+# log4j.logger.com.framsticks.hosting.Server=DEBUG
+# log4j.logger.com.framsticks.communication.ServerConnection=TRACE
+# log4j.logger.com.framsticks.util.dispatching.AbstractJoinable=DEBUG
 # log4j.logger.com.framsticks.parsers.F0Writer=TRACE
 # log4j.logger.com.framsticks.core.ObjectInstance=DEBUG
