diff --git a/conf/onos.properties b/conf/onos.properties
index 668da42..d186e54 100644
--- a/conf/onos.properties
+++ b/conf/onos.properties
@@ -11,7 +11,6 @@
 net.floodlightcontroller.restserver.RestApiServer.port = 8080
 net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633
 net.floodlightcontroller.core.FloodlightProvider.workerthreads = 16
-net.floodlightcontroller.jython.JythonDebugInterface.port = 6655
 net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5
 net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0
 net.floodlightcontroller.onoslistener.OnosPublisher.dbconf = /tmp/cassandra.titan
diff --git a/pom.xml b/pom.xml
index 0d03e90..3428e40 100644
--- a/pom.xml
+++ b/pom.xml
@@ -204,11 +204,11 @@
       <artifactId>concurrentlinkedhashmap-lru</artifactId>
       <version>1.2</version>
     </dependency>
-    <dependency>
+    <!--<dependency>
       <groupId>org.python</groupId>
       <artifactId>jython-standalone</artifactId>
       <version>2.5.2</version>
-    </dependency>
+    </dependency>-->
     <dependency>
       <groupId>org.apache.thrift</groupId>
       <artifactId>libthrift</artifactId>
diff --git a/src/main/java/net/floodlightcontroller/jython/JythonDebugInterface.java b/src/main/java/net/floodlightcontroller/jython/JythonDebugInterface.java
deleted file mode 100644
index 19a97b5..0000000
--- a/src/main/java/net/floodlightcontroller/jython/JythonDebugInterface.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package net.floodlightcontroller.jython;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import net.floodlightcontroller.core.module.FloodlightModuleContext;
-import net.floodlightcontroller.core.module.FloodlightModuleException;
-import net.floodlightcontroller.core.module.IFloodlightModule;
-import net.floodlightcontroller.core.module.IFloodlightService;
-
-public class JythonDebugInterface implements IFloodlightModule {
-    protected static Logger log = LoggerFactory.getLogger(JythonDebugInterface.class);
-    protected JythonServer debug_server;
-    protected static int JYTHON_PORT = 6655;
-    
-    @Override
-    public Collection<Class<? extends IFloodlightService>> getModuleServices() {
-        // We don't export services
-        return null;
-    }
-
-    @Override
-    public Map<Class<? extends IFloodlightService>, IFloodlightService>
-            getServiceImpls() {
-        // We don't export services
-        return null;
-    }
-
-    @Override
-    public Collection<Class<? extends IFloodlightService>>
-            getModuleDependencies() {
-        // We don't have any dependencies
-        return null;
-    }
-
-    @Override
-    public void init(FloodlightModuleContext context)
-             throws FloodlightModuleException {
-        // no-op
-    }
-
-    @Override
-    public void startUp(FloodlightModuleContext context) {
-        Map<String, Object> locals = new HashMap<String, Object>();     
-        // add all existing module references to the debug server
-        for (Class<? extends IFloodlightService> s : context.getAllServices()) {
-            // Put only the last part of the name
-            String[] bits = s.getCanonicalName().split("\\.");
-            String name = bits[bits.length-1];
-            locals.put(name, context.getServiceImpl(s));
-        }
-        
-        // read our config options
-        Map<String, String> configOptions = context.getConfigParams(this);
-        int port = JYTHON_PORT;
-        String portNum = configOptions.get("port");
-        if (portNum != null) {
-            port = Integer.parseInt(portNum);
-        }
-        
-        JythonServer debug_server = new JythonServer(port, locals);
-        debug_server.start();
-    }
-}
diff --git a/src/main/java/net/floodlightcontroller/jython/JythonServer.java b/src/main/java/net/floodlightcontroller/jython/JythonServer.java
deleted file mode 100644
index fc35b15..0000000
--- a/src/main/java/net/floodlightcontroller/jython/JythonServer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package net.floodlightcontroller.jython;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.python.util.PythonInterpreter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This class starts a thread that runs a jython interpreter that
- * can be used for debug (or even development).
- *
- * @author mandeepdhami
- *
- */
-public class JythonServer extends Thread {
-    protected static Logger log = LoggerFactory.getLogger(JythonServer.class);
-
-	int port;
-	Map<String, Object> locals;
-	
-	/**
-	 * @param port_ Port to use for jython server
-	 * @param locals_ Locals to add to the interpreters top level name space
-	 */
-	public JythonServer(int port_, Map<String, Object> locals_) {
-		this.port = port_ ;
-		this.locals = locals_;
-		if (this.locals == null) {
-			this.locals = new HashMap<String, Object>();
-		}
-		this.locals.put("log", JythonServer.log);
-		this.setName("debugserver");
-	}
-
-    /**
-     * The main thread for this class invoked by Thread.run()
-     *
-     * @see java.lang.Thread#run()
-     */
-    public void run() {
-        PythonInterpreter p = new PythonInterpreter();
-        for (String name : this.locals.keySet()) {
-            p.set(name, this.locals.get(name));
-        }
-
-        URL jarUrl = JythonServer.class.getProtectionDomain().getCodeSource().getLocation();
-        String jarPath = jarUrl.getPath();
-        if (jarUrl.getProtocol().equals("file")) {
-            // If URL is of type file, assume that we are in dev env and set path to python dir.
-            // else use the jar file as is
-            jarPath = jarPath + "../../src/main/python/";
-        }
-
-        p.exec("import sys");
-        p.exec("sys.path.append('" + jarPath + "')");
-        p.exec("from debugserver import run_server");
-        p.exec("run_server(" + this.port + ", '0.0.0.0', locals())");
-    }
-
-}
diff --git a/src/main/python/PythonClient.py b/src/main/python/PythonClient.py
deleted file mode 100644
index 5c9890e..0000000
--- a/src/main/python/PythonClient.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-sys.path.append('../../../target/gen-py')
-
-from packetstreamer import PacketStreamer
-from packetstreamer.ttypes import *
-
-from thrift import Thrift
-from thrift.transport import TSocket
-from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol
-
-try:
-
-    # Make socket
-    transport = TSocket.TSocket('localhost', 9090)
-
-    # Buffering is critical. Raw sockets are very slow
-    transport = TTransport.TFramedTransport(transport)
-
-    # Wrap in a protocol
-    protocol = TBinaryProtocol.TBinaryProtocol(transport)
-
-    # Create a client to use the protocol encoder
-    client = PacketStreamer.Client(protocol)
-
-    # Connect!
-    transport.open()
-
-    while 1:
-        packets = client.getPackets("session1")
-        print 'session1 packets num: %d' % (len(packets))
-        count = 1
-        for packet in packets:
-            print "Packet %d: %s"% (count, packet)
-            if "FilterTimeout" in packet:
-                sys.exit()
-            count += 1 
-
-    # Close!
-    transport.close()
-
-except Thrift.TException, tx:
-    print '%s' % (tx.message)
-
-except KeyboardInterrupt, e:
-    print 'Bye-bye'
diff --git a/src/main/python/PythonServer.py b/src/main/python/PythonServer.py
deleted file mode 100644
index c3c844e..0000000
--- a/src/main/python/PythonServer.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import logging
-sys.path.append('../../../target/gen-py')
-
-from packetstreamer import PacketStreamer
-from packetstreamer.ttypes import *
-
-from thrift.transport import TSocket
-from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol
-from thrift.server import TServer
-
-class PacketStreamerHandler:
-  def __init__(self):
-    logging.handlers.codecs = None
-    self.log = logging.getLogger("packetstreamer")
-    self.log.setLevel(logging.DEBUG)
-    handler = logging.handlers.SysLogHandler("/dev/log")
-    handler.setFormatter(logging.Formatter("%(name)s: %(levelname)s %(message)s"))
-    self.log.addHandler(handler)
-
-  def ping(self):
-    self.log.debug('ping()')
-    return true
-
-  def pushPacketSync(self, packet):
-    self.log.debug('receive a packet synchronously: %s' %(packet))
-    return 0
-
-  def pushPacketAsync(self, packet):
-    self.log.debug('receive a packet Asynchronously: %s' %(packet))
-
-handler = PacketStreamerHandler()
-processor = PacketStreamer.Processor(handler)
-transport = TSocket.TServerSocket(9090)
-tfactory = TTransport.TBufferedTransportFactory()
-pfactory = TBinaryProtocol.TBinaryProtocolFactory()
-
-server = TServer.TSimpleServer(processor, transport, tfactory, pfactory)
-
-# You could do one of these for a multithreaded server
-#server = TServer.TThreadedServer(processor, transport, tfactory, pfactory)
-#server = TServer.TThreadPoolServer(processor, transport, tfactory, pfactory)
-
-print 'Starting the server...'
-server.serve()
-print 'done.'
diff --git a/src/main/python/compileall.py b/src/main/python/compileall.py
deleted file mode 100644
index b21d95f..0000000
--- a/src/main/python/compileall.py
+++ /dev/null
@@ -1,157 +0,0 @@
-"""Module/script to "compile" all .py files to .pyc (or .pyo) file.
-
-When called as a script with arguments, this compiles the directories
-given as arguments recursively; the -l option prevents it from
-recursing into directories.
-
-Without arguments, if compiles all modules on sys.path, without
-recursing into subdirectories.  (Even though it should do so for
-packages -- for now, you'll have to deal with packages separately.)
-
-See module py_compile for details of the actual byte-compilation.
-
-"""
-
-import os
-import sys
-import py_compile
-
-__all__ = ["compile_dir","compile_path"]
-
-def compile_dir(dir, maxlevels=10, ddir=None,
-                force=0, rx=None, quiet=0):
-    """Byte-compile all modules in the given directory tree.
-
-    Arguments (only dir is required):
-
-    dir:       the directory to byte-compile
-    maxlevels: maximum recursion level (default 10)
-    ddir:      if given, purported directory name (this is the
-               directory name that will show up in error messages)
-    force:     if 1, force compilation, even if timestamps are up-to-date
-    quiet:     if 1, be quiet during compilation
-
-    """
-    if not quiet:
-        print 'Listing', dir, '...'
-    try:
-        names = os.listdir(dir)
-    except os.error:
-        print "Can't list", dir
-        names = []
-    names.sort()
-    success = 1
-    for name in names:
-        fullname = os.path.join(dir, name)
-        if ddir is not None:
-            dfile = os.path.join(ddir, name)
-        else:
-            dfile = None
-        if rx is not None:
-            mo = rx.search(fullname)
-            if mo:
-                continue
-        if os.path.isfile(fullname):
-            head, tail = name[:-3], name[-3:]
-            if tail == '.py':
-                cfile = fullname + (__debug__ and 'c' or 'o')
-                ftime = os.stat(fullname).st_mtime
-                try: ctime = os.stat(cfile).st_mtime
-                except os.error: ctime = 0
-                if (ctime > ftime) and not force: continue
-                if not quiet:
-                    print 'Compiling', fullname, '...'
-                try:
-                    ok = py_compile.compile(fullname, None, dfile, True)
-                except KeyboardInterrupt:
-                    raise KeyboardInterrupt
-                except py_compile.PyCompileError,err:
-                    if quiet:
-                        print 'Compiling', fullname, '...'
-                    print err.msg
-                    success = 0
-                except IOError, e:
-                    print "Sorry", e
-                    success = 0
-                else:
-                    if ok == 0:
-                        success = 0
-        elif maxlevels > 0 and \
-             name != os.curdir and name != os.pardir and \
-             os.path.isdir(fullname) and \
-             not os.path.islink(fullname):
-            if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet):
-                success = 0
-    return success
-
-def compile_path(skip_curdir=1, maxlevels=0, force=0, quiet=0):
-    """Byte-compile all module on sys.path.
-
-    Arguments (all optional):
-
-    skip_curdir: if true, skip current directory (default true)
-    maxlevels:   max recursion level (default 0)
-    force: as for compile_dir() (default 0)
-    quiet: as for compile_dir() (default 0)
-
-    """
-    success = 1
-    for dir in sys.path:
-        if (not dir or dir == os.curdir) and skip_curdir:
-            print 'Skipping current directory'
-        else:
-            success = success and compile_dir(dir, maxlevels, None,
-                                              force, quiet=quiet)
-    return success
-
-def main():
-    """Script main program."""
-    import getopt
-    try:
-        opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:')
-    except getopt.error, msg:
-        print msg
-        print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
-              "[-x regexp] [directory ...]"
-        print "-l: don't recurse down"
-        print "-f: force rebuild even if timestamps are up-to-date"
-        print "-q: quiet operation"
-        print "-d destdir: purported directory name for error messages"
-        print "   if no directory arguments, -l sys.path is assumed"
-        print "-x regexp: skip files matching the regular expression regexp"
-        print "   the regexp is search for in the full path of the file"
-        sys.exit(2)
-    maxlevels = 10
-    ddir = None
-    force = 0
-    quiet = 0
-    rx = None
-    for o, a in opts:
-        if o == '-l': maxlevels = 0
-        if o == '-d': ddir = a
-        if o == '-f': force = 1
-        if o == '-q': quiet = 1
-        if o == '-x':
-            import re
-            rx = re.compile(a)
-    if ddir:
-        if len(args) != 1:
-            print "-d destdir require exactly one directory argument"
-            sys.exit(2)
-    success = 1
-    try:
-        if args:
-            for dir in args:
-                if not compile_dir(dir, maxlevels, ddir,
-                                   force, rx, quiet):
-                    success = 0
-        else:
-            success = compile_path()
-    except KeyboardInterrupt:
-        print "\n[interrupt]"
-        success = 0
-    return success
-
-if __name__ == '__main__':
-    exit_status = int(not main())
-    sys.exit(exit_status)
diff --git a/src/main/python/debugserver.py b/src/main/python/debugserver.py
deleted file mode 100644
index d8c81f9..0000000
--- a/src/main/python/debugserver.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-from threading import currentThread
-from SocketServer import BaseRequestHandler, TCPServer
-from code import InteractiveConsole
-
-_locals = None
-
-class DebugLogger(object):
-    def do_print(self, *args):
-        for i in args:
-            print i,
-        print
-    info = do_print
-    warn = do_print
-    debug = do_print
-_log = DebugLogger()
-
-
-class DebugConsole(InteractiveConsole):
-    def __init__(self, request):
-        self.request = request
-        InteractiveConsole.__init__(self, _locals)
-
-    def raw_input(self, prompt):
-        self.request.send(prompt)
-        data = self.request.recv(10000).rstrip()
-        if len(data) == 1 and ord(data[0]) == 4:
-            sys.exit()
-        return data
-
-    def write(self, data):
-        self.request.send(str(data))
-
-    def write_nl(self, data):
-        self.write(str(data)+"\r\n")
-
-class DebugServerHandler(BaseRequestHandler):
-    def __init__(self, request, client_address, server):
-        currentThread()._thread.setName("debugserver-%s:%d" % client_address)
-        _log.debug('Open connection to DebugServer from %s:%d' % client_address)
-        BaseRequestHandler.__init__(self, request, client_address, server)
-
-    def handle(self):
-        console = DebugConsole(self.request)
-        sys.displayhook = console.write_nl
-        console.interact('DebugServer')
-        self.request.close()
-
-class DebugServer(TCPServer):
-    daemon_threads = True
-    allow_reuse_address = True
-
-    def handle_error(self, request, client_address):
-        _log.debug('Closing connection to DebugServer from %s:%d' % client_address)
-        request.close()
-
-def run_server(port=6655, host='0.0.0.0', locals=locals()):
-    currentThread()._thread.setName("debugserver-main")
-
-    global _locals
-    _locals = locals
-    if "log" in locals.keys():
-        global _log
-        _log = locals["log"]
-
-    _log.info("Starting DebugServer on port %d" % port)
-    server = DebugServer(('', port), DebugServerHandler)
-    try:
-        server.serve_forever()
-    except KeyboardInterrupt:
-        pass
-
-if __name__ == "__main__":
-    run_server()
diff --git a/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule b/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule
index f720188..d21c157 100644
--- a/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule
+++ b/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule
@@ -10,7 +10,6 @@
 net.floodlightcontroller.perfmon.PktInProcessingTime
 net.floodlightcontroller.perfmon.NullPktInProcessingTime
 net.floodlightcontroller.restserver.RestApiServer
-net.floodlightcontroller.jython.JythonDebugInterface
 net.floodlightcontroller.counter.CounterStore
 net.floodlightcontroller.counter.NullCounterStore
 net.floodlightcontroller.threadpool.ThreadPool
