diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
index c45fef8..f06a7c8 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
@@ -16,8 +16,8 @@
     </DEPENDENCY>
 
     <GIT>
-        <gitPull>off</gitPull>
-        <gitBranch>master</gitBranch>
+        <pull>False</pull>
+        <branch>master</branch>
     </GIT>
 
     <CTRL>
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
index 6a5731d..deaaead 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
@@ -25,198 +25,75 @@
             different versions of ONOS.
         - Construct tests variables
         '''
-        gitPull = main.params['GIT']['gitPull']
-        gitBranch = main.params['GIT']['gitBranch']
+        try:
+            from tests.dependencies.ONOSSetup import ONOSSetup
+            main.testSetUp = ONOSSetup()
+        except ImportError:
+            main.log.error( "ONOSSetup not found. exiting the test" )
+            main.exit()
+        main.testSetUp.envSetupDescription()
+        stepResult = main.FALSE
+        try:
+            # The dictionary to record different type of wrongs
+            main.wrong = { 'totalWrong': 0, 'skipDown' : 0, 'TsharkValueIncorrect': 0,
+                    'TypeError' : 0, 'decodeJasonError': 0,
+                    'checkResultIncorrect': 0}
+            main.maxWrong = int( main.params['TEST'] ['MaxWrong'] )
+            main.resultRange = main.params['TEST']['ResultRange']
+            main.searchTerm = main.params['TEST']['SearchTerm']
+            main.MN1Ip = main.params['MN']['ip1']
+            main.dependencyPath = main.testOnDirectory + \
+                                  main.params['DEPENDENCY']['path']
+            main.topoName = main.params['DEPENDENCY']['topology']
+            main.dependencyFunc = main.params['DEPENDENCY']['function']
+            main.cellName = main.params['ENV']['cellName']
+            main.apps = main.params['ENV']['cellApps']
+            main.scale = (main.params['SCALE']).split(",")
 
-        main.case( "Pull onos branch and build onos on Teststation." )
+            main.ofPackage = main.params['TSHARK']
 
-        if gitPull == 'True':
-            main.step( "Git Checkout ONOS branch: " + gitBranch )
-            stepResult = main.ONOSbench.gitCheckout( branch=gitBranch )
-            utilities.assert_equals(expect=main.TRUE,
-                                    actual=stepResult,
-                                    onpass="Successfully checkout onos branch.",
-                                    onfail="Failed to checkout onos branch. Exiting test...")
-            if not stepResult: main.exit()
+            main.tsharkResultPath = main.params['TEST']['tsharkResultPath']
+            main.sampleSize = int(main.params['TEST']['sampleSize'])
+            main.warmUp = int(main.params['TEST']['warmUp'])
+            main.dbFileName = main.params['DATABASE']['dbName']
+            main.startUpSleep = int(main.params['SLEEP']['startup'])
+            main.measurementSleep = int( main.params['SLEEP']['measure'] )
+            main.deleteSwSleep = int( main.params['SLEEP']['deleteSW'] )
+            main.maxScale = int( main.params['max'] )
+            main.timeout = int( main.params['TIMEOUT']['timeout'] )
+            main.MNSleep = int( main.params['SLEEP']['mininet'])
+            main.device = main.params['TEST']['device']
+            stepResult = main.testSetUp.gitPulling()
+            main.log.info("Create Database file " + main.dbFileName)
+            resultsDB = open(main.dbFileName, "w+")
+            resultsDB.close()
 
-            main.step( "Git Pull on ONOS branch:" + gitBranch )
-            stepResult = main.ONOSbench.gitPull()
-            utilities.assert_equals(expect=main.TRUE,
-                                    actual=stepResult,
-                                    onpass="Successfully pull onos. ",
-                                    onfail="Failed to pull onos. Exiting test ...")
-            if not stepResult: main.exit()
-
-
-        else:
-            main.log.warn( "Skipped pulling onos and Skipped building ONOS" )
-        # The dictionary to record different type of wrongs
-        main.wrong = { 'totalWrong': 0, 'skipDown' : 0, 'TsharkValueIncorrect': 0,
-                'TypeError' : 0, 'decodeJasonError': 0,
-                'checkResultIncorrect': 0}
-        main.maxWrong = int( main.params['TEST'] ['MaxWrong'] )
-        main.resultRange = main.params['TEST']['ResultRange']
-        main.searchTerm = main.params['TEST']['SearchTerm']
-        main.testOnDirectory = os.path.dirname( os.getcwd() )
-        main.MN1Ip = main.params['MN']['ip1']
-        main.dependencyPath = main.testOnDirectory + \
-                              main.params['DEPENDENCY']['path']
-        main.topoName = main.params['DEPENDENCY']['topology']
-        main.dependencyFunc = main.params['DEPENDENCY']['function']
-        main.cellName = main.params['ENV']['cellName']
-        main.Apps = main.params['ENV']['cellApps']
-        main.scale = (main.params['SCALE']).split(",")
-
-        main.ofPackage = main.params['TSHARK']
-
-        main.tsharkResultPath = main.params['TEST']['tsharkResultPath']
-        main.sampleSize = int(main.params['TEST']['sampleSize'])
-        main.warmUp = int(main.params['TEST']['warmUp'])
-        main.dbFileName = main.params['DATABASE']['dbName']
-        main.startUpSleep = int(main.params['SLEEP']['startup'])
-        main.measurementSleep = int( main.params['SLEEP']['measure'] )
-        main.deleteSwSleep = int( main.params['SLEEP']['deleteSW'] )
-        main.maxScale = int( main.params['max'] )
-        main.timeout = int( main.params['TIMEOUT']['timeout'] )
-        main.MNSleep = int( main.params['SLEEP']['mininet'])
-        main.device = main.params['TEST']['device']
-        main.log.info("Create Database file " + main.dbFileName)
-        resultsDB = open(main.dbFileName, "w+")
-        resultsDB.close()
-
-        main.switchFunc = imp.load_source(main.dependencyFunc,
-                                       main.dependencyPath +
-                                       main.dependencyFunc +
-                                       ".py")
-
+            main.switchFunc = imp.load_source(main.dependencyFunc,
+                                           main.dependencyPath +
+                                           main.dependencyFunc +
+                                           ".py")
+        except Exception as e:
+            main.testSetUp.envSetupException( e )
+        main.testSetUp.evnSetupConclusion( stepResult )
+        main.commit = main.commit.split( " " )[ 1 ]
     def CASE1(self, main):
         # Clean up test environment and set up
         import time
-        main.log.info("Get ONOS cluster IP")
-        print(main.scale)
-        main.numCtrls = int(main.scale.pop(0))
-        main.ONOSip = []
-        main.maxNumBatch = 0
-        main.AllONOSip = main.ONOSbench.getOnosIps()
-        for i in range(main.numCtrls):
-            main.ONOSip.append(main.AllONOSip[i])
-        main.log.info(main.ONOSip)
-        main.CLIs = []
-        main.log.info("Creating list of ONOS cli handles")
-        for i in range(main.numCtrls):
-            main.CLIs.append(getattr(main, 'ONOScli%s' % (i + 1)))
-
-        if not main.CLIs:
-            main.log.error("Failed to create the list of ONOS cli handles")
-            main.cleanup()
+        try:
+            from tests.dependencies.utils import Utils
+        except ImportError:
+            main.log.error( "Utils not found exiting the test" )
             main.exit()
-
-        main.commit = main.ONOSbench.getVersion(report=True)
-        main.commit = main.commit.split(" ")[1]
-        main.log.info("Starting up %s node(s) ONOS cluster" % main.numCtrls)
-        main.log.info("Safety check, killing all ONOS processes" +
-                      " before initiating environment setup")
-
-        for i in range(main.numCtrls):
-            main.ONOSbench.onosStop(main.ONOSip[i])
-            main.ONOSbench.onosKill(main.ONOSip[i])
-
-        main.log.info("NODE COUNT = %s" % main.numCtrls)
-        main.ONOSbench.createCellFile(main.ONOSbench.ip_address,
-                                      main.cellName,
-                                      main.MN1Ip,
-                                      main.Apps,
-                                      main.ONOSip, main.ONOScli1.karafUser)
-        main.step("Apply cell to environment")
-        cellResult = main.ONOSbench.setCell(main.cellName)
-        verifyResult = main.ONOSbench.verifyCell()
-        stepResult = cellResult and verifyResult
-        utilities.assert_equals(expect=main.TRUE,
-                                actual=stepResult,
-                                onpass="Successfully applied cell to " + \
-                                       "environment",
-                                onfail="Failed to apply cell to environment ")
-
-        main.step("Creating ONOS package")
-        packageResult = main.ONOSbench.buckBuild()
-        stepResult = packageResult
-        utilities.assert_equals(expect=main.TRUE,
-                                actual=stepResult,
-                                onpass="Successfully created ONOS package",
-                                onfail="Failed to create ONOS package")
-
-        main.step("Uninstall ONOS package on all Nodes")
-        uninstallResult = main.TRUE
-        for i in range(int(main.numCtrls)):
-            main.log.info("Uninstalling package on ONOS Node IP: " + main.ONOSip[i])
-            u_result = main.ONOSbench.onosUninstall(main.ONOSip[i])
-            utilities.assert_equals(expect=main.TRUE, actual=u_result,
-                                    onpass="Test step PASS",
-                                    onfail="Test step FAIL")
-            uninstallResult = (uninstallResult and u_result)
-
-        main.step("Install ONOS package on all Nodes")
-        installResult = main.TRUE
-        for i in range(int(main.numCtrls)):
-            main.log.info("Installing package on ONOS Node IP: " + main.ONOSip[i])
-            i_result = main.ONOSbench.onosInstall(node=main.ONOSip[i])
-            utilities.assert_equals(expect=main.TRUE, actual=i_result,
-                                    onpass="Test step PASS",
-                                    onfail="Test step FAIL")
-            installResult = installResult and i_result
-
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
-        time.sleep( main.startUpSleep )
-        main.step( "Starting ONOS service" )
-        stopResult = main.TRUE
-        startResult = main.TRUE
-        onosIsUp = main.TRUE
-        for i in range( main.numCtrls ):
-            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
-        if onosIsUp == main.TRUE:
-            main.log.report( "ONOS instance is up and ready" )
-        else:
-            main.log.report( "ONOS instance may not be up, stop and " +
-                             "start ONOS again " )
-            for i in range( main.numCtrls ):
-                stopResult = stopResult and \
-                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
-            for i in range( main.numCtrls ):
-                startResult = startResult and \
-                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
-        stepResult = onosIsUp and stopResult and startResult
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=stepResult,
-                                 onpass="ONOS service is ready",
-                                 onfail="ONOS service did not start properly" )
-
-        time.sleep(2)
-        main.step("Start ONOS CLI on all nodes")
-        cliResult = main.TRUE
-        main.step(" Start ONOS cli using thread ")
-        startCliResult = main.TRUE
-        pool = []
-        main.threadID = 0
-        for i in range(int(main.numCtrls)):
-            t = main.Thread(target=main.CLIs[i].startOnosCli,
-                            threadID=main.threadID,
-                            name="startOnosCli",
-                            args=[main.ONOSip[i]],
-                            kwargs={"onosStartTimeout": main.timeout})
-            pool.append(t)
-            t.start()
-            main.threadID = main.threadID + 1
-        for t in pool:
-            t.join()
-            startCliResult = startCliResult and t.result
-        time.sleep(main.startUpSleep)
+        try:
+            main.Utils
+        except ( NameError, AttributeError ):
+            main.Utils = Utils()
+        main.maxNumBatch = 0
+        main.testSetUp.getNumCtrls( True )
+        main.testSetUp.envSetup( includeGitPull=False, makeMaxNodes=False )
+        main.testSetUp.ONOSSetUp( main.Mininet1, True,
+                                  cellName=main.cellName, killRemoveMax=False,
+                                  CtrlsSet=False )
 
         main.log.info("Configure apps")
         main.CLIs[0].setCfg("org.onosproject.net.topology.impl.DefaultTopologyProvider",
@@ -234,8 +111,7 @@
                                        main.dependencyPath,
                                        main.Mininet1.user_name,
                                        main.Mininet1.ip_address)
-        main.log.info("Stop Mininet...")
-        main.Mininet1.stopNet()
+        main.Utils.mininetCleanup( main.Mininet1 )
         time.sleep(main.MNSleep)
         main.log.info("Start new mininet topology")
         main.Mininet1.startNet()
