Refactoring and before_validation callback amendment.