Added all sorts of safeguards around savedata