OMG it finally worked.

Stupid mistake making debug take in byte instead of int reported
erroneous zeroes when passing in int to debug.  Also has to pass
pointers instead of objects so values can be changed.