Made more efficient by only working with data in memory and explicitly saving data.