More saving code, does not do update yet.