Tidy up the format and logic flow in the save handlers