Added WriteMemory segment for easy manipulation and timing.