Updated to use the SWIG API

Eight methods still left to do.