diff --git a/planetstack/importer/plclassic/__init__.py b/planetstack/importer/plclassic/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/planetstack/importer/plclassic/__init__.py
diff --git a/planetstack/importer/plclassic/importer.py b/planetstack/importer/plclassic/importer.py
new file mode 100644
index 0000000..3a65dc3
--- /dev/null
+++ b/planetstack/importer/plclassic/importer.py
@@ -0,0 +1,70 @@
+import os
+#os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings")
+import sys
+from optparse import OptionParser
+from getpass import getpass
+import xmlrpclib
+from plclassic.site_importer import SiteImporter
+from plclassic.user_importer import UserImporter
+from plclassic.slice_importer import SliceImporter
+from plclassic.sliver_importer import SliverImporter
+
+
+class Call:
+    def __init__(self, callable, auth):
+        self.callable = callable
+        self.auth = auth
+
+    def __call__(self, *args, **kwds):
+        a = [self.auth] + list(args)
+        return self.callable(*a)
+
+class API():
+    def __init__(self, username, password, url):
+        self.auth = {'AuthMethod': 'password',
+                     'Username': username,
+                     'AuthString': password}
+        self.server = xmlrpclib.ServerProxy(url, allow_none=True)
+
+    def __getattr__(self, name):         
+        return Call(getattr(self.server, name), self.auth) 
+
+class Importer: 
+
+    def __init__(self, username, password, url):
+        api = API(username, password, url)
+        self.sites = SiteImporter(api)
+        self.slices = SliceImporter(api)
+        self.users = UserImporter(api)
+        self.slivers = SliverImporter(api)
+
+    def run(self):
+        self.sites.run()
+        self.users.run()
+        self.slices.run(remote_sites=self.sites.remote_sites, 
+                        local_sites=self.sites.local_sites)
+        self.slivers.run()           
+
+
+
+if __name__ == '__main__':
+    parser = OptionParser()
+        
+    parser.add_option("-u", "--username", dest="username",
+                        help="PLC username with which to authenticate")
+    parser.add_option("", "--url", dest="url",
+                        help="PLC url to contact")
+
+    (config, args) = parser.parse_args()
+    if len(sys.argv) == 1:
+        parser.print_help()
+        sys.exit(1)
+
+    password = None
+    try:
+        password = getpass()
+    except (EOFError, KeyboardInterrupt):
+        print
+        sys.exit(0)
+
+    Importer(config.username, password, config.url).run()
diff --git a/planetstack/importer/plclassic/role_importer.py b/planetstack/importer/plclassic/role_importer.py
new file mode 100644
index 0000000..107587a
--- /dev/null
+++ b/planetstack/importer/plclassic/role_importer.py
@@ -0,0 +1,9 @@
+class RoleImporter:
+
+    def __init__(self, api):
+        self.api = api
+
+    def run(self):
+
+         return 
+
diff --git a/planetstack/importer/plclassic/site_importer.py b/planetstack/importer/plclassic/site_importer.py
new file mode 100644
index 0000000..2ee8157
--- /dev/null
+++ b/planetstack/importer/plclassic/site_importer.py
@@ -0,0 +1,33 @@
+from core.models import Site
+
+class SiteImporter:
+
+    def __init__(self, api):
+        self.api = api
+        self.remote_sites = {}
+        self.local_sites = {}
+
+    def run(self):
+        db_sites = Site.objects.all()
+        for db_site in db_sites:
+            self.local_sites[db_site.login_base] = db_site
+        print "%s local sites" % len(db_sites)
+
+        sites = self.api.GetSites({'peer_id': None})
+        print "%s remote sites" % len(sites)
+        count = 0
+        for site in sites:
+            self.remote_sites[site['site_id']] = site 
+            if site['login_base'] not in self.local_sites:
+                new_site = Site(name=site['name'],
+                                login_base=site['login_base'],
+                                site_url=site['url'],
+                                enabled=site['enabled'],
+                                longitude=site['longitude'],
+                                latitude=site['latitude'],
+                                is_public=site['is_public'],
+                                abbreviated_name=site['abbreviated_name'])
+                new_site.save()
+                count += 1
+                self.local_sites[new_site.login_base] = new_site
+        print "imported %s sites" % count
diff --git a/planetstack/importer/plclassic/slice_importer.py b/planetstack/importer/plclassic/slice_importer.py
new file mode 100644
index 0000000..b25b483
--- /dev/null
+++ b/planetstack/importer/plclassic/slice_importer.py
@@ -0,0 +1,47 @@
+from core.models import Slice
+
+class SliceImporter:
+
+    def __init__(self, api):
+        self.api = api
+        self.remote_slices = {}
+        self.local_slices = {}
+
+    def run(self, remote_sites={}, local_sites={}):
+        if not remote_sites:
+            sites = self.api.GetSites({'peer_id': None})
+            for site in sites:
+                remote_sites[site['site_id']] = site
+        
+
+        if not local_sites:
+            from core.models import Site
+            sites = Site.objects.all()
+            for site in sites:
+                local_sites[site.login_base] = site            
+
+        db_slices = Slice.objects.all()
+        for db_slice in db_slices:
+            self.local_slices[db_slice.name] = db_slice
+        print "%s local slices" % len(db_slices)
+
+        slices = self.api.GetSlices({'peer_id': None})
+        print "%s remote slices" % len(slices)
+        count = 0 
+        for slice in slices:
+            self.remote_slices[slice['slice_id']] = slice
+            if slice['name'] not in self.local_slices:
+                site = local_sites[remote_sites[slice['site_id']]['login_base']]
+                new_slice = Slice(name=slice['name'],
+                                   instantiation=slice['instantiation'],
+                                   omf_friendly = False,
+                                   description = slice['description'],
+                                   slice_url = slice['url'],
+                                   site = site)
+                new_slice.save()
+                count += 1
+                self.local_slices[new_slice.name] = new_slice
+        print "Imported %s slices" % count
+
+          
+
diff --git a/planetstack/importer/plclassic/sliver_importer.py b/planetstack/importer/plclassic/sliver_importer.py
new file mode 100644
index 0000000..3f7912f
--- /dev/null
+++ b/planetstack/importer/plclassic/sliver_importer.py
@@ -0,0 +1,9 @@
+from PLC.Nodes import Nodes
+
+class SliverImporter:
+
+    def __init__(self, api):
+        self.api = api
+
+    def run(self):
+        return
diff --git a/planetstack/importer/plclassic/user_importer.py b/planetstack/importer/plclassic/user_importer.py
new file mode 100644
index 0000000..21d74b6
--- /dev/null
+++ b/planetstack/importer/plclassic/user_importer.py
@@ -0,0 +1,19 @@
+
+class UserImporter:
+
+    def __init__(self, api):
+        self.api = api
+        self.users = {}
+
+    def run(self):
+        users = self.api.GetPersons()
+
+    def save_site_privs(self, user):
+        # update site roles
+        pass
+
+    def save_slice_privs(self, user):
+        # update slice roles
+        pass
+          
+
