I don't think it makes the example more complex. Just to make sure, I'm going to pase the example code

```php
public function slug(Entity $entity) {
  $config = $this->_config;
  $value = $entity->get($config['field']);
  $entity->set('slug', Inflector::slug($value, $this->_config['replacement']));
}

public function beforeSave($event, $entity) {
  $this->slug($entity);
}
```

Basically I moved the lines from beforeSave into slug