Fixing a few issues with the SWIG interface, but more remain, and I'm considering abandoning it.