Convert to template driven development using swig