DRY refactor of beforeSave and beforeValidate callbacks

For issue #46