Refactoring a large function using the Single Responsibility Principle.
Perhaps you haven't heard of a little known, but frequently practiced coding style which we affectionately call LIQUID.