Debug refactored code to restore purple target