Refactored common get model logic