OK, returning everything to C-style casts, mixing C++ with C caused a LOT of C Linkage headaches