Adjust importing of models for factories

Using get_classes for models isn't the right way.