Added corect data structures into SWIG-generated code by modifying .i files.
This fixed the issue with negative numbers becoming something around 65535
because now we're casting correctly to uint16 in SWIG-generated C.