Index: java/main/src/main/java/com/framsticks/hosting/ClientAtServer.java
===================================================================
--- java/main/src/main/java/com/framsticks/hosting/ClientAtServer.java	(revision 103)
+++ java/main/src/main/java/com/framsticks/hosting/ClientAtServer.java	(revision 105)
@@ -1,4 +1,5 @@
 package com.framsticks.hosting;
 
+import static com.framsticks.structure.TreeOperations.*;
 import static com.framsticks.util.lang.Strings.assureNotEmpty;
 
@@ -10,17 +11,17 @@
 import com.framsticks.communication.queries.RegisterRequest;
 import com.framsticks.communication.queries.SetRequest;
-import com.framsticks.core.LocalTree;
-import com.framsticks.core.Tree;
-import com.framsticks.core.Path;
 import com.framsticks.params.*;
 import com.framsticks.params.types.EventParam;
 import com.framsticks.params.types.ProcedureParam;
 import com.framsticks.parsers.Savers;
+import com.framsticks.structure.LocalTree;
+import com.framsticks.structure.Path;
+import com.framsticks.structure.Tree;
+import com.framsticks.util.ExceptionHandler;
 import com.framsticks.util.FramsticksException;
 import com.framsticks.util.Misc;
 import com.framsticks.util.dispatching.AbstractJoinable;
 import com.framsticks.util.dispatching.Dispatching;
-import com.framsticks.util.dispatching.ExceptionResultHandler;
-import com.framsticks.util.dispatching.FutureHandler;
+import com.framsticks.util.dispatching.Future;
 import com.framsticks.util.dispatching.Joinable;
 import com.framsticks.util.dispatching.JoinableParent;
@@ -29,6 +30,6 @@
 import com.framsticks.util.lang.Strings;
 
-import static com.framsticks.core.TreeOperations.*;
 import static com.framsticks.params.AccessOperations.*;
+import static com.framsticks.params.ParamsUtil.getParam;
 
 import java.net.Socket;
@@ -37,5 +38,5 @@
  * @author Piotr Sniegowski
  */
-public class ClientAtServer extends AbstractJoinable implements RequestHandler, JoinableParent, ExceptionResultHandler {
+public class ClientAtServer extends AbstractJoinable implements RequestHandler, JoinableParent, ExceptionHandler {
 
 	protected final Server server;
@@ -126,5 +127,5 @@
 	protected void handleInTree(final Tree tree, final ApplicationRequest request, final ServerSideResponseFuture responseCallback, final String usedPrefix) {
 
-		tryGet(tree, request.getActualPath(), new FutureHandler<Path>(responseCallback) {
+		tryGet(tree, request.getActualPath(), new Future<Path>(responseCallback) {
 			@Override
 			protected void result(final Path path) {
@@ -142,5 +143,5 @@
 						throw new FramsticksException().msg("mismatch objects during fetch").arg("path", path);
 					}
-					responseCallback.pass(new Response(true, "", File.single(printToFile(path.getTextual(), access))));
+					responseCallback.pass(new Response(true, "", printToFile(path.getTextual(), access)));
 
 					return;
@@ -149,9 +150,8 @@
 				if (request instanceof SetRequest) {
 					SetRequest setRequest = (SetRequest) request;
-					tree.set(path, access.getFramsClass().getParamEntry(setRequest.getField(), PrimitiveParam.class), setRequest.getValue(), new FutureHandler<Integer>(responseCallback) {
+					tree.set(path, getParam(access, setRequest.getField(), PrimitiveParam.class), setRequest.getValue(), new Future<Integer>(responseCallback) {
 						@Override
 						protected void result(Integer flag) {
-							responseCallback.pass(new Response(true, FlagsUtil.write(SetStateFlags.class, flag, null), null));
-
+							responseCallback.pass(new Response(true, FlagsUtil.write(SetStateFlags.class, flag, null)));
 						}
 					});
@@ -161,17 +161,15 @@
 				if (request instanceof CallRequest) {
 					final CallRequest callRequest = (CallRequest) request;
-					tree.call(path, access.getFramsClass().getParamEntry(callRequest.getProcedure(), ProcedureParam.class), callRequest.getArguments().toArray(), Object.class, new FutureHandler<Object>(responseCallback) {
+					tree.call(path, getParam(access, callRequest.getProcedure(), ProcedureParam.class), callRequest.getArguments().toArray(), Object.class, new Future<Object>(responseCallback) {
 						@Override
-						protected void result(Object result) {
-							ListSink sink = new ListSink();
-							sink.print("Result:").breakLine();
-							sink.print("value:");
-							sink.print("[");
-							if (result != null) {
-								sink.print(result);
+						protected void result(final Object result) {
+							if (result == null) {
+								responseCallback.pass(new Response(true, ""));
+								return;
 							}
-							sink.print("]");
-
-							responseCallback.pass(new Response(true, "", File.single(new File("", new ListSource(sink.getOut())))));
+							final Object wrapped = AccessOperations.wrapValueInResultIfPrimitive(result);
+							final File file = AccessOperations.convert(File.class, wrapped, tree.getRegistry());
+							responseCallback.pass(new Response(true, "", file));
+
 						}
 					});
@@ -184,5 +182,5 @@
 						throw new FramsticksException().msg("info should be available");
 					}
-					responseCallback.pass(new Response(true, null, File.single(new File(path.getTextual(), new ListSource(Savers.saveFramsClass(new ListSink(), framsClass).getOut())))));
+					responseCallback.pass(new Response(true, null, new File(path.getTextual(), new ListSource(Savers.saveFramsClass(new ListSink(), framsClass).getOut()))));
 					return;
 				}
@@ -191,5 +189,5 @@
 					RegisterRequest register = (RegisterRequest) request;
 
-					cliObject.addListener(path, access.getFramsClass().getParamEntry(register.getEventName(), EventParam.class), usedPrefix, responseCallback);
+					cliObject.addListener(path, getParam(access, register.getEventName(), EventParam.class), usedPrefix, responseCallback);
 					return;
 				}
