Altered "ensure_models_loaded" to include models with namespaces within subfolders of the models directory.