Finished the model generator