Wrote the ModelMain class