Generating the model.