Modified updating of data. Still needs more work.