More refactoring of the risk calculators