mem cleanup for results when sending back to python.  new error codes and error strings in prep for python exceptions