Switch to intN_t, uintN_t and size_t properly. Removed creation of ByteArray from char arrays