Begin cleanup of write functionality.