Refactored model and base model declaration