Rewrote saving process.