Large refactoring due to the change in RiskModel