Changing some things like memcpy pointers to remove warnings from build