Improvements to SWIG interface.