Changed to Swig template system