Index: uspace/srv/sysman/Makefile
===================================================================
--- uspace/srv/sysman/Makefile	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ uspace/srv/sysman/Makefile	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -38,5 +38,4 @@
 
 SYSMAN_SOURCES = \
-	configuration.c \
 	connection_broker.c \
 	connection_ctl.c \
@@ -44,11 +43,12 @@
 	job.c \
 	log.c \
+	repo.c \
+	sm_task.c \
 	sysman.c \
 	unit.c \
 	units/unit_cfg.c \
 	units/unit_mnt.c \
+	units/unit_svc.c \
 	units/unit_tgt.c \
-	units/unit_svc.c \
-	sm_task.c \
 	util.c
 
Index: pace/srv/sysman/configuration.c
===================================================================
--- uspace/srv/sysman/configuration.c	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ 	(revision )
@@ -1,269 +1,0 @@
-/*
- * Copyright (c) 2015 Michal Koutny
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <adt/hash.h>
-#include <adt/hash_table.h>
-#include <adt/list.h>
-#include <assert.h>
-#include <errno.h>
-#include <fibril_synch.h>
-
-#include "configuration.h"
-#include "dep.h"
-#include "log.h"
-
-// TODO rename to repository (dynamic nature of units storage, and do not name it godlike Manager :-)
-
-LIST_INITIALIZE(units);
-
-static hash_table_t units_by_name;
-static hash_table_t units_by_handle;
-
-/* Hash table functions */
-static size_t units_by_handle_ht_hash(const ht_link_t *item)
-{
-	unit_t *unit =
-	    hash_table_get_inst(item, unit_t, units_by_handle);
-	return unit->handle;
-}
-
-static size_t units_by_handle_ht_key_hash(void *key)
-{
-	return *(unit_handle_t *)key;
-}
-
-static bool units_by_handle_ht_equal(const ht_link_t *item1, const ht_link_t *item2)
-{
-	return
-	    hash_table_get_inst(item1, unit_t, units_by_handle) ==
-	    hash_table_get_inst(item2, unit_t, units_by_handle);
-}
-
-static bool units_by_handle_ht_key_equal(void *key, const ht_link_t *item)
-{
-	return *(unit_handle_t *)key ==
-	    hash_table_get_inst(item, unit_t, units_by_handle)->handle;
-}
-
-static hash_table_ops_t units_by_handle_ht_ops = {
-	.hash            = &units_by_handle_ht_hash,
-	.key_hash        = &units_by_handle_ht_key_hash,
-	.equal           = &units_by_handle_ht_equal,
-	.key_equal       = &units_by_handle_ht_key_equal,
-	.remove_callback = NULL // TODO realy unneeded?
-};
-
-static size_t units_by_name_ht_hash(const ht_link_t *item)
-{
-	unit_t *unit =
-	    hash_table_get_inst(item, unit_t, units_by_name);
-	return hash_string(unit->name);
-}
-
-static size_t units_by_name_ht_key_hash(void *key)
-{
-	return hash_string((const char *)key);
-}
-
-static bool units_by_name_ht_equal(const ht_link_t *item1, const ht_link_t *item2)
-{
-	return
-	    hash_table_get_inst(item1, unit_t, units_by_handle) ==
-	    hash_table_get_inst(item2, unit_t, units_by_handle);
-}
-
-static bool units_by_name_ht_key_equal(void *key, const ht_link_t *item)
-{
-	return str_cmp((const char *)key,
-	    hash_table_get_inst(item, unit_t, units_by_name)->name) == 0;
-}
-
-
-static hash_table_ops_t units_by_name_ht_ops = {
-	.hash            = &units_by_name_ht_hash,
-	.key_hash        = &units_by_name_ht_key_hash,
-	.equal           = &units_by_name_ht_equal,
-	.key_equal       = &units_by_name_ht_key_equal,
-	.remove_callback = NULL // TODO realy unneeded?
-};
-
-/* Configuration functions */
-
-void configuration_init(void)
-{
-	hash_table_create(&units_by_name, 0, 0, &units_by_name_ht_ops);
-	hash_table_create(&units_by_handle, 0, 0, &units_by_handle_ht_ops);
-}
-
-int configuration_add_unit(unit_t *unit)
-{
-	assert(unit);
-	assert(unit->state == STATE_EMBRYO);
-	assert(unit->handle == 0);
-	assert(unit->name != NULL);
-	sysman_log(LVL_DEBUG2, "%s('%s')", __func__, unit_name(unit));
-
-	if (hash_table_insert_unique(&units_by_name, &unit->units_by_name)) {
-		/* Pointers are same size as unit_handle_t both on 32b and 64b */
-		unit->handle = (unit_handle_t)unit;
-
-		hash_table_insert(&units_by_handle, &unit->units_by_handle);
-		list_append(&unit->units, &units);
-		return EOK;
-	} else {
-		return EEXISTS;
-	}
-}
-
-void configuration_start_update(void) {
-	sysman_log(LVL_DEBUG2, "%s", __func__);
-}
-
-static bool configuration_commit_unit(ht_link_t *ht_link, void *arg)
-{
-	unit_t *unit = hash_table_get_inst(ht_link, unit_t, units_by_name);
-	// TODO state locking?
-	if (unit->state == STATE_EMBRYO) {
-		unit->state = STATE_STOPPED;
-	}
-
-	list_foreach(unit->dependencies, dependencies, unit_dependency_t, dep) {
-		if (dep->state == DEP_EMBRYO) {
-			dep->state = DEP_VALID;
-		}
-	}
-	return true;
-}
-
-/** Marks newly added units_by_name as usable (via state change) */
-void configuration_commit(void)
-{
-	sysman_log(LVL_DEBUG2, "%s", __func__);
-
-	/*
-	 * Apply commit to all units_by_name, each commited unit commits its outgoing
-	 * deps, thus eventually commiting all embryo deps as well.
-	 */
-	hash_table_apply(&units_by_name, &configuration_commit_unit, NULL);
-}
-
-static bool configuration_rollback_unit(ht_link_t *ht_link, void *arg)
-{
-	unit_t *unit = hash_table_get_inst(ht_link, unit_t, units_by_name);
-
-	list_foreach_safe(unit->dependencies, cur_link, next_link) {
-		unit_dependency_t *dep =
-		    list_get_instance(cur_link, unit_dependency_t, dependencies);
-		if (dep->state == DEP_EMBRYO) {
-			dep_remove_dependency(&dep);
-		}
-	}
-
-	if (unit->state == STATE_EMBRYO) {
-		hash_table_remove_item(&units_by_name, ht_link);
-		list_remove(&unit->units);
-		unit_destroy(&unit);
-	}
-
-	return true;
-}
-
-/** Remove all uncommited units_by_name and edges from configuratio
- *
- * Memory used by removed object is released.
- */
-void configuration_rollback(void)
-{
-	sysman_log(LVL_DEBUG2, "%s", __func__);
-
-	hash_table_apply(&units_by_name, &configuration_rollback_unit, NULL);
-}
-
-static bool configuration_resolve_unit(ht_link_t *ht_link, void *arg)
-{
-	bool *has_error_ptr = arg;
-	unit_t *unit = hash_table_get_inst(ht_link, unit_t, units_by_name);
-
-	list_foreach(unit->dependencies, dependencies, unit_dependency_t, dep) {
-		assert(dep->dependant == unit);
-		assert((dep->dependency != NULL) != (dep->dependency_name != NULL));
-		if (dep->dependency) {
-			continue;
-		}
-
-		unit_t *dependency =
-		    configuration_find_unit_by_name(dep->dependency_name);
-		if (dependency == NULL) {
-			sysman_log(LVL_ERROR,
-			    "Cannot resolve dependency of '%s' to unit '%s'",
-			    unit_name(unit), dep->dependency_name);
-			*has_error_ptr = true;
-			// TODO should we just leave the sprout untouched?
-		} else {
-			dep_resolve_dependency(dep, dependency);
-		}
-	}
-
-	return true;
-}
-
-/** Resolve unresolved dependencies between any pair of units_by_name
- *
- * @return EOK      on success
- * @return ENOENT  when one or more resolution fails, information is logged
- */
-int configuration_resolve_dependecies(void)
-{
-	sysman_log(LVL_DEBUG2, "%s", __func__);
-
-	bool has_error = false;
-	hash_table_apply(&units_by_name, &configuration_resolve_unit, &has_error);
-
-	return has_error ? ENOENT : EOK;
-}
-
-unit_t *configuration_find_unit_by_name(const char *name)
-{
-	ht_link_t *ht_link = hash_table_find(&units_by_name, (void *)name);
-	if (ht_link != NULL) {
-		return hash_table_get_inst(ht_link, unit_t, units_by_name);
-	} else {
-		return NULL;
-	}
-}
-
-unit_t *configuration_find_unit_by_handle(unit_handle_t handle)
-{
-	ht_link_t *ht_link = hash_table_find(&units_by_handle, &handle);
-	if (ht_link != NULL) {
-		return hash_table_get_inst(ht_link, unit_t, units_by_handle);
-	} else {
-		return NULL;
-	}
-}
-
Index: pace/srv/sysman/configuration.h
===================================================================
--- uspace/srv/sysman/configuration.h	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- * Copyright (c) 2015 Michal Koutny
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SYSMAN_CONFIGURATION_H
-#define SYSMAN_CONFIGURATION_H
-
-#include <adt/list.h>
-#include <ipc/sysman.h>
-
-#include "unit.h"
-
-extern list_t units;
-
-extern void configuration_init(void);
-
-extern int configuration_add_unit(unit_t *);
-
-extern void configuration_start_update(void);
-
-extern void configuration_commit(void);
-
-extern void configuration_rollback(void);
-
-extern int configuration_resolve_dependecies(void);
-
-extern unit_t *configuration_find_unit_by_name(const char *);
-extern unit_t *configuration_find_unit_by_handle(unit_handle_t);
-
-
-#endif
-
-
Index: uspace/srv/sysman/connection_broker.c
===================================================================
--- uspace/srv/sysman/connection_broker.c	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ uspace/srv/sysman/connection_broker.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -31,5 +31,5 @@
 #include <stdlib.h>
 
-#include "configuration.h"
+#include "repo.h"
 #include "connection_broker.h"
 #include "log.h"
@@ -67,5 +67,5 @@
 	}
 
-	unit_t *unit = configuration_find_unit_by_name(unit_name);
+	unit_t *unit = repo_find_unit_by_name(unit_name);
 	if (unit == NULL) {
 		//sysman_log(LVL_NOTE, "Unit '%s' not found.", unit_name);
Index: uspace/srv/sysman/connection_ctl.c
===================================================================
--- uspace/srv/sysman/connection_ctl.c	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ uspace/srv/sysman/connection_ctl.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -33,5 +33,5 @@
 #include <str.h>
 
-#include "configuration.h"
+#include "repo.h"
 #include "connection_ctl.h"
 #include "job.h"
@@ -79,5 +79,5 @@
 
 	// TODO this is connection fibril, UNSYNCHRONIZED access to units!
-	unit_t *unit = configuration_find_unit_by_name(unit_name);
+	unit_t *unit = repo_find_unit_by_name(unit_name);
 	if (unit == NULL) {
 		sysman_log(LVL_NOTE, "Unit '%s' not found.", unit_name);
@@ -180,5 +180,5 @@
 	
 	// TODO UNSYNCHRONIZED access to units!
-	unit_t *u = configuration_find_unit_by_handle(IPC_GET_ARG1(*icall));
+	unit_t *u = repo_find_unit_by_handle(IPC_GET_ARG1(*icall));
 	if (u == NULL) {
 		async_answer_0(callid, ENOENT);
@@ -196,5 +196,5 @@
 {
 	// TODO UNSYNCHRONIZED access to units!
-	unit_t *u = configuration_find_unit_by_handle(IPC_GET_ARG1(*icall));
+	unit_t *u = repo_find_unit_by_handle(IPC_GET_ARG1(*icall));
 	if (u == NULL) {
 		async_answer_0(iid, ENOENT);
Index: uspace/srv/sysman/job.c
===================================================================
--- uspace/srv/sysman/job.c	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ uspace/srv/sysman/job.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -32,5 +32,5 @@
 #include <stdlib.h>
 
-#include "configuration.h"
+#include "repo.h"
 #include "dep.h"
 #include "job.h"
Index: uspace/srv/sysman/main.c
===================================================================
--- uspace/srv/sysman/main.c	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ uspace/srv/sysman/main.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -37,5 +37,5 @@
 #include <str.h>
 
-#include "configuration.h"
+#include "repo.h"
 #include "connection_broker.h"
 #include "connection_ctl.h"
@@ -131,9 +131,9 @@
 	 * Add units to configuration and start the default target.
 	 */
-	configuration_start_update();
-
-	configuration_add_unit(mnt_initrd);
-	configuration_add_unit(cfg_init);
-	configuration_add_unit(tgt_init);
+	repo_begin_update();
+
+	repo_add_unit(mnt_initrd);
+	repo_add_unit(cfg_init);
+	repo_add_unit(tgt_init);
 
 	rc = dep_add_dependency(tgt_init, cfg_init);
@@ -147,5 +147,5 @@
 	}
 
-	configuration_commit();
+	repo_commit();
 
 	return EOK;
@@ -158,5 +158,5 @@
 
 rollback:
-	configuration_rollback();
+	repo_rollback();
 	return rc;
 }
@@ -186,5 +186,5 @@
 
 	/* Previous targets should have loaded new units */
-	unit_t *tgt = configuration_find_unit_by_name(target_name);
+	unit_t *tgt = repo_find_unit_by_name(target_name);
 	if (tgt == NULL) {
 		sysman_log(LVL_ERROR,
@@ -210,5 +210,5 @@
 	 */
 	// TODO check return values and abort start
-	configuration_init();
+	repo_init();
 	sysman_events_init();
 	job_queue_init();
Index: uspace/srv/sysman/repo.c
===================================================================
--- uspace/srv/sysman/repo.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
+++ uspace/srv/sysman/repo.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -0,0 +1,269 @@
+/*
+ * Copyright (c) 2015 Michal Koutny
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <adt/hash.h>
+#include <adt/hash_table.h>
+#include <adt/list.h>
+#include <assert.h>
+#include <errno.h>
+#include <fibril_synch.h>
+
+#include "repo.h"
+#include "dep.h"
+#include "log.h"
+
+// TODO rename to repository (dynamic nature of units storage, and do not name it godlike Manager :-)
+
+LIST_INITIALIZE(units);
+
+static hash_table_t units_by_name;
+static hash_table_t units_by_handle;
+
+/* Hash table functions */
+static size_t units_by_handle_ht_hash(const ht_link_t *item)
+{
+	unit_t *unit =
+	    hash_table_get_inst(item, unit_t, units_by_handle);
+	return unit->handle;
+}
+
+static size_t units_by_handle_ht_key_hash(void *key)
+{
+	return *(unit_handle_t *)key;
+}
+
+static bool units_by_handle_ht_equal(const ht_link_t *item1, const ht_link_t *item2)
+{
+	return
+	    hash_table_get_inst(item1, unit_t, units_by_handle) ==
+	    hash_table_get_inst(item2, unit_t, units_by_handle);
+}
+
+static bool units_by_handle_ht_key_equal(void *key, const ht_link_t *item)
+{
+	return *(unit_handle_t *)key ==
+	    hash_table_get_inst(item, unit_t, units_by_handle)->handle;
+}
+
+static hash_table_ops_t units_by_handle_ht_ops = {
+	.hash            = &units_by_handle_ht_hash,
+	.key_hash        = &units_by_handle_ht_key_hash,
+	.equal           = &units_by_handle_ht_equal,
+	.key_equal       = &units_by_handle_ht_key_equal,
+	.remove_callback = NULL // TODO realy unneeded?
+};
+
+static size_t units_by_name_ht_hash(const ht_link_t *item)
+{
+	unit_t *unit =
+	    hash_table_get_inst(item, unit_t, units_by_name);
+	return hash_string(unit->name);
+}
+
+static size_t units_by_name_ht_key_hash(void *key)
+{
+	return hash_string((const char *)key);
+}
+
+static bool units_by_name_ht_equal(const ht_link_t *item1, const ht_link_t *item2)
+{
+	return
+	    hash_table_get_inst(item1, unit_t, units_by_handle) ==
+	    hash_table_get_inst(item2, unit_t, units_by_handle);
+}
+
+static bool units_by_name_ht_key_equal(void *key, const ht_link_t *item)
+{
+	return str_cmp((const char *)key,
+	    hash_table_get_inst(item, unit_t, units_by_name)->name) == 0;
+}
+
+
+static hash_table_ops_t units_by_name_ht_ops = {
+	.hash            = &units_by_name_ht_hash,
+	.key_hash        = &units_by_name_ht_key_hash,
+	.equal           = &units_by_name_ht_equal,
+	.key_equal       = &units_by_name_ht_key_equal,
+	.remove_callback = NULL // TODO realy unneeded?
+};
+
+/* Repository functions */
+
+void repo_init(void)
+{
+	hash_table_create(&units_by_name, 0, 0, &units_by_name_ht_ops);
+	hash_table_create(&units_by_handle, 0, 0, &units_by_handle_ht_ops);
+}
+
+int repo_add_unit(unit_t *unit)
+{
+	assert(unit);
+	assert(unit->state == STATE_EMBRYO);
+	assert(unit->handle == 0);
+	assert(unit->name != NULL);
+	sysman_log(LVL_DEBUG2, "%s('%s')", __func__, unit_name(unit));
+
+	if (hash_table_insert_unique(&units_by_name, &unit->units_by_name)) {
+		/* Pointers are same size as unit_handle_t both on 32b and 64b */
+		unit->handle = (unit_handle_t)unit;
+
+		hash_table_insert(&units_by_handle, &unit->units_by_handle);
+		list_append(&unit->units, &units);
+		return EOK;
+	} else {
+		return EEXISTS;
+	}
+}
+
+void repo_begin_update(void) {
+	sysman_log(LVL_DEBUG2, "%s", __func__);
+}
+
+static bool repo_commit_unit(ht_link_t *ht_link, void *arg)
+{
+	unit_t *unit = hash_table_get_inst(ht_link, unit_t, units_by_name);
+	// TODO state locking?
+	if (unit->state == STATE_EMBRYO) {
+		unit->state = STATE_STOPPED;
+	}
+
+	list_foreach(unit->dependencies, dependencies, unit_dependency_t, dep) {
+		if (dep->state == DEP_EMBRYO) {
+			dep->state = DEP_VALID;
+		}
+	}
+	return true;
+}
+
+/** Marks newly added units_by_name as usable (via state change) */
+void repo_commit(void)
+{
+	sysman_log(LVL_DEBUG2, "%s", __func__);
+
+	/*
+	 * Apply commit to all units_by_name, each commited unit commits its outgoing
+	 * deps, thus eventually commiting all embryo deps as well.
+	 */
+	hash_table_apply(&units_by_name, &repo_commit_unit, NULL);
+}
+
+static bool repo_rollback_unit(ht_link_t *ht_link, void *arg)
+{
+	unit_t *unit = hash_table_get_inst(ht_link, unit_t, units_by_name);
+
+	list_foreach_safe(unit->dependencies, cur_link, next_link) {
+		unit_dependency_t *dep =
+		    list_get_instance(cur_link, unit_dependency_t, dependencies);
+		if (dep->state == DEP_EMBRYO) {
+			dep_remove_dependency(&dep);
+		}
+	}
+
+	if (unit->state == STATE_EMBRYO) {
+		hash_table_remove_item(&units_by_name, ht_link);
+		list_remove(&unit->units);
+		unit_destroy(&unit);
+	}
+
+	return true;
+}
+
+/** Remove all uncommited units_by_name and edges from configuratio
+ *
+ * Memory used by removed object is released.
+ */
+void repo_rollback(void)
+{
+	sysman_log(LVL_DEBUG2, "%s", __func__);
+
+	hash_table_apply(&units_by_name, &repo_rollback_unit, NULL);
+}
+
+static bool repo_resolve_unit(ht_link_t *ht_link, void *arg)
+{
+	bool *has_error_ptr = arg;
+	unit_t *unit = hash_table_get_inst(ht_link, unit_t, units_by_name);
+
+	list_foreach(unit->dependencies, dependencies, unit_dependency_t, dep) {
+		assert(dep->dependant == unit);
+		assert((dep->dependency != NULL) != (dep->dependency_name != NULL));
+		if (dep->dependency) {
+			continue;
+		}
+
+		unit_t *dependency =
+		    repo_find_unit_by_name(dep->dependency_name);
+		if (dependency == NULL) {
+			sysman_log(LVL_ERROR,
+			    "Cannot resolve dependency of '%s' to unit '%s'",
+			    unit_name(unit), dep->dependency_name);
+			*has_error_ptr = true;
+			// TODO should we just leave the sprout untouched?
+		} else {
+			dep_resolve_dependency(dep, dependency);
+		}
+	}
+
+	return true;
+}
+
+/** Resolve unresolved dependencies between any pair of units_by_name
+ *
+ * @return EOK      on success
+ * @return ENOENT  when one or more resolution fails, information is logged
+ */
+int repo_resolve_dependecies(void)
+{
+	sysman_log(LVL_DEBUG2, "%s", __func__);
+
+	bool has_error = false;
+	hash_table_apply(&units_by_name, &repo_resolve_unit, &has_error);
+
+	return has_error ? ENOENT : EOK;
+}
+
+unit_t *repo_find_unit_by_name(const char *name)
+{
+	ht_link_t *ht_link = hash_table_find(&units_by_name, (void *)name);
+	if (ht_link != NULL) {
+		return hash_table_get_inst(ht_link, unit_t, units_by_name);
+	} else {
+		return NULL;
+	}
+}
+
+unit_t *repo_find_unit_by_handle(unit_handle_t handle)
+{
+	ht_link_t *ht_link = hash_table_find(&units_by_handle, &handle);
+	if (ht_link != NULL) {
+		return hash_table_get_inst(ht_link, unit_t, units_by_handle);
+	} else {
+		return NULL;
+	}
+}
+
Index: uspace/srv/sysman/repo.h
===================================================================
--- uspace/srv/sysman/repo.h	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
+++ uspace/srv/sysman/repo.h	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015 Michal Koutny
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SYSMAN_REPO_H
+#define SYSMAN_REPO_H
+
+#include <adt/list.h>
+#include <ipc/sysman.h>
+
+#include "unit.h"
+
+extern list_t units;
+
+extern void repo_init(void);
+
+extern int repo_add_unit(unit_t *);
+
+extern void repo_begin_update(void);
+
+extern void repo_commit(void);
+
+extern void repo_rollback(void);
+
+extern int repo_resolve_dependecies(void);
+
+extern unit_t *repo_find_unit_by_name(const char *);
+extern unit_t *repo_find_unit_by_handle(unit_handle_t);
+
+
+#endif
+
+
Index: uspace/srv/sysman/sm_task.c
===================================================================
--- uspace/srv/sysman/sm_task.c	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ uspace/srv/sysman/sm_task.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -31,5 +31,5 @@
 #include <task.h>
 
-#include "configuration.h"
+#include "repo.h"
 #include "log.h"
 #include "sysman.h"
Index: uspace/srv/sysman/units/unit_cfg.c
===================================================================
--- uspace/srv/sysman/units/unit_cfg.c	(revision 918ac9b436524826203b0d2b04684a680c4511aa)
+++ uspace/srv/sysman/units/unit_cfg.c	(revision af923091a195e92212b03425f9d384e6b59c4dc5)
@@ -38,5 +38,5 @@
 #include <sysman/unit.h>
 
-#include "configuration.h"
+#include "repo.h"
 #include "log.h"
 #include "unit.h"
@@ -82,5 +82,5 @@
 	}
 	
-	unit_t *u = configuration_find_unit_by_name(unit_name);
+	unit_t *u = repo_find_unit_by_name(unit_name);
 	if (u != NULL) {
 		// TODO allow updating configuration of existing unit
@@ -162,5 +162,5 @@
 	}
 
-	configuration_start_update();
+	repo_begin_update();
 
 	while ((de = readdir(dir))) {
@@ -178,15 +178,15 @@
 
 		assert(unit->state == STATE_EMBRYO);
-		configuration_add_unit(unit);
+		repo_add_unit(unit);
 	}
 	closedir(dir);
 
-	int rc = configuration_resolve_dependecies();
+	int rc = repo_resolve_dependecies();
 	if (rc != EOK) {
-		configuration_rollback();
+		repo_rollback();
 		return rc;
 	}
 
-	configuration_commit();
+	repo_commit();
 	return EOK;
 }
