Removing unneeded memcpy