Split common stuff into BaseModel (lib)