Refactors the analyze-correction-level method.

Notably, the calculation of which version/correction level to use is exported into another function