Initial implementation of the model factory