rework structs/typedefs to be swig-friendly