Moved the generation into the models