Factor slugging into BaseModel.