Fixing many issues preventing the SWIG Python interface.