Remove unnecessary requires.
Remove the hasChanges check and save directly from within the functions.