move base class for models to the core module