diff --git a/src/AutoEntityLabelManager.php b/src/AutoEntityLabelManager.php
index c267e31..e1e4f1c 100644
--- a/src/AutoEntityLabelManager.php
+++ b/src/AutoEntityLabelManager.php
@@ -285,10 +285,9 @@ class AutoEntityLabelManager implements AutoEntityLabelManagerInterface {
    */
   protected function getConfig($value) {
     if (!isset($this->config)) {
-      $this->config = $this->configFactory->get('auto_entitylabel.settings');
+      $this->config = $this->configFactory->get('auto_entitylabel.settings.' . $this->entity_type . '.' . $this->entity_bundle);
     }
-    $key = $this->bundle_entity_type . '_' . $this->entity_bundle;
-    return $this->config->get($key . '_' . $value);
+    return $this->config->get($value);
   }
 
   /**
diff --git a/src/Form/AutoEntityLabelForm.php b/src/Form/AutoEntityLabelForm.php
index a9cee45..c5a7681 100644
--- a/src/Form/AutoEntityLabelForm.php
+++ b/src/Form/AutoEntityLabelForm.php
@@ -17,12 +17,14 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  *
  * @property \Drupal\Core\Config\ConfigFactoryInterface config_factory
  * @property \Drupal\Core\Entity\EntityTypeManagerInterface entity_manager
- * @property String entity_type_parameter
- * @property String entity_type_id
- * @property \Drupal\auto_entitylabel\AutoEntityLabelManager auto_entity_label_manager
+ * @property String entityType
+ * @property String entityBundle
+ * @property \Drupal\auto_entitylabel\AutoEntityLabelManager
+ *   auto_entity_label_manager
  * @package Drupal\auto_entitylabel\Controller
  */
 class AutoEntityLabelForm extends ConfigFormBase {
+
   /**
    * The config factory.
    *
@@ -35,7 +37,7 @@ class AutoEntityLabelForm extends ConfigFormBase {
    */
   protected $configFactory;
 
-  protected $entitymanager;
+  protected $entityManager;
 
   // @codingStandardsIgnoreLine
   protected $route_match;
@@ -43,7 +45,7 @@ class AutoEntityLabelForm extends ConfigFormBase {
   /**
    * Module handler.
    *
-   * @var Drupal\Core\Extension\ModuleHandlerInterface
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface
    */
   private $moduleHandler;
 
@@ -55,6 +57,27 @@ class AutoEntityLabelForm extends ConfigFormBase {
   private $user;
 
   /**
+   * The entity type machine name.
+   *
+   * @var string
+   */
+  protected $entityType;
+
+  /**
+   * The bundle machine name.
+   *
+   * @var string
+   */
+  protected $entityBundle;
+
+  /**
+   * The entity provider machine name.
+   *
+   * @var string
+   */
+  protected $entityTypeProvider;
+
+  /**
    * AutoEntityLabelController constructor.
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
@@ -70,14 +93,14 @@ class AutoEntityLabelForm extends ConfigFormBase {
    */
   public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_manager, RouteMatchInterface $route_match, ModuleHandlerInterface $moduleHandler, AccountInterface $user) {
     parent::__construct($config_factory);
-    $this->entitymanager = $entity_manager;
+    $this->entityManager = $entity_manager;
     $this->route_match = $route_match;
     $route_options = $this->route_match->getRouteObject()->getOptions();
     $array_keys = array_keys($route_options['parameters']);
-    $this->entity_type_parameter = array_shift($array_keys);
-    $entity_type = $this->route_match->getParameter($this->entity_type_parameter);
-    $this->entity_type_id = $entity_type->id();
-    $this->entity_type_provider = $entity_type->getEntityType()->getProvider();
+    $this->entityType = array_shift($array_keys);
+    $entity_type = $this->route_match->getParameter($this->entityType);
+    $this->entityBundle = $entity_type->id();
+    $this->entityTypeProvider = $entity_type->getEntityType()->getProvider();
     $this->moduleHandler = $moduleHandler;
     $this->user = $user;
   }
@@ -119,12 +142,20 @@ class AutoEntityLabelForm extends ConfigFormBase {
   }
 
   /**
+   * Get the config name for this entity & bundle.
+   *
+   * @return string
+   *   The compiled config name.
+   */
+  protected function getConfigName() {
+    return 'auto_entitylabel.settings.' . $this->entityTypeProvider . '.' . $this->entityBundle;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $key = $this->entity_type_parameter . '_' . $this->entity_type_id;
-    $config = $this->config('auto_entitylabel.settings');
-
+    $config = $this->config($this->getConfigName());
     /*
      * @todo
      *  Find a generic way of determining if the label is rendered on the
@@ -139,34 +170,34 @@ class AutoEntityLabelForm extends ConfigFormBase {
 
     $form['auto_entitylabel'] = [
       '#type' => 'fieldset',
-      '#title' => $this->t('Automatic label generation for @type', ['@type' => $this->entity_type_id]),
+      '#title' => $this->t('Automatic label generation for @type', ['@type' => $this->entityBundle]),
       '#weight' => 0,
     ];
 
-    $form['auto_entitylabel'][$key . '_status'] = [
+    $form['auto_entitylabel']['status'] = [
       '#type' => 'radios',
-      '#default_value' => $config->get($key . '_status'),
+      '#default_value' => $config->get('status') ?: 0,
       '#options' => $options,
     ];
 
-    $form['auto_entitylabel'][$key . '_pattern'] = [
+    $form['auto_entitylabel']['pattern'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Pattern for the label'),
       '#description' => $this->t('Leave blank for using the per default generated label. Otherwise this string will be used as label. Use the syntax [token] if you want to insert a replacement pattern.'),
-      '#default_value' => $config->get($key . '_pattern'),
-      '#attributes' => array('class' => array('pattern-label')),
+      '#default_value' => $config->get('pattern') ?: '',
+      '#attributes' => ['class' => ['pattern-label']],
     ];
 
     // Don't allow editing of the pattern if PHP is used, but the users lacks
     // permission for PHP.
-    if ($config->get($key . '_php') && !$this->user->hasPermission('use PHP for auto entity labels')) {
-      $form['auto_entitylabel'][$key . '_pattern']['#disabled'] = TRUE;
-      $form['auto_entitylabel'][$key . '_pattern']['#description'] = $this->t('You are not allowed the configure the pattern for the label, because you do not have the %permission permission.', ['%permission' => $this->t('Use PHP for automatic entity label patterns')]);
+    if ($config->get('php') && !$this->user->hasPermission('use PHP for auto entity labels')) {
+      $form['auto_entitylabel']['pattern']['#disabled'] = TRUE;
+      $form['auto_entitylabel']['pattern']['#description'] = $this->t('You are not allowed the configure the pattern for the label, because you do not have the %permission permission.', ['%permission' => $this->t('Use PHP for automatic entity label patterns')]);
     }
 
     // Display the list of available placeholders if token module is installed.
     if ($this->moduleHandler->moduleExists('token')) {
-      $token_info = $this->moduleHandler->invoke($this->entity_type_provider, 'token_info');
+      $token_info = $this->moduleHandler->invoke($this->entityTypeProvider, 'token_info');
       $token_types = isset($token_info['types']) ? array_keys($token_info['types']) : [];
       $form['auto_entitylabel']['token_help'] = [
         '#theme' => 'token_tree_link',
@@ -175,15 +206,15 @@ class AutoEntityLabelForm extends ConfigFormBase {
       ];
     }
     else {
-      $form['auto_entitylabel'][$key . '_pattern']['#description'] .= ' ' . $this->t('To get a list of available tokens install <a href=":drupal-token" target="blank">Token</a> module.', [':drupal-token' => 'https://www.drupal.org/project/token']);
+      $form['auto_entitylabel']['pattern']['#description'] .= ' ' . $this->t('To get a list of available tokens install <a href=":drupal-token" target="blank">Token</a> module.', [':drupal-token' => 'https://www.drupal.org/project/token']);
     }
 
-    $form['auto_entitylabel'][$key . '_php'] = [
+    $form['auto_entitylabel']['php'] = [
       '#access' => $this->user->hasPermission('use PHP for auto entity labels'),
       '#type' => 'checkbox',
       '#title' => $this->t('Evaluate PHP in pattern.'),
       '#description' => $this->t('Put PHP code above that returns your string, but make sure you surround code in <code>&lt;?php</code> and <code>?&gt;</code>. Note that <code>$entity</code> and <code>$language</code> are available and can be used by your code.'),
-      '#default_value' => $config->get($key . '_php'),
+      '#default_value' => $config->get('php'),
     ];
 
     $form['#attached']['library'][] = 'auto_entitylabel/auto_entitylabel.admin';
@@ -195,11 +226,12 @@ class AutoEntityLabelForm extends ConfigFormBase {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    $config = $this->configFactory->getEditable('auto_entitylabel.settings');
+    $config = $this->configFactory->getEditable($this->getConfigName());
     $form_state->cleanValues();
-    foreach ($form_state->getValues() as $key => $value) {
-      $config->set($key, $value);
+    foreach (['status', 'pattern', 'php'] as $key) {
+      $config->set($key, $form_state->getValue($key));
     }
+    $config->set('dependencies', ['config' => [$this->entityTypeProvider . '.' . $this->entityType . '.' . $this->entityBundle]]);
     $config->save();
     parent::submitForm($form, $form_state);
   }
