Replaced MemWriter with Vec