Bunch of ctypes fixes

Comment out 'helper' code from ctypesgen since it makes bugs harder to
catch