diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index 66cd3da..325f831 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -2,7 +2,6 @@
 FROM xosproject/xos-client:candidate
 
 COPY xos/synchronizers/new_base /opt/xos/synchronizers/new_base
-COPY xos/xos/config.py /opt/xos/xos/config.py
 COPY xos/xos/logger.py /opt/xos/xos/logger.py
 COPY xos/xos/xml_util.py /opt/xos/xos/xml_util.py
 COPY xos/xos/__init__.py /opt/xos/xos/__init__.py
diff --git a/lib/xos-config/tests/config_test.py b/lib/xos-config/tests/config_test.py
index b98b817..36869b3 100644
--- a/lib/xos-config/tests/config_test.py
+++ b/lib/xos-config/tests/config_test.py
@@ -133,7 +133,15 @@
             "file":  "/var/log/xos.log",
         })
 
-    def _test_get_missing_param(self):
+    def test_get_config_file(self):
+        """
+        [XOS-Config] Should return the config file in use
+        """
+        Config.init(sample_conf)
+        res = Config.get_config_file()
+        self.assertEqual(res, sample_conf)
+
+    def test_get_missing_param(self):
         """
         [XOS-Config] Should raise reading a missing param
         """
diff --git a/lib/xos-config/xosconfig/config.py b/lib/xos-config/xosconfig/config.py
index 3e0482d..db3b5c1 100644
--- a/lib/xos-config/xosconfig/config.py
+++ b/lib/xos-config/xosconfig/config.py
@@ -8,6 +8,7 @@
 DEFAULT_CONFIG_FILE = "/opt/xos/xos_config.yaml"
 DEFAULT_CONFIG_SCHEMA = 'xos-config-schema.yaml'
 INITIALIZED = False
+CONFIG_FILE = None
 CONFIG = {}
 
 class Config:
@@ -24,6 +25,7 @@
 
         global INITIALIZED
         global CONFIG
+        global CONFIG_FILE
         # the config module can be initialized only one
         if INITIALIZED:
             raise Exception('[XOS-Config] Module already initialized')
@@ -44,9 +46,15 @@
         if Config.get_cli_param(sys.argv):
             config_schema = Config.get_cli_param(sys.argv)
 
+
+        CONFIG_FILE = config_file
         CONFIG = Config.read_config(config_file, config_schema)
 
     @staticmethod
+    def get_config_file():
+        return CONFIG_FILE
+
+    @staticmethod
     def clear():
         global INITIALIZED
         INITIALIZED = False
diff --git a/xos/core/dashboard/views/home.py b/xos/core/dashboard/views/home.py
index f72be81..041ca4a 100644
--- a/xos/core/dashboard/views/home.py
+++ b/xos/core/dashboard/views/home.py
@@ -48,8 +48,10 @@
             return self.singleDashboardView(request, name, context)
 
     def readTemplate(self, fn):
-        TEMPLATE_DIRS = [XOS_DIR + "/templates/admin/dashboard/",
-                         XOS_DIR + "/core/xoslib/dashboards/"]
+        dashboards_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../')
+        xoslib_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../xoslib/dashboards/')
+        TEMPLATE_DIRS = [dashboards_dir,
+                         xoslib_dir]
 
         for template_dir in TEMPLATE_DIRS:
             pathname = os.path.join(template_dir, fn) + ".html"
diff --git a/xos/core/dashboard/views/view_common.py b/xos/core/dashboard/views/view_common.py
index 478f4d3..e1cb18b 100644
--- a/xos/core/dashboard/views/view_common.py
+++ b/xos/core/dashboard/views/view_common.py
@@ -17,7 +17,6 @@
 from operator import itemgetter, attrgetter
 import traceback
 import math
-from xos.config import Config, XOS_DIR
 
 def getDashboardContext(user, context={}, tableFormat = False):
         context = {}
diff --git a/xos/core/views/serviceGraph.py b/xos/core/views/serviceGraph.py
deleted file mode 100644
index c6cdf56..0000000
--- a/xos/core/views/serviceGraph.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from django.http import HttpResponse
-from django.views.generic import TemplateView, View
-from django import template
-from core.models import *
-from core.dashboard.views import DashboardDynamicView
-from xos.config import XOS_DIR
-import json
-import os
-import time
-import tempfile
-
-
-class ServiceGridView(TemplateView):
-
-    head_template = r"""{% extends "admin/dashboard/dashboard_base.html" %}
-       {% load admin_static %}
-       {% block content %}
-    """
-
-    tail_template = r"{% endblock %}"
-
-    def readTemplate(self, fn):
-        TEMPLATE_DIRS = [XOS_DIR + "/templates/admin/dashboard/",
-                         XOS_DIR + "/core/xoslib/dashboards/"]
-
-        for template_dir in TEMPLATE_DIRS:
-            pathname = os.path.join(template_dir, fn) + ".html"
-            if os.path.exists(pathname):
-                break
-        else:
-            return "failed to find %s in %s" % (fn, TEMPLATE_DIRS)
-
-        template = open(pathname, "r").read()
-        return template
-
-    def get(self, request, name="root", *args, **kwargs):
-
-        dash = DashboardView.objects.get(name="Services Grid")
-
-        gridTemplate = self.readTemplate(dash.url[9:])
-
-        t = template.Template(self.head_template + gridTemplate + self.tail_template)
-
-        response_kwargs = {}
-        response_kwargs.setdefault('content_type', self.content_type)
-
-        return self.response_class(
-            request=request,
-            template=t,
-            **response_kwargs)
diff --git a/xos/manage.py b/xos/manage.py
index 48695f0..028eb4f 100644
--- a/xos/manage.py
+++ b/xos/manage.py
@@ -12,14 +12,4 @@
         os.system("/opt/xos/tools/xos-manage makemigrations")
         sys.argv.remove("--makemigrations")
 
-#    if "--nomodelpolicy" in sys.argv:
-#        import synchronizers.model_policy as model_policy
-#        model_policy.EnableModelPolicy(False)
-#        sys.argv.remove("--nomodelpolicy")
-
-    if "--noobserver" in sys.argv:
-        import synchronizers.base as observer
-        observer.EnableObserver(False)
-        sys.argv.remove("--noobserver")
-
     execute_from_command_line(sys.argv)
diff --git a/xos/synchronizers/new_base/ansible_helper.py b/xos/synchronizers/new_base/ansible_helper.py
index 2eca993..454b882 100644
--- a/xos/synchronizers/new_base/ansible_helper.py
+++ b/xos/synchronizers/new_base/ansible_helper.py
@@ -15,6 +15,7 @@
 from xosconfig import Config
 from xos.logger import observer_logger as logger
 from multiprocessing import Process, Queue
+from xosconfig import Config
 
 
 step_dir = Config.get("steps_dir")
@@ -54,7 +55,8 @@
     args = {"ansible_hosts": ansible_hosts,
             "ansible_config": ansible_config,
             "fqp": fqp,
-            "opts": opts}
+            "opts": opts,
+            "config_file": Config.get_config_file()}
 
     keep_temp_files = Config.get("keep_temp_files")
 
diff --git a/xos/synchronizers/new_base/ansible_main.py b/xos/synchronizers/new_base/ansible_main.py
index 2df23b9..00def66 100644
--- a/xos/synchronizers/new_base/ansible_main.py
+++ b/xos/synchronizers/new_base/ansible_main.py
@@ -3,6 +3,7 @@
 import sys
 #import json
 import traceback
+from xosconfig import Config
 
 sys.path.append("/opt/xos")
 
@@ -44,6 +45,9 @@
     result_fn = sys.argv[2]
 
     args = pickle.loads(open(input_fn).read())
+
+    Config.init(args['config_file'], 'synchronizer-config-schema.yaml')
+
     ansible_hosts = args["ansible_hosts"]
     ansible_config = args["ansible_config"]
     fqp = args["fqp"]
diff --git a/xos/synchronizers/new_base/xos-policy.py b/xos/synchronizers/new_base/xos-policy.py
index d2630ec..3ed8668 100644
--- a/xos/synchronizers/new_base/xos-policy.py
+++ b/xos/synchronizers/new_base/xos-policy.py
@@ -9,60 +9,20 @@
 """
 
 import os
-import argparse
 import sys
 
 sys.path.append('/opt/xos')
 
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
-from xos.config import Config, DEFAULT_CONFIG_FN
+from xosconfig import Config
 from xos.logger import Logger, logging, logger
 import time
 from synchronizers.new_base.model_policy_loop import XOSPolicyEngine
 from synchronizers.new_base.modelaccessor import *
 
-config = Config()
-
 logger = Logger(level=logging.INFO)
 
-# after http://www.erlenstar.demon.co.uk/unix/faq_2.html
-def daemon():
-    """Daemonize the current process."""
-    if os.fork() != 0: os._exit(0)
-    os.setsid()
-    if os.fork() != 0: os._exit(0)
-    os.umask(0)
-    devnull = os.open(os.devnull, os.O_RDWR)
-    os.dup2(devnull, 0)
-    # xxx fixme - this is just to make sure that nothing gets stupidly lost - should use devnull
-    logdir=os.path.dirname(config.observer_logfile)
-    # when installed in standalone we might not have httpd installed
-    if not os.path.isdir(logdir): os.mkdir(logdir)
-    crashlog = os.open('%s'%config.observer_logfile, os.O_RDWR | os.O_APPEND | os.O_CREAT, 0644)
-    os.dup2(crashlog, 1)
-    os.dup2(crashlog, 2)
-
-    if hasattr(config, "observer_pidfile"):
-        pidfile = config.get("observer_pidfile")
-    else:
-        pidfile = "/var/run/xosobserver.pid"
-    try:
-        file(pidfile,"w").write(str(os.getpid()))
-    except:
-        print "failed to create pidfile %s" % pidfile
-
 def main():
-    # Generate command line parser
-    parser = argparse.ArgumentParser(usage='%(prog)s [options]')
-    parser.add_argument('-d', '--daemon', dest='daemon', action='store_true', default=False,
-                        help='Run as daemon.')
-    # smbaker: util/config.py parses sys.argv[] directly to get config file name; include the option here to avoid
-    #   throwing unrecognized argument exceptions
-    parser.add_argument('-C', '--config', dest='config_file', action='store', default=DEFAULT_CONFIG_FN,
-                        help='Name of config file.')
-    args = parser.parse_args()
-
-    if args.daemon: daemon()
 
     models_active = False
     wait = False
@@ -81,7 +41,7 @@
         time.sleep(60) # Safety factor, seeing that we stumbled waiting for the data model to come up.
 
     # start model policies thread
-    policies_dir = Config().observer_model_policies_dir
+    policies_dir = Config.get("model_policies_dir")
 
     XOSPolicyEngine(policies_dir=policies_dir).run()
 
diff --git a/xos/synchronizers/new_base/xos-synchronizer.py b/xos/synchronizers/new_base/xos-synchronizer.py
index 0bb45fa..b48fcdf 100644
--- a/xos/synchronizers/new_base/xos-synchronizer.py
+++ b/xos/synchronizers/new_base/xos-synchronizer.py
@@ -36,5 +36,4 @@
     backend.run()
 
 if __name__ == '__main__':
-
     main()
diff --git a/xos/tools/apigen/synchronizer.template.txt b/xos/tools/apigen/synchronizer.template.txt
deleted file mode 100644
index 67f3ca1..0000000
--- a/xos/tools/apigen/synchronizer.template.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-{% for app,files in generator.apps.items() %}
-{% for file,models in files.items() %}
-{% for m in models %}
-# This file implements the synchronization of the {{ m.class_name }} model
-# TODO (see below):
-
-import os
-import base64
-import socket
-from django.db.models import F, Q
-from xos.config import Config
-from synchronizers.base.syncstep import SyncStep
-from {{app}}.models.{{ file }} import {{ m.class_name.title }}
-from synchronizers.base.ansible import *
-from synchronizers.base.syncstep import *
-from xos.logger import observer_logger as logger
-
-class Sync{{m.camel.title}}(SyncStep):
-    # The model synchronized
-    provides=[{{m.class_name.title()}}]
-    # How often do you want this to run. 0 means immediately following changes to the model
-    requested_interval=0
-    # The model in which changes trigger this module
-    observes={{m.class_name}}
-    # The Ansible recipe that does the bulk of the synchronization (hopefully)
-    playbook='sync_{{m.class_name}}.yaml'
-
-    # 1. Populate a data structure to pass into your ansible recipe, based on the data model. 
-    def map_sync_inputs(self, {{ m.class_name }}): 
-        fields = {
-            {% for f in m.fields %}'{{f.name}}': {{f.name}},
-            {% endfor %}
-        }
-        return fields
-        
-    # 2. Store the result of the operation in the model
-    def map_sync_outputs(self, {{ m.class_name }}, res):
-        // Store the output of res in the {{m.class_name}} object 
-        return
-    
-    # 3. Populate the data structure that identifies objects to delete
-    def map_delete_inputs(self, {{ m.class_name }}, res):
-        fields = {
-            {% for f in m.fields %}'{{f.name}}': {{f.name}},
-            {% endfor %}
-               'delete':True
-        }
-        return fields
-
-
-+++ Sync{{ m.class_name }}.py
----
-- hosts: 127.0.0.1
-  connection: local
-  tasks:
-  - task_1:
-      {% for f in m.fields %}
-      {{f.name}}: {{ '{{' }}{{f.name}}{{ '}}' }}
-      {% endfor %}
-      {{ '{%' }} if delete {{ '%}' }}
-      state: absent
-      {{ '{%' }} else {{ '%}' }}
-      state: present
-      {{ '{%' }} endif {{ '%}' }}
-      {{ '{%' }} endif {{ '%}' }}
-+++ Sync{{ m.class_name }}.yaml
-{% endfor %}
-{% endfor %}
-{% endfor %}
diff --git a/xos/tosca/tests/observertest.py b/xos/tosca/tests/observertest.py
deleted file mode 100644
index 4c8d5df..0000000
--- a/xos/tosca/tests/observertest.py
+++ /dev/null
@@ -1,97 +0,0 @@
-from basetest import *
-
-import logging
-import StringIO
-import subprocess
-import sys
-
-from synchronizers.base.event_loop import XOSObserver
-from synchronizers.model_policy import run_policy_once
-from xos.config import set_override
-from xos.logger import Logger, observer_logger
-
-class BaseObserverToscaTest(BaseToscaTest):
-    hide_observer_output = True
-
-    def __init__(self):
-        super(BaseObserverToscaTest, self).__init__()
-
-    def get_usable_deployment(self):
-        return "MyDeployment"
-
-    def get_usable_controller(self):
-        return "CloudLab"
-
-    def ensure_observer_not_running(self):
-        ps_output = subprocess.Popen("ps -elfy", shell=True, stdout=subprocess.PIPE).stdout.read()
-        if "/opt/xos/xos-observer.py" in ps_output:
-            print >> sys.stderr, "an observer is still running"
-            print >> sys.stderr, "please stop it, for example 'supervisorctl stop observer'"
-            sys.exit(-1)
-
-    def log_to_memory(self):
-        logStream = StringIO.StringIO()
-        handler = logging.StreamHandler(stream=logStream)
-        handler.setLevel(logging.DEBUG)
-        handler.setFormatter(logging.Formatter("%(asctime)s - %(levelname)s - %(message)s"))
-
-        loggername = Logger().loggername
-        log = logging.getLogger(loggername)
-        for hdlr in log.handlers[:]:
-            log.removeHandler(hdlr)
-        log.addHandler(handler)
-        log.propagate = False
-
-        log = observer_logger.logger
-        for hdlr in log.handlers[:]:
-            log.removeHandler(hdlr)
-        log.addHandler(handler)
-        log.propagate = False
-
-        self.logStream = logStream
-
-    def hide_output(self):
-        set_override("observer_console_print", False)
-        self.log_to_memory()
-        sys.stdout = self.logStream
-        sys.stderr = self.logStream
-
-    def restore_output(self):
-        sys.stdout = sys.__stdout__
-        sys.stderr = sys.__stderr__
-
-        if not self.hide_observer_output:
-            print self.logStream.getvalue()
-
-    def save_output(self, what, fn):
-        file(fn,"w").write(self.logStream.getvalue())
-        print >> sys.__stdout__,"   (%s log saved to %s)" % (what, fn)
-
-    def run_model_policy(self, save_output=None):
-        self.ensure_observer_not_running()
-
-        self.hide_output()
-        try:
-            print ">>>>> run model_policies"
-            run_policy_once()
-            print ">>>>> done model_policies"
-            if save_output:
-                self.save_output("model_policy",save_output)
-        finally:
-            self.restore_output()
-
-    def run_observer(self, save_output=None):
-        self.ensure_observer_not_running()
-        self.log_to_memory()
-
-        self.hide_output()
-        try:
-            print ">>>>> run observer"
-            observer = XOSObserver()
-            observer.run_once()
-            print ">>>>> done observer"
-            if save_output:
-                self.save_output("observer",save_output)
-        finally:
-            self.restore_output()
-
diff --git a/xos/xos/config.py b/xos/xos/config.py
deleted file mode 100644
index 154ba20..0000000
--- a/xos/xos/config.py
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env python
-import sys
-import os
-import time
-import ConfigParser
-import tempfile
-import codecs
-from StringIO import StringIO
-from xml_util import Xml
-
-default_config = \
-"""
-"""
-
-XOS_DIR = "/opt/xos"
-DEFAULT_CONFIG_FN = os.path.join(XOS_DIR, "xos_configuration/")
-
-# warning for now, remove once we're sure everyone has made the change
-if (os.path.exists("/opt/planetstack/plstackapi_config") and (not os.path.exists(DEFAULT_CONFIG_FN))):
-    print >> sys.stderr, "WARNING: did you forget to rename plstackapi_config to xos_config ??"
-
-def isbool(v):
-	return v.lower() in ("true", "false")
-
-def str2bool(v):
-	return v.lower() in ("true", "1")
-
-# allow the test framework to apply global overrides to the config framework
-override = {}
-def set_override(name, value):
-    override[name] = value
-
-class Config:
-
-	def __init__(self, config_file=None):
-                if (config_file==None):
-                    config_file = self.get_config_fn()
-
-		self._files = []
-		self.config_path = os.path.dirname(config_file)
-		self.config = ConfigParser.ConfigParser()
-		self.filename = config_file
-		if not os.path.isfile(self.filename) and not os.path.isdir(self.filename):
-			self.create(self.filename)
-		self.load(self.filename)
-
-        def get_config_fn(self):
-             # Look for "-C <something>" to get the
-             # name of the config file. Using a real OptionParser here is
-             # problematic as it will throw 'no such option' errors for options
-             # that it does not understand.
-
-             last = None
-             for arg in sys.argv:
-                 if (last=="-C"):
-                     return arg
-                 last = arg
-
-             return DEFAULT_CONFIG_FN
-
-	def _header(self):
-		header = """
-DO NOT EDIT. This file was automatically generated at
-%s from:
-
-%s
-""" % (time.asctime(), os.linesep.join(self._files))
-
-		# Get rid of the surrounding newlines
-		return header.strip().split(os.linesep)
-
-	def create(self, filename):
-		if not os.path.exists(os.path.dirname(filename)):
-			os.makedirs(os.path.dirname(filename))
-		configfile = open(filename, 'w')
-		configfile.write(default_config)
-		configfile.close()
-
-
-	def load(self, filename):
-		if filename:
-			try:
-				if os.path.isdir(filename):
-					config_list = list(sorted(os.listdir(filename)))
-                                        config_list = [x for x in config_list if not x.endswith(".md")]
-                                        if "xos_common_config" in config_list:
-                                            # move xos_common_config to the front of the list
-                                            config_list.remove("xos_common_config")
-                                            config_list=["xos_common_config"] + config_list
-					config_list = [os.path.join(filename, s) for s in config_list]
-					self.config.read(config_list)
-				else:
-					self.config.read(filename)
-			except ConfigParser.MissingSectionHeaderError:
-				if filename.endswith('.xml'):
-					self.load_xml(filename)
-				else:
-					self.load_shell(filename)
-			self._files.append(filename)
-			self.set_attributes()
-
-	def load_xml(self, filename):
-		xml = XML(filename)
-		categories = xml.xpath('//configuration/variables/category')
-		for category in categories:
-			section_name = category.get('id')
-			if not self.config.has_section(section_name):
-				self.config.add_section(section_name)
-			options = category.xpath('./variablelist/variable')
-			for option in options:
-				option_name = option.get('id')
-				value = option.xpath('./value')[0].text
-				if not value:
-					value = ""
-				self.config.set(section_name, option_name, value)
-
-	def load_shell(self, filename):
-		f = open(filename, 'r')
-		for line in f:
-			try:
-				if line.startswith('#'):
-					continue
-				parts = line.strip().split("=")
-				if len(parts) < 2:
-					continue
-				option = parts[0]
-				value = parts[1].replace('"', '').replace("'","")
-				section, var = self.locate_varname(option, strict=False)
-				if section and var:
-					self.set(section, var, value)
-			except:
-				pass
-		f.close()
-
-	def locate_varname(self, varname, strict=True):
-		varname = varname.lower()
-		sections = self.config.sections()
-		section_name = ""
-		var_name = ""
-		for section in sections:
-			if varname.startswith(section.lower()) and len(section) > len(section_name):
-				section_name = section.lower()
-				var_name = varname.replace(section_name, "")[1:]
-		if strict and not self.config.has_option(section_name, var_name):
-			raise ConfigParser.NoOptionError(var_name, section_name)
-		return (section_name, var_name)
-
-	def set_attributes(self):
-		sections = self.config.sections()
-		for section in sections:
-			for item in self.config.items(section):
-				name = "%s_%s" % (section, item[0])
-				value = item[1]
-				if isbool(value):
-					value = str2bool(value)
-				elif value.isdigit():
-					value = int(value)
-				setattr(self, name, value)
-				setattr(self, name.upper(), value)
-
-
-	def verify(self, config1, config2, validate_method):
-		return True
-
-	def validate_type(self, var_type, value):
-		return True
-
-	@staticmethod
-	def is_xml(config_file):
-		try:
-			x = Xml(config_file)
-			return True
-		except:
-			return False
-
-	@staticmethod
-	def is_ini(config_file):
-		try:
-			c = ConfigParser.ConfigParser()
-			c.read(config_file)
-			return True
-		except ConfigParser.MissingSectionHeaderError:
-			return False
-
-
-	def dump(self, sections = []):
-		sys.stdout.write(output_python())
-
-	def output_python(self, encoding = "utf-8"):
-		buf = codecs.lookup(encoding)[3](StringIO())
-		buf.writelines(["# " + line + os.linesep for line in self._header()])
-
-		for section in self.sections():
-			buf.write("[%s]%s" % (section, os.linesep))
-			for (name,value) in self.items(section):
-				buf.write("%s=%s%s" % (name,value,os.linesep))
-			buf.write(os.linesep)
-		return buf.getvalue()
-
-	def output_shell(self, show_comments = True, encoding = "utf-8"):
-		"""
-		Return variables as a shell script.
-		"""
-
-		buf = codecs.lookup(encoding)[3](StringIO())
-		buf.writelines(["# " + line + os.linesep for line in self._header()])
-
-		for section in self.sections():
-			for (name,value) in self.items(section):
-				# bash does not have the concept of NULL
-				if value:
-					option = "%s_%s" % (section.upper(), name.upper())
-					if isbool(value):
-						value = str(str2bool(value))
-					elif not value.isdigit():
-						value = '"%s"' % value
-					buf.write(option + "=" + value + os.linesep)
-		return buf.getvalue()
-
-	def output_php(self, encoding = "utf-8"):
-		"""
-		Return variables as a PHP script.
-		"""
-
-		buf = codecs.lookup(encoding)[3](StringIO())
-		buf.write("<?php" + os.linesep)
-		buf.writelines(["// " + line + os.linesep for line in self._header()])
-
-		for section in self.sections():
-			for (name,value) in self.items(section):
-				option = "%s_%s" % (section, name)
-				buf.write(os.linesep)
-				buf.write("// " + option + os.linesep)
-				if value is None:
-					value = 'NULL'
-				buf.write("define('%s', %s);" % (option, value) + os.linesep)
-
-		buf.write("?>" + os.linesep)
-
-		return buf.getvalue()
-
-	def output_xml(self, encoding = "utf-8"):
-		pass
-
-	def output_variables(self, encoding="utf-8"):
-		"""
-		Return list of all variable names.
-		"""
-
-		buf = codecs.lookup(encoding)[3](StringIO())
-		for section in self.sections():
-			for (name,value) in self.items(section):
-				option = "%s_%s" % (section,name)
-				buf.write(option + os.linesep)
-
-		return buf.getvalue()
-		pass
-
-	def write(self, filename=None):
-		if not filename:
-			filename = self.filename
-		configfile = open(filename, 'w')
-		self.config.write(configfile)
-
-	def save(self, filename=None):
-		self.write(filename)
-
-	def __getattr__(self, attr):
-                if attr in override:
-                    return override[attr]
-		return getattr(self.config, attr)
-
-if __name__ == '__main__':
-	filename = None
-	if len(sys.argv) > 1:
-		filename = sys.argv[1]
-		config = Config(filename)
-	else:
-		config = Config()
-	config.dump()
diff --git a/xos/xos/logger.py b/xos/xos/logger.py
index 95da9ad..f891d52 100644
--- a/xos/xos/logger.py
+++ b/xos/xos/logger.py
@@ -30,8 +30,7 @@
 import logging
 import logging.handlers
 import logstash
-# from xosconfig import Config
-from xos.config import Config
+from xosconfig import Config
 
 CRITICAL = logging.CRITICAL
 ERROR = logging.ERROR
@@ -48,7 +47,7 @@
 
         # Logstash config
         try:
-            logstash_host, logstash_port = 'cordloghost:5617'.split(':') #Config.get("logging.logstash_hostport").split(':')
+            logstash_host, logstash_port = Config.get("logging.logstash_hostport").split(':')
             logstash_handler = logstash.LogstashHandler(
                 logstash_host, int(logstash_port), version=1)
             # always log at DEBUG level to logstash
@@ -59,10 +58,10 @@
 
         # default is to locate loggername from the logfile if avail.
         if not logfile:
-            logfile = '/var/log/xos.log' #Config.get("logging.file")
+            logfile = Config.get("logging.file")
 
         # allow config-file override of console/logfile level
-        level_str = 'info' #Config.get("logging.level")
+        level_str = Config.get("logging.level")
         if level_str:
             level_str = level_str.lower()
 
@@ -150,7 +149,7 @@
 
     def extract_context(self, cur):
         try:
-            observer_name = Config().observer_name #Config.get("name")
+            observer_name = Config.get("name")
             cur['synchronizer_name'] = observer_name
         except:
             pass
diff --git a/xos/xos/urls.py b/xos/xos/urls.py
index 2284c63..6f5b524 100644
--- a/xos/xos/urls.py
+++ b/xos/xos/urls.py
@@ -7,8 +7,6 @@
 # This is the generated API
 from xosapi import *
 
-from core.views.serviceGraph import ServiceGridView
-
 # from services.vbbu.view import *
 from core.views.mcordview import *
 # from core.views.analytics import AnalyticsAjaxView
@@ -47,10 +45,6 @@
 urlpatterns = patterns(
     '',
 
-    url(r'^mcord', MCordView.as_view(), name='mcord'),
-
-    url(r'^serviceGrid', ServiceGridView.as_view(), name='serviceGrid'),
-
     # url(r'^docs/', include('rest_framework_swagger.urls')),
 
     # Uncomment the admin/doc line below to enable admin documentation:
