Introduce swig, simplify tests