Added Factory class for Models.