diff --git a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
index be4caec..566bd34 100644
--- a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
+++ b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>0,1,2,11,20,1,2,11,20,1,2,11,20,1,2,11,20</testcases>
+    <testcases>0,2,11,20,2,11,20,2,11,20,2,11,20</testcases>
 
     <SCALE>1,3,5,7</SCALE>
 
diff --git a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
index ec12f35..fb6dec8 100644
--- a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
+++ b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
@@ -33,7 +33,7 @@
     def __init__( self ):
         self.default = ''
 
-    def CASE0( self, main):
+    def CASE0( self, main ):
         import sys
         import json
         import time
@@ -83,18 +83,13 @@
             main.log.info( "Cresting DB file" )
             with open( main.dbFileName, "w+" ) as dbFile:
                 dbFile.write( "" )
-            stepResult = main.testSetUp.gitPulling()
+            stepResult = main.testSetUp.envSetup()
         except Exception as e:
             main.testSetUp.envSetupException( e )
         main.testSetUp.evnSetupConclusion( stepResult )
 
         main.commit = main.commit.split( " " )[ 1 ]
 
-    def CASE1( self ):
-        # main.scale[ 0 ] determines the current number of ONOS controller
-        main.testSetUp.getNumCtrls( True )
-        main.testSetUp.envSetup( includeGitPull=False, makeMaxNodes=False )
-
     def CASE2( self, main ):
         """
         - Uninstall ONOS cluster
@@ -102,17 +97,16 @@
         - Install ONOS cluster
         - Connect to cli
         """
-        main.testSetUp.ONOSSetUp( main.Mininet1, True,
-                                  cellName=main.cellName, killRemoveMax=False,
-                                  CtrlsSet=False )
+        main.testSetUp.ONOSSetUp( main.Mininet1, main.Cluster, True,
+                                  cellName=main.cellName, killRemoveMax=False )
 
     def CASE11( self, main ):
         main.log.info( "set and configure Application" )
         import json
         import time
-        time.sleep(main.startUpSleep)
+        time.sleep( main.startUpSleep )
         main.step( "Activating org.onosproject.proxyarp" )
-        appStatus = utilities.retry( main.ONOSrest1.activateApp,
+        appStatus = utilities.retry( main.Cluster.active( 0 ).REST.activateApp,
                                      main.FALSE,
                                      [ 'org.onosproject.proxyarp' ],
                                      sleep=3,
@@ -120,40 +114,41 @@
         utilities.assert_equals( expect=main.TRUE,
                                  actual=appStatus,
                                  onpass="Successfully activated proxyarp",
-                                 onfail="Failed to activated proxyarp")
+                                 onfail="Failed to activated proxyarp" )
 
         main.step( "Set up Default Topology Provider" )
         appStatus = main.TRUE
         configName = 'org.onosproject.net.topology.impl.DefaultTopologyProvider'
         configParam = 'maxEvents'
-        appStatus = appStatus and main.CLIs[0].setCfg(  configName, configParam,'1' )
+        appStatus = appStatus and main.Cluster.active( 0 ).CLI.setCfg( configName, configParam, '1' )
         configParam = 'maxBatchMs'
-        appStatus = appStatus and main.CLIs[0].setCfg( configName, configParam, '0')
+        appStatus = appStatus and main.Cluster.active( 0 ).CLI.setCfg( configName, configParam, '0' )
         configParam = 'maxIdleMs'
-        appStatus = appStatus and main.CLIs[0].setCfg( configName, configParam,'0' )
+        appStatus = appStatus and main.Cluster.active( 0 ).CLI.setCfg( configName, configParam, '0' )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=appStatus,
                                  onpass="Successfully set DefaultTopologyProvider",
                                  onfail="Failed to set DefaultTopologyProvider" )
 
-        time.sleep( main.startUpSleep)
-        main.step('Starting mininet topology')
-        mnStatus = main.Mininet1.startNet(args='--topo=linear,1')
+        time.sleep( main.startUpSleep )
+        main.step( 'Starting mininet topology' )
+        mnStatus = main.Mininet1.startNet( args='--topo=linear,1' )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=mnStatus,
                                  onpass="Successfully started Mininet",
                                  onfail="Failed to activate Mininet" )
-        main.step("Assinging masters to switches")
+        main.step( "Assinging masters to switches" )
         switches = main.Mininet1.getSwitches()
-        swStatus = main.Mininet1.assignSwController( sw=switches.keys(), ip=main.ONOSip[0] )
+        swStatus = main.Mininet1.assignSwController( sw=switches.keys(),
+                                                     ip=main.Cluster.active( 0 ).ipAddress )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=swStatus,
                                  onpass="Successfully assigned switches to masters",
                                  onfail="Failed assign switches to masters" )
 
-        time.sleep( main.startUpSleep)
+        time.sleep( main.startUpSleep )
 
-    def CASE20(self, main):
+    def CASE20( self, main ):
         """
         host1 send arping package and measure latency
 
@@ -180,9 +175,9 @@
         # Host adding measurement
         assertion = main.TRUE
 
-        main.log.report('Latency of adding one host to ONOS')
-        main.log.report('First ' + str( main.iterIgnore ) + ' iterations ignored' + ' for jvm warmup time')
-        main.log.report('Total iterations of test: ' + str( main.numlter ) )
+        main.log.report( 'Latency of adding one host to ONOS' )
+        main.log.report( 'First ' + str( main.iterIgnore ) + ' iterations ignored' + ' for jvm warmup time' )
+        main.log.report( 'Total iterations of test: ' + str( main.numlter ) )
 
         addingHostTime = []
         metricsResultList = []
@@ -191,16 +186,16 @@
             with open( main.tsharkResultPath, "w" ) as dbFile:
                 dbFile.write( "" )
 
-            main.log.info('Starting tshark capture')
+            main.log.info( 'Starting tshark capture' )
             main.ONOSbench.tsharkGrep( main.tsharkPacketIn, main.tsharkResultPath )
             time.sleep( main.measurementSleep )
 
-            main.log.info('host 1 arping...')
-            main.Mininet1.arping(srcHost='h1', dstHost='10.0.0.2')
+            main.log.info( 'host 1 arping...' )
+            main.Mininet1.arping( srcHost='h1', dstHost='10.0.0.2' )
 
             time.sleep( main.measurementSleep )
 
-            main.log.info('Stopping all Tshark processes')
+            main.log.info( 'Stopping all Tshark processes' )
             main.ONOSbench.tsharkStop()
 
             time.sleep( main.measurementSleep )
@@ -209,7 +204,7 @@
             with open( main.tsharkResultPath, "r" ) as resultFile:
                 resultText = resultFile.readline()
                 main.log.info( 'Capture result:' + resultText )
-                resultText = resultText.split(' ')
+                resultText = resultText.split( ' ' )
                 if len( resultText ) > 1:
                     tsharkResultTime = float( resultText[ 1 ] ) * 1000.0
                 else:
@@ -220,8 +215,8 @@
             # Compare the timestemps, and get the lowest one.
             temp = 0;
             # Get host event timestamps from each nodes
-            for node in range ( 0, main.numCtrls ):
-                metricsResult = json.loads( main.CLIs[ node ].topologyEventsMetrics() )
+            for ctrl in main.Cluster.active():
+                metricsResult = json.loads( ctrl.CLI.topologyEventsMetrics() )
                 metricsResult = metricsResult.get( main.hostTimestampKey ).get( "value" )
                 main.log.info( "ONOS topology event matrics timestemp: {}".format( str( metricsResult ) ) )
 
@@ -230,12 +225,12 @@
                 metricsResult = temp
 
             addingHostTime.append( float( metricsResult ) - tsharkResultTime )
-            main.log.info( "Result of this iteration: {}".format( str( float( metricsResult ) - tsharkResultTime) ) )
+            main.log.info( "Result of this iteration: {}".format( str( float( metricsResult ) - tsharkResultTime ) ) )
             # gethost to remove
-            gethost = main.ONOSrest1.hosts()
+            gethost = main.Cluster.active( 0 ).REST.hosts()
             HosttoRemove = []
             HosttoRemove.append( json.loads( gethost[ 1:len( gethost )-1 ] ).get( 'id' ) )
-            main.CLIs[0].removeHost( HosttoRemove )
+            main.Cluster.active( 0 ).CLI.removeHost( HosttoRemove )
 
         main.log.info( "Result List: {}".format( addingHostTime ) )
 
@@ -244,28 +239,28 @@
         main.log.info( "Average Latency: {}".format( averageResult ) )
 
         # calculate std
-        stdResult = numpy.std(addingHostTime)
-        main.log.info("std: {}".format(stdResult))
+        stdResult = numpy.std( addingHostTime )
+        main.log.info( "std: {}".format( stdResult ) )
 
         # write to DB file
-        main.log.info("Writing results to DS file")
-        with open(main.dbFileName, "a") as dbFile:
+        main.log.info( "Writing results to DS file" )
+        with open( main.dbFileName, "a" ) as dbFile:
             temp = "'" + main.commit + "',"
             temp += "'" + main.nic + "',"
             # Scale number
-            temp += str( main.numCtrls )
+            temp += str( main.Cluster.numCtrls )
             temp += ",'" + "baremetal1" + "'"
             # average latency
             temp += "," + str( averageResult )
             # std of latency
-            temp += "," + str(stdResult)
+            temp += "," + str( stdResult )
             temp += "\n"
             dbFile.write( temp )
 
         assertion = main.TRUE
 
-        utilities.assert_equals(expect=main.TRUE, actual=assertion,
+        utilities.assert_equals( expect=main.TRUE, actual=assertion,
                 onpass='Host latency test successful',
-                onfail='Host latency test failed')
+                onfail='Host latency test failed' )
 
         main.Utils.mininetCleanup( main.Mininet1 )
diff --git a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.topo b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.topo
index 74e1277..ebde314 100644
--- a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.topo
+++ b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.topo
@@ -1,109 +1,25 @@
 <TOPOLOGY>
-
     <COMPONENT>
 
-        <ONOSbench>
-            <host>localhost</host>
+        <ONOScell>
+            <host>localhost</host>  # ONOS "bench" machine
             <user>sdn</user>
             <password>rocks</password>
-            <type>OnosDriver</type>
+            <type>OnosClusterDriver</type>
             <connect_order>1</connect_order>
             <COMPONENTS>
-                <home>~/onos</home>
-                <nodes>7</nodes> 
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOSbench>
-
-        <ONOScli1>
-            <host>localhost</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosCliDriver</type>
-            <connect_order>2</connect_order>
-            <COMPONENTS>
+                <cluster_name></cluster_name>  # Used as a prefix for cluster components. Defaults to 'ONOS'
+                <diff_clihost></diff_clihost>  # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
                 <karaf_username></karaf_username>
                 <karaf_password></karaf_password>
-                <prompt></prompt>
+                <web_user></web_user>
+                <web_pass></web_pass>
+                <rest_port></rest_port>
+                <prompt></prompt>  # TODO: we technically need a few of these, one per component
+                <onos_home></onos_home>  # defines where onos home is
+                <nodes> 7 </nodes>  # number of nodes in the cluster
             </COMPONENTS>
-        </ONOScli1>
-
-        <ONOScli2>
-            <host>localhost</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosCliDriver</type>
-            <connect_order>3</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOScli2>
-
-        <ONOScli3>
-            <host>localhost</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosCliDriver</type>
-            <connect_order>4</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOScli3>
-
-        <ONOScli4>
-            <host>localhost</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosCliDriver</type>
-            <connect_order>5</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOScli4>
-
-        <ONOScli5>
-            <host>localhost</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosCliDriver</type>
-            <connect_order>6</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOScli5>
-
-        <ONOScli6>
-            <host>localhost</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosCliDriver</type>
-            <connect_order>7</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOScli6>
-
-        <ONOScli7>
-            <host>localhost</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosCliDriver</type>
-            <connect_order>8</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOScli7>
-
-        <ONOS1>
-            <host>OC1</host>
-            <user>sdn</user>
-            <password>rocks</password>
-            <type>OnosDriver</type>
-            <connect_order>9</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOS1>
+        </ONOScell>
 
         <Mininet1>
             <host>OCN</host>
@@ -116,18 +32,6 @@
             </COMPONENTS>
         </Mininet1>
 
-        <ONOSrest1>
-            <host>OC1</host>
-            <port>8181</port>
-            <user>onos</user>
-            <password>rocks</password>
-            <type>OnosRestDriver</type>
-            <connect_order>3</connect_order>
-            <COMPONENTS>
-                <prompt></prompt>
-            </COMPONENTS>
-        </ONOSrest1>
-
     </COMPONENT>
 
 </TOPOLOGY>
