Refactors adjust, removing duplicate code and improving maintainability.