Refact for SWIG convertion.