Undo revert of refactored code