diff --git a/src/configure b/src/configure
index 321ffb3..5229695 100755
--- a/src/configure
+++ b/src/configure
@@ -1953,13 +1953,10 @@
 
 if test "`git show > /dev/null 2>&1;echo $?`" = "0"; then
 	RCSID="-DRCSID=\\\"\$(IDGIT)\\\""
-
 	ARCSID="-DARCSID='\\\"\$(IDGIT)\\\"'"
-        #CFLAGS="$CPPFLAGS -DARCSID='\\\"\$(IDGIT)\\\"' -DRCSID=\\\"\$(IDGIT)\\\""
 else
 	RCSID="-DRCSID=\\\"\$(IDNOGIT)\\\""
-	ARCSID="-DARCSID=\\\"\$(IDNOGIT)\\\""
-        #CFLAGS="$CPPFLAGS -DRCSID='\\\"\$(IDNOGIT)\\\"' -DRCSID=\\\"\$(IDNOGIT)\\\""
+	ARCSID="-DARCSID='\\\"\$(IDNOGIT)\\\"'"
 fi
 
 REQS="$REQS httpd php json-c"
diff --git a/src/mod_netconf.c b/src/mod_netconf.c
index 0710f55..b68808d 100644
--- a/src/mod_netconf.c
+++ b/src/mod_netconf.c
@@ -83,10 +83,11 @@
 #endif
 
 /* timeout in msec */
-#define NCWITHDEFAULTS	NCWD_MODE_DISABLED
-
 struct timeval timeout = { 1, 0 };
 
+#define NCWITHDEFAULTS	NCWD_MODE_NOTSET
+
+
 
 #define MSG_OK 0
 #define MSG_OPEN  1
@@ -498,7 +499,7 @@
 	}
 
 	/* create requests */
-	rpc = nc_rpc_getconfig (source, f, NCWITHDEFAULTS);
+	rpc = nc_rpc_getconfig (source, f);
 	nc_filter_free(f);
 	if (rpc == NULL) {
 		ap_log_error(APLOG_MARK, APLOG_ERR, 0, server, "mod_netconf: creating rpc request failed");
@@ -539,7 +540,7 @@
 	}
 
 	/* create requests */
-	rpc = nc_rpc_get (f, NCWITHDEFAULTS);
+	rpc = nc_rpc_get (f);
 	nc_filter_free(f);
 	if (rpc == NULL) {
 		ap_log_error(APLOG_MARK, APLOG_ERR, 0, server, "mod_netconf: creating rpc request failed");
@@ -551,13 +552,25 @@
 	return (data);
 }
 
-static int netconf_copyconfig(server_rec* server, apr_hash_t* conns, const char* session_key, NC_DATASTORE source, NC_DATASTORE target, const char* config)
+static int netconf_copyconfig(server_rec* server, apr_hash_t* conns, const char* session_key, NC_DATASTORE source, NC_DATASTORE target, const char* config, const char *url)
 {
 	nc_rpc* rpc;
 	int retval = EXIT_SUCCESS;
 
 	/* create requests */
-	rpc = nc_rpc_copyconfig(source, target, NCWITHDEFAULTS, config);
+	if ((source == NC_DATASTORE_CONFIG) || (source == NC_DATASTORE_URL)) {
+		if (target == NC_DATASTORE_URL) {
+			rpc = nc_rpc_copyconfig(source, target, config, url);
+		} else {
+			rpc = nc_rpc_copyconfig(source, target, config);
+		}
+	} else {
+		if (target == NC_DATASTORE_URL) {
+			rpc = nc_rpc_copyconfig(source, target, url);
+		} else {
+			rpc = nc_rpc_copyconfig(source, target);
+		}
+	}
 	if (rpc == NULL) {
 		ap_log_error(APLOG_MARK, APLOG_ERR, 0, server, "mod_netconf: creating rpc request failed");
 		return (EXIT_FAILURE);
@@ -568,13 +581,14 @@
 	return (retval);
 }
 
-static int netconf_editconfig(server_rec* server, apr_hash_t* conns, const char* session_key, NC_DATASTORE target, NC_EDIT_DEFOP_TYPE defop, NC_EDIT_ERROPT_TYPE erropt, const char* config)
+static int netconf_editconfig(server_rec* server, apr_hash_t* conns, const char* session_key, NC_DATASTORE target, NC_EDIT_DEFOP_TYPE defop, NC_EDIT_ERROPT_TYPE erropt, NC_EDIT_TESTOPT_TYPE testopt, const char* config)
 {
 	nc_rpc* rpc;
 	int retval = EXIT_SUCCESS;
 
 	/* create requests */
-	rpc = nc_rpc_editconfig(target, defop, erropt, config);
+	/* TODO source NC_DATASTORE_CONFIG / NC_DATASTORE_URL  */
+	rpc = nc_rpc_editconfig(target, NC_DATASTORE_CONFIG, defop, erropt, testopt, config);
 	if (rpc == NULL) {
 		ap_log_error(APLOG_MARK, APLOG_ERR, 0, server, "mod_netconf: creating rpc request failed");
 		return (EXIT_FAILURE);
@@ -750,7 +764,7 @@
 	struct session_with_mutex * locked_session;
 	struct nc_cpblts* cpblts = NULL;
 	NC_DATASTORE ds_type_s, ds_type_t;
-	NC_EDIT_DEFOP_TYPE defop_type = 0;
+	NC_EDIT_DEFOP_TYPE defop_type = NC_EDIT_DEFOP_NOTSET;
 	NC_EDIT_ERROPT_TYPE erropt_type = 0;
 
 	apr_pool_t * pool = ((struct pass_to_thread*)arg)->pool;
@@ -864,6 +878,7 @@
 			}
 
 			/* get parameters */
+			/* TODO NC_DATASTORE_URL */
 			ds_type_t = -1;
 			if ((target = json_object_get_string(json_object_object_get(request, "target"))) != NULL) {
 				if (strcmp(target, "running") == 0) {
@@ -1030,7 +1045,7 @@
 						break;
 					}
 				} else {
-					defop_type = 0;
+					defop_type = NC_EDIT_DEFOP_NOTSET;
 				}
 
 				erropt = json_object_get_string(json_object_object_get(request, "error-option"));
@@ -1063,7 +1078,9 @@
 					break;
 				}
 
-				if (netconf_editconfig(server, netconf_sessions_list, session_key, ds_type_t, defop_type, erropt_type, config) != EXIT_SUCCESS) {
+				/* TODO url capability see netconf_editconfig */
+				/* TODO TESTSET - :validate:1.1 capability? http://tools.ietf.org/html/rfc6241#section-7.2 */
+				if (netconf_editconfig(server, netconf_sessions_list, session_key, ds_type_t, defop_type, erropt_type, NC_EDIT_TESTOPT_NOTSET, config) != EXIT_SUCCESS) {
 					if (err_reply == NULL) {
 						json_object_object_add(reply, "type", json_object_new_int(REPLY_ERROR));
 						json_object_object_add(reply, "error-message", json_object_new_string("edit-config failed."));
