PY: Cleaned up the python files.  Moved all functions in class to top level functions.  Deleted old attempts at optimizing it.