Memcpy and memmove improvements