Refactored the save methods.