Merged Ryan's int32/int64 modifications and got it to compile