Some refactoring of the classes RiskModel and RiskInput

This is the version I have shown in the risk course.