Refactoring monkey patches is also fun