diff --git a/xos/synchronizer/steps/helpers.py b/xos/synchronizer/steps/helpers.py
index 83b9458..9d5f197 100644
--- a/xos/synchronizer/steps/helpers.py
+++ b/xos/synchronizer/steps/helpers.py
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from synchronizers.new_base.modelaccessor import Service
+from xossynchronizer.modelaccessor import Service
 
 class Helpers():
     @staticmethod
@@ -20,4 +20,4 @@
         if 'http' in url:
             return url
         else:
-            return 'http://%s' % url
\ No newline at end of file
+            return 'http://%s' % url
diff --git a/xos/synchronizer/steps/sync_onos_app.py b/xos/synchronizer/steps/sync_onos_app.py
index 82e24e3..d9b0f4c 100644
--- a/xos/synchronizer/steps/sync_onos_app.py
+++ b/xos/synchronizer/steps/sync_onos_app.py
@@ -15,8 +15,9 @@
 import json
 import requests
 from requests.auth import HTTPBasicAuth
-from synchronizers.new_base.syncstep import SyncStep, DeferredException, model_accessor
-from synchronizers.new_base.modelaccessor import ONOSApp, ServiceInstance, ServiceInstanceAttribute
+from xossynchronizer.steps.syncstep import SyncStep, DeferredException
+from xossynchronizer.modelaccessor import model_accessor
+from xossynchronizer.modelaccessor import ONOSApp, ServiceInstance, ServiceInstanceAttribute
 
 from xosconfig import Config
 from multistructlog import create_logger
diff --git a/xos/synchronizer/steps/sync_onos_service.py b/xos/synchronizer/steps/sync_onos_service.py
index 010fc33..8f1550a 100644
--- a/xos/synchronizer/steps/sync_onos_service.py
+++ b/xos/synchronizer/steps/sync_onos_service.py
@@ -16,8 +16,8 @@
 import json
 import requests
 from requests.auth import HTTPBasicAuth
-from synchronizers.new_base.syncstep import SyncStep, model_accessor
-from synchronizers.new_base.modelaccessor import ONOSService, Service, ServiceAttribute
+from xossynchronizer.steps.syncstep import SyncStep
+from xossynchronizer.modelaccessor import ONOSService, Service, ServiceAttribute, model_accessor
 
 from xosconfig import Config
 from multistructlog import create_logger
diff --git a/xos/synchronizer/steps/test_sync_onos_app.py b/xos/synchronizer/steps/test_sync_onos_app.py
index ffde435..fb38a50 100644
--- a/xos/synchronizer/steps/test_sync_onos_app.py
+++ b/xos/synchronizer/steps/test_sync_onos_app.py
@@ -20,27 +20,8 @@
 
 import os, sys
 
-# Hack to load synchronizer framework
 test_path=os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
-xos_dir=os.path.join(test_path, "../../..")
-if not os.path.exists(os.path.join(test_path, "new_base")):
-    xos_dir=os.path.join(test_path, "../../../../../../orchestration/xos/xos")
-    services_dir = os.path.join(xos_dir, "../../xos_services")
-sys.path.append(xos_dir)
-sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
-# END Hack to load synchronizer framework
 
-# generate model from xproto
-def get_models_fn(service_name, xproto_name):
-    name = os.path.join(service_name, "xos", xproto_name)
-    if os.path.exists(os.path.join(services_dir, name)):
-        return name
-    else:
-        name = os.path.join(service_name, "xos", "synchronizer", "models", xproto_name)
-        if os.path.exists(os.path.join(services_dir, name)):
-            return name
-    raise Exception("Unable to find service=%s xproto=%s" % (service_name, xproto_name))
-# END generate model from xproto
 
 def match_none(req):
     return req.text == None
@@ -57,8 +38,6 @@
         global DeferredException
 
         self.sys_path_save = sys.path
-        sys.path.append(xos_dir)
-        sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
 
         # Setting up the config module
         from xosconfig import Config
@@ -67,14 +46,18 @@
         Config.init(config, "synchronizer-config-schema.yaml")
         # END Setting up the config module
 
-        from synchronizers.new_base.mock_modelaccessor_build import build_mock_modelaccessor
-        build_mock_modelaccessor(xos_dir, services_dir, [
-            get_models_fn("onos-service", "onos.xproto")
-        ])
-        import synchronizers.new_base.modelaccessor
+        from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
+        mock_modelaccessor_config(test_path, [("onos-service", "onos.xproto"),])
+
+        import xossynchronizer.modelaccessor
+        import mock_modelaccessor
+        reload(mock_modelaccessor) # in case nose2 loaded it in a previous test
+        reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
 
         from sync_onos_app import SyncONOSApp, DeferredException, model_accessor
 
+        self.model_accessor = model_accessor
+
         # import all class names to globals
         for (k, v) in model_accessor.all_model_classes.items():
             globals()[k] = v
@@ -154,7 +137,7 @@
 
             app_get.return_value = [segment_routing, openflow]
             mock_si.return_value = [self.si]
-            self.sync_step().sync_record(self.onos_app)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_app)
 
         self.assertEqual(e.exception.message, 'Deferring installation of ONOSApp with id 1 as dependencies are not met')
         self.assertFalse(m.called)
@@ -177,7 +160,7 @@
 
         with patch.object(ServiceInstance.objects, "get_items") as mock_si:
             mock_si.return_value = [self.si]
-            self.sync_step().sync_record(self.onos_app)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_app)
 
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 2)
@@ -201,7 +184,7 @@
 
         with patch.object(ServiceInstance.objects, "get_items") as mock_si:
             mock_si.return_value = [self.si]
-            self.sync_step().sync_record(self.onos_app)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_app)
 
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 2)
@@ -220,7 +203,7 @@
 
         with patch.object(ServiceInstance.objects, "get_items") as mock_si:
             mock_si.return_value = [self.si]
-            self.sync_step().sync_record(self.onos_app)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_app)
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 2)
         self.assertEqual(self.onos_app.version, self.vrouter_app_response["version"])
@@ -254,7 +237,7 @@
 
         with patch.object(ServiceInstance.objects, "get_items") as mock_si:
             mock_si.return_value = [self.si]
-            self.sync_step().sync_record(self.onos_app)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_app)
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 3)
         self.assertEqual(self.onos_app.app_id, self.vrouter_app_response["name"])
@@ -292,7 +275,7 @@
 
         with patch.object(ServiceInstance.objects, "get_items") as mock_si:
             mock_si.return_value = [self.si]
-            self.sync_step().sync_record(self.onos_app)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_app)
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 4)
         self.assertEqual(self.onos_app.app_id, self.vrouter_app_response_updated["name"])
@@ -327,7 +310,7 @@
         with patch.object(ServiceInstance.objects, "get_items") as mock_si, \
             self.assertRaises(Exception) as e:
             mock_si.return_value = [self.si]
-            self.sync_step().sync_record(self.onos_app)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_app)
 
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 3)
@@ -347,7 +330,7 @@
         m.post("/onos/v1/applications",
                status_code=409)
 
-        step = self.sync_step()
+        step = self.sync_step(model_accessor=self.model_accessor)
         with patch.object(step, "check_app_installed") as mock_check_installed:
             mock_check_installed.return_value = False
 
@@ -361,7 +344,7 @@
         m.delete("http://onos-url:8181%s" % self.onos_app_attribute.name,
                status_code=204)
 
-        self.sync_step().delete_record(self.onos_app_attribute)
+        self.sync_step(model_accessor=self.model_accessor).delete_record(self.onos_app_attribute)
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 1)
 
@@ -370,7 +353,7 @@
         m.delete("http://onos-url:8181/onos/v1/applications/org.onosproject.vrouter/active",
                status_code=204)
 
-        self.sync_step().delete_record(self.onos_app)
+        self.sync_step(model_accessor=self.model_accessor).delete_record(self.onos_app)
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 1)
 
@@ -383,9 +366,10 @@
         m.delete("http://onos-url:8181/onos/v1/applications/org.onosproject.vrouter",
                  status_code=204)
 
-        self.sync_step().delete_record(self.onos_app)
+        self.sync_step(model_accessor=self.model_accessor).delete_record(self.onos_app)
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 1)
 
-
+if __name__ == '__main__':
+    unittest.main()
 
diff --git a/xos/synchronizer/steps/test_sync_onos_service.py b/xos/synchronizer/steps/test_sync_onos_service.py
index 314a0c1..ee6daaf 100644
--- a/xos/synchronizer/steps/test_sync_onos_service.py
+++ b/xos/synchronizer/steps/test_sync_onos_service.py
@@ -20,27 +20,8 @@
 
 import os, sys
 
-# Hack to load synchronizer framework
 test_path=os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
-xos_dir=os.path.join(test_path, "../../..")
-if not os.path.exists(os.path.join(test_path, "new_base")):
-    xos_dir=os.path.join(test_path, "../../../../../../orchestration/xos/xos")
-    services_dir = os.path.join(xos_dir, "../../xos_services")
-sys.path.append(xos_dir)
-sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
-# END Hack to load synchronizer framework
 
-# generate model from xproto
-def get_models_fn(service_name, xproto_name):
-    name = os.path.join(service_name, "xos", xproto_name)
-    if os.path.exists(os.path.join(services_dir, name)):
-        return name
-    else:
-        name = os.path.join(service_name, "xos", "synchronizer", "models", xproto_name)
-        if os.path.exists(os.path.join(services_dir, name)):
-            return name
-    raise Exception("Unable to find service=%s xproto=%s" % (service_name, xproto_name))
-# END generate model from xproto
 
 def match_json(desired, req):
     if desired!=req.json():
@@ -53,8 +34,6 @@
     def setUp(self):
 
         self.sys_path_save = sys.path
-        sys.path.append(xos_dir)
-        sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
 
         # Setting up the config module
         from xosconfig import Config
@@ -63,14 +42,18 @@
         Config.init(config, "synchronizer-config-schema.yaml")
         # END Setting up the config module
 
-        from synchronizers.new_base.mock_modelaccessor_build import build_mock_modelaccessor
-        build_mock_modelaccessor(xos_dir, services_dir, [
-            get_models_fn("onos-service", "onos.xproto")
-        ])
-        import synchronizers.new_base.modelaccessor
+        from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
+        mock_modelaccessor_config(test_path, [("onos-service", "onos.xproto"),])
+
+        import xossynchronizer.modelaccessor
+        import mock_modelaccessor
+        reload(mock_modelaccessor) # in case nose2 loaded it in a previous test
+        reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
 
         from sync_onos_service import SyncONOSService, model_accessor
 
+        self.model_accessor = model_accessor
+
         # import all class names to globals
         for (k, v) in model_accessor.all_model_classes.items():
             globals()[k] = v
@@ -122,7 +105,7 @@
     def test_sync_no_service_attributes(self, m):
         with patch.object(Service.objects, "get_items") as service_mock:
             service_mock.return_value = [self.service]
-            self.sync_step().sync_record(self.onos)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos)
         self.assertFalse(m.called)
 
     @requests_mock.Mocker()
@@ -144,7 +127,7 @@
 
         with patch.object(Service.objects, "get_items") as service_mock:
             service_mock.return_value = [self.service]
-            self.sync_step().sync_record(self.onos)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos)
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 2)
 
@@ -160,7 +143,7 @@
 
         with patch.object(Service.objects, "get_items") as service_mock:
             service_mock.return_value = [self.service]
-            self.sync_step().sync_record(self.onos_service_attribute)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos_service_attribute)
 
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 1)
@@ -182,7 +165,7 @@
             patch.object(Service.objects, "get_items") as service_mock:
 
             service_mock.return_value = [self.service]
-            self.sync_step().sync_record(self.onos)
+            self.sync_step(model_accessor=self.model_accessor).sync_record(self.onos)
 
         self.assertTrue(m.called)
         self.assertEqual(m.call_count, 1)
@@ -193,6 +176,9 @@
         m.delete("http://onos-url:8181%s" % self.onos_service_attribute.name,
                  status_code=204)
 
-        self.sync_step().delete_record(self.onos_service_attribute)
+        self.sync_step(model_accessor=self.model_accessor).delete_record(self.onos_service_attribute)
         self.assertTrue(m.called)
-        self.assertEqual(m.call_count, 1)
\ No newline at end of file
+        self.assertEqual(m.call_count, 1)
+
+if __name__ == '__main__':
+    unittest.main()
