diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
index 7cc2258..b67a5f7 100644
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
+++ b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
@@ -18,7 +18,7 @@
         the OF-Config server is running on the node to be configured
     """
     startResult = main.FALSE
-    startResult = main.CLIs[ 0 ].activateApp( appName="org.onosproject.netconf" )
+    startResult = main.RESTs[ 0 ].activateApp( appName="org.onosproject.netconf" )
     return startResult
 
 
@@ -96,7 +96,7 @@
     method = "POST"
     data = main.cfgJson
     configResult = main.FALSE
-    sendResult = main.CLIs[ 0 ].send( url=url, method=method, data=data )
+    sendResult = main.RESTs[ 0 ].send( url=url, method=method, data=data )
     main.log.info( "Device configuration request response code: " + str( sendResult[ 0 ] ) )
     if ( 200 <= sendResult[ 0 ] <= 299 ):
         configResult = main.TRUE
@@ -117,8 +117,8 @@
     addressResult = main.FALSE
     driverResult = main.FALSE
     try:
-        apiResult = main.CLIs[ 0 ].devices()
-        cliResult = main.CLIs2[ 0 ].devices()
+        apiResult = main.RESTs[ 0 ].devices()
+        cliResult = main.CLIs[ 0 ].devices()
 
         apiDict = json.loads( apiResult )
         cliDict = json.loads( cliResult )
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/startUp.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/startUp.py
deleted file mode 100644
index a9becf9..0000000
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/startUp.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-    This wrapper function is use for starting up onos instance
-"""
-import time
-import os
-import json
-
-
-def onosBuild( main, gitBranch ):
-    """
-        This includes pulling ONOS and building it using maven install
-    """
-    buildResult = main.FALSE
-
-    # Git checkout a branch of ONOS
-    checkOutResult = main.ONOSbench.gitCheckout( gitBranch )
-    # Does the git pull on the branch that was checked out
-    if not checkOutResult:
-        main.log.warn( "Failed to checked out " + gitBranch +
-                                           " branch" )
-    else:
-        main.log.info( "Successfully checked out " + gitBranch +
-                                           " branch" )
-    gitPullResult = main.ONOSbench.gitPull()
-    if gitPullResult == main.ERROR:
-        main.log.error( "Error pulling git branch" )
-    else:
-        main.log.info( "Successfully pulled " + gitBranch + " branch" )
-
-    # buck build
-    buildResult = main.ONOSbench.buckBuild()
-
-    return buildResult
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/topo.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/topo.py
deleted file mode 100644
index 7217d4d..0000000
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/topo.py
+++ /dev/null
@@ -1,102 +0,0 @@
-"""
-    These functions can be used for topology comparisons
-"""
-import time
-import os
-import json
-
-
-def getAllDevices( main ):
-    """
-        Return a list containing the devices output from each ONOS node
-    """
-    devices = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].devices,
-                         name="devices-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        devices.append( t.result )
-    return devices
-
-
-def getAllHosts( main ):
-    """
-        Return a list containing the hosts output from each ONOS node
-    """
-    hosts = []
-    ipResult = main.TRUE
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].hosts,
-                         name="hosts-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        hosts.append( t.result )
-    return hosts
-
-
-def getAllPorts( main ):
-    """
-        Return a list containing the ports output from each ONOS node
-    """
-    ports = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].ports,
-                         name="ports-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        ports.append( t.result )
-    return ports
-
-
-def getAllLinks( main ):
-    """
-        Return a list containing the links output from each ONOS node
-    """
-    links = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].links,
-                         name="links-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        links.append( t.result )
-    return links
-
-
-def getAllClusters( main ):
-    """
-        Return a list containing the clusters output from each ONOS node
-    """
-    clusters = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].clusters,
-                         name="clusters-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        clusters.append( t.result )
-    return clusters
