Cleaning up the save code.
Fix merge