Various fixes. Swig templates.