Rewrote data saving to be much, much faster.