SWIG refactor for better handling of specific boost types.