Rescuing Legacy Code by Extracting Pure Functions

Sounds like a great experience to me!