Added memcpy and free