diff --git a/src/Makefile b/src/Makefile
index a64c266e487ec303f6209d94e68fc38b3938b282..e00582695e8076d80063abba7764c95e1be2ba54 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,8 +1,6 @@
 LIBNETMNGR = libnetmngr.so
-LIBIFACESTACK = libinterface_stack.so
 
-LIBNETMNGROBJS = net_plugin.o common.o
-LIBIFACESTACKOBJS := interfacestack.o
+LIBNETMNGROBJS = net_plugin.o common.o interfacestack.o
 
 LIB_CFLAGS = $(CFLAGS) -Wall -Werror -fstrict-aliasing -g
 LIB_LDFLAGS = $(LDFLAGS)
@@ -47,14 +45,11 @@ endif
 %.o: %.c
 	$(CC) $(LIB_CFLAGS) $(FPIC) -c -o $@ $<
 
-all: $(LIBNETMNGR) $(LIBIFACESTACK)
+all: $(LIBNETMNGR)
 
 $(LIBNETMNGR): $(LIBNETMNGROBJS)
 	$(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -o $@ $^
 
-$(LIBIFACESTACK): $(LIBIFACESTACKOBJS)
-	$(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -o $@ $^
-
 clean:
-	rm -f *.o $(LIBNETMNGR) $(LIBIFACESTACK)
+	rm -f *.o $(LIBNETMNGR)
 
diff --git a/src/interfacestack.c b/src/interfacestack.c
index d0d238c9647c3b488d320c6fc72f82ac7588f3f9..3f278387ef471551b5125894b47f6c086b9e9d25 100644
--- a/src/interfacestack.c
+++ b/src/interfacestack.c
@@ -127,8 +127,8 @@ static int create_interface_stack_instance(struct dmctx *dmctx, DMNODE *parent_n
 	dmuci_get_value_by_section_string(s, inst_alias, &data->HigherAlias);
 	dmuci_get_value_by_section_string(s, "LowerLayers", &LowerLayer);
 
-	data->LowerLayer = get_value_by_reference(dmctx, LowerLayer);
-	data->LowerAlias = get_lower_alias_value(data->LowerLayer);
+	data->LowerLayer = LowerLayer; //get_value_by_reference(dmctx, LowerLayer);
+	data->LowerAlias = get_lower_alias_value(data->LowerLayer); //TODO
 
 	inst = handle_instance_without_section(dmctx, parent_node, ++(*curr_inst));
 
@@ -324,12 +324,6 @@ static int get_InterfaceStack_LowerAlias(char *refparam, struct dmctx *ctx, void
 /**********************************************************************************************************************************
 *                                            OBJ & PARAM DEFINITION
 ***********************************************************************************************************************************/
-DM_MAP_OBJ tDynamicObj[] = {
-/* parentobj, nextobject, parameter */
-{"Device.", tDeviceInterfaceStackObj, tDeviceInterfaceStackParams},
-{0}
-};
-
 /* *** Device. *** */
 DMOBJ tDeviceInterfaceStackObj[] = {
 /* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, dynamicleaf, nextobj, leaf, linker, bbfdm_type, uniqueKeys, version*/
@@ -347,8 +341,8 @@ DMLEAF tDeviceInterfaceStackParams[] = {
 DMLEAF tInterfaceStackParams[] = {
 /* PARAM, permission, type, getvalue, setvalue, bbfdm_type, version*/
 {"Alias", &DMWRITE, DMT_STRING, get_InterfaceStack_Alias, set_InterfaceStack_Alias, BBFDM_BOTH, DM_FLAG_UNIQUE},
-{"HigherLayer", &DMREAD, DMT_STRING, get_InterfaceStack_HigherLayer, NULL, BBFDM_BOTH},
-{"LowerLayer", &DMREAD, DMT_STRING, get_InterfaceStack_LowerLayer, NULL, BBFDM_BOTH},
+{"HigherLayer", &DMREAD, DMT_STRING, get_InterfaceStack_HigherLayer, NULL, BBFDM_BOTH, DM_FLAG_REFERENCE},
+{"LowerLayer", &DMREAD, DMT_STRING, get_InterfaceStack_LowerLayer, NULL, BBFDM_BOTH, DM_FLAG_REFERENCE},
 {"HigherAlias", &DMREAD, DMT_STRING, get_InterfaceStack_HigherAlias, NULL, BBFDM_BOTH},
 {"LowerAlias", &DMREAD, DMT_STRING, get_InterfaceStack_LowerAlias, NULL, BBFDM_BOTH},
 {0}
diff --git a/src/ip.c b/src/ip.c
index d7051b0cbbbbd38fa510c16e809096e59b946513..10e0d43dcf3a68cf1d408b523be466fed7105141 100644
--- a/src/ip.c
+++ b/src/ip.c
@@ -1318,34 +1318,29 @@ static int get_IPInterface_LastChange(char *refparam, struct dmctx *ctx, void *d
 
 static int get_IPInterface_LowerLayers(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
 {
-	dmuci_get_value_by_section_string(((struct dm_data *)data)->dmmap_section, "LowerLayers", value);
+	char buf[1024] = {0};
 
-	if ((*value)[0] == '\0') {
-		char buf[1024] = {0};
-
-		char *device = get_device(section_name(((struct dm_data *)data)->config_section));
-		if (DM_STRLEN(device) == 0) {
-			dmuci_get_value_by_section_string(((struct dm_data *)data)->config_section, "device", &device);
-			if (DM_STRLEN(device) == 0)
-				return 0;
-		}
-
-		bbfdm_get_references(ctx, MATCH_FIRST, "Device.PPP.Interface.", "Name", device, buf, sizeof(buf));
-		bbfdm_get_references(ctx, MATCH_FIRST, "Device.Ethernet."BBF_VENDOR_PREFIX"MACVLAN.", "Name", device, buf, sizeof(buf));
-		bbfdm_get_references(ctx, MATCH_FIRST, "Device.Ethernet.VLANTermination.", "Name", device, buf, sizeof(buf));
-		bbfdm_get_references(ctx, MATCH_FIRST, "Device.Ethernet.Link.", "Name", device, buf, sizeof(buf));
-
-		if ((DM_STRLEN(device) > 5) && DM_LSTRNCMP(device, "gre", 3) == 0) {
-			// gre device name is of the form gre4-<iface> or gre6-<iface>
-			bbfdm_get_references(ctx, MATCH_FIRST, "Device.GRE.Tunnel.*.Interface.", "Name", device + 5, buf, sizeof(buf));
-		}
+	char *device = get_device(section_name(((struct dm_data *)data)->config_section));
+	if (DM_STRLEN(device) == 0) {
+		dmuci_get_value_by_section_string(((struct dm_data *)data)->config_section, "device", &device);
+		if (DM_STRLEN(device) == 0)
+			return 0;
+	}
 
-		// Store LowerLayers value
-		dmuci_set_value_by_section(((struct dm_data *)data)->dmmap_section, "LowerLayers", buf);
+	bbfdm_get_references(ctx, MATCH_FIRST, "Device.PPP.Interface.", "Name", device, buf, sizeof(buf));
+	bbfdm_get_references(ctx, MATCH_FIRST, "Device.Ethernet."BBF_VENDOR_PREFIX"MACVLAN.", "Name", device, buf, sizeof(buf));
+	bbfdm_get_references(ctx, MATCH_FIRST, "Device.Ethernet.VLANTermination.", "Name", device, buf, sizeof(buf));
+	bbfdm_get_references(ctx, MATCH_FIRST, "Device.Ethernet.Link.", "Name", device, buf, sizeof(buf));
 
-		*value = dmstrdup(buf);
+	if ((DM_STRLEN(device) > 5) && DM_LSTRNCMP(device, "gre", 3) == 0) {
+		// gre device name is of the form gre4-<iface> or gre6-<iface>
+		bbfdm_get_references(ctx, MATCH_FIRST, "Device.GRE.Tunnel.*.Interface.", "Name", device + 5, buf, sizeof(buf));
 	}
 
+	// Store LowerLayers value
+	dmuci_set_value_by_section(((struct dm_data *)data)->dmmap_section, "LowerLayers", buf);
+
+	*value = dmstrdup(buf);
 	return 0;
 }
 
diff --git a/src/net_plugin.c b/src/net_plugin.c
index 0584f43cb1c2028530ee059f1f07fca9d06839a8..1690ebfa19cfbff9d361539e29ae11e7f6802457 100644
--- a/src/net_plugin.c
+++ b/src/net_plugin.c
@@ -34,6 +34,8 @@
 #include "ipv6rd.h"
 #endif
 
+#include "interfacestack.h" //TODO
+
 DM_MAP_OBJ tDynamicObj[] = {
 /* parentobj, nextobject, parameter */
 
@@ -61,5 +63,7 @@ DM_MAP_OBJ tDynamicObj[] = {
 {"Device.", tDeviceIPv6rdObj, NULL},
 #endif
 
+{"Device.", tDeviceInterfaceStackObj, tDeviceInterfaceStackParams},
+
 {0}
 };