move implementation details of linear correction out of TNNMGStep

This simplifies the `iterate()` method such that it fits on a single
screen.
2 jobs for cleanup/move-details-of-linear-correction-out-of-tnnmgstep in 4 minutes and 15 seconds (queued for 2 seconds)