Update to refactored code