Refactored the model resolution into a new function residing in __init__.py