diff --git a/search_api_autocomplete.api.php b/search_api_autocomplete.api.php
index 0199796..95e59bb 100644
--- a/search_api_autocomplete.api.php
+++ b/search_api_autocomplete.api.php
@@ -44,13 +44,13 @@
  * @see example_form_example_search_form_alter()
  */
 function hook_search_api_autocomplete_types() {
-  $types['example'] = array(
+  $types['example'] = [
     'name' => t('Example searches'),
     'description' => t('Searches provided by the <em>Example</em> module.'),
     'list searches' => 'example_list_autocomplete_searches',
     'create query' => 'example_create_autocomplete_query',
     'config form' => 'example_autocomplete_config_form',
-  );
+  ];
 
   return $types;
 }
@@ -76,11 +76,11 @@ function hook_search_api_autocomplete_types() {
  */
 function hook_search_api_autocomplete_suggester_info() {
   // Source: search_api_autocomplete_search_api_autocomplete_suggester_info().
-  $suggesters['server'] = array(
+  $suggesters['server'] = [
     'label' => t('Retrieve from server'),
     'description' => t('For compatible servers, ask the server for autocomplete suggestions.'),
     'class' => 'SearchApiAutocompleteServerSuggester',
-  );
+  ];
 
   return $suggesters;
 }
@@ -119,7 +119,7 @@ function hook_search_api_autocomplete_suggester_info_alter(array &$suggesters) {
  * @see hook_entity_load()
  */
 function hook_search_api_autocomplete_search_load(array $searches) {
-  $result = db_query('SELECT pid, foo FROM {mytable} WHERE pid IN(:ids)', array(':ids' => array_keys($searches)));
+  $result = \Drupal::database()->query('SELECT pid, foo FROM {mytable} WHERE pid IN(:ids)', [':ids' => array_keys($searches)]);
   foreach ($result as $record) {
     $searches[$record->pid]->foo = $record->foo;
   }
@@ -136,11 +136,11 @@ function hook_search_api_autocomplete_search_load(array $searches) {
  * @see hook_entity_insert()
  */
 function hook_search_api_autocomplete_search_insert(\Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface $search) {
-  db_insert('mytable')
-    ->fields(array(
+  \Drupal::database()->insert('mytable')
+    ->fields([
       'id' => entity_id('search_api_autocomplete_search', $search),
       'extra' => print_r($search, TRUE),
-    ))
+    ])
     ->execute();
 }
 
@@ -169,8 +169,8 @@ function hook_search_api_autocomplete_search_presave(\Drupal\search_api_autocomp
  * @see hook_entity_update()
  */
 function hook_search_api_autocomplete_search_update(\Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface $search) {
-  db_update('mytable')
-    ->fields(array('extra' => print_r($search, TRUE)))
+  \Drupal::database()->update('mytable')
+    ->fields(['extra' => print_r($search, TRUE)])
     ->condition('id', entity_id('search_api_autocomplete_search', $search))
     ->execute();
 }
@@ -186,7 +186,7 @@ function hook_search_api_autocomplete_search_update(\Drupal\search_api_autocompl
  * @see hook_entity_delete()
  */
 function hook_search_api_autocomplete_search_delete(\Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface $search) {
-  db_delete('mytable')
+  \Drupal::database()->delete('mytable')
     ->condition('pid', entity_id('search_api_autocomplete_search', $search))
     ->execute();
 }
@@ -194,15 +194,15 @@ function hook_search_api_autocomplete_search_delete(\Drupal\search_api_autocompl
 /**
  * Define default search configurations.
  *
- * @return
+ * @return \Drupal\search_api_autocomplete\Entity\SearchApiAutocompleteSearch[]
  *   An array of default searches, keyed by machine names.
  *
  * @see hook_default_search_api_autocomplete_search_alter()
  */
 function hook_default_search_api_autocomplete_search() {
-  $defaults['main'] = entity_create('search_api_autocomplete_search', array(
+  $defaults['main'] = \Drupal\search_api_autocomplete\Entity\SearchApiAutocompleteSearch::create('search_api_autocomplete_search', [
     // ….
-  ));
+  ]);
   return $defaults;
 }
 
@@ -278,13 +278,13 @@ function hook_search_api_autocomplete_views_fulltext_fields_alter(array &$fields
  *     options.
  */
 function example_list_autocomplete_searches(\Drupal\search_api\IndexInterface $index) {
-  $ret = array();
-  $result = db_query('SELECT name, machine_name, extra FROM {example_searches} WHERE index_id = :id', array($index->machine_name));
+  $ret = [];
+  $result = \Drupal::database()->query('SELECT name, machine_name, extra FROM {example_searches} WHERE index_id = :id', [$index->machine_name]);
   foreach ($result as $row) {
     $id = 'example_' . $row->machine_name;
-    $ret[$id] = array(
+    $ret[$id] = [
       'name' => $row->name,
-    );
+    ];
     if ($row->extra) {
       $ret[$id]['options']['custom']['extra'] = $row->extra;
     }
@@ -340,14 +340,14 @@ function example_create_autocomplete_query(\Drupal\search_api_autocomplete\Searc
  * @see example_autocomplete_config_form_validate()
  * @see example_autocomplete_config_form_submit()
  */
-function example_autocomplete_config_form(array $form, array &$form_state, \Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface) {
-  $form['user_filters'] = array(
+function example_autocomplete_config_form(array $form, array &$form_state, \Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface $search) {
+  $form['user_filters'] = [
     '#type' => 'textarea',
     '#title' => t('Custom filters'),
     '#description' => t('Enter additional filters set on the autocompletion search. ' .
         'Write one filter on each line, the field and its value separated by an equals sign (=).'),
     '#default_value' => empty($search->options['custom']['user_filters']) ? '' : $search->options['custom']['user_filters'],
-  );
+  ];
 
   return $form;
 }
@@ -370,7 +370,7 @@ function example_autocomplete_config_form(array $form, array &$form_state, \Drup
  * @see example_autocomplete_config_form_submit()
  */
 function example_autocomplete_config_form_validate(array $form, array &$form_state, array &$values) {
-  $f = array();
+  $f = [];
   foreach (explode("\n", $values['user_filters']) as $line) {
     if (preg_match('/^\s*([a-z0-9_:]+)\s*=\s*(.*\S)\s*$/i', $line, $m)) {
       $f[] = $m[1] . '=' . $m[2];
@@ -470,17 +470,17 @@ function callback_search_api_autocomplete_script_url(\Drupal\search_api_autocomp
   // Solution to use a custom script on multilingual sites which have the
   // current language as the first path element.
   global $language;
-  $options = array(
+  $options = [
     'absolute' => TRUE,
     // Don't prefix the path with the language, always point to the root
     // directory. Instead we pass the language as a GET parameter.
-    'language' => (object) array(
+    'language' => (object) [
       'language' => '',
-    ),
-    'query' => array(
+    ],
+    'query' => [
       'machine_name' => $search->machine_name,
       'language' => $language->language,
-    ),
-  );
+    ],
+  ];
   return url($config['#url'], $options);
 }
diff --git a/src/AutocompleteFormUtility.php b/src/AutocompleteFormUtility.php
index a9ab0ef..bce0fac 100644
--- a/src/AutocompleteFormUtility.php
+++ b/src/AutocompleteFormUtility.php
@@ -57,9 +57,11 @@ class AutocompleteFormUtility {
    * Helper method for altering a textfield form element to use autocompletion.
    *
    * @param array $element
-   * @param \Drupal\search_api_autocomplete\Controller\AutocompleteController $controller
-   *   The autocomplete controller.
+   *   The altered element
+   * @param \Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface $search
+   *   The autocomplete search.
    * @param array $fields
+   *   (optional) Used fulltext fields.
    */
   public function alterElement(array &$element, SearchApiAutocompleteSearchInterface $search, array $fields = []) {
     // @todo find a cleaner solution.
diff --git a/src/Controller/AutocompleteController.php b/src/Controller/AutocompleteController.php
index 697b6a9..24001bd 100644
--- a/src/Controller/AutocompleteController.php
+++ b/src/Controller/AutocompleteController.php
@@ -56,7 +56,7 @@ class AutocompleteController extends ControllerBase implements ContainerInjectio
    * @param \Symfony\Component\HttpFoundation\Request $request
    *   The request.
    *
-   * @return \Drupal\Core\Cache\CacheableJsonResponse
+   * @return \Symfony\Component\HttpFoundation\JsonResponse
    *   The autocompletion response.
    */
   public function autocomplete(SearchApiAutocompleteSearchInterface $search_api_autocomplete_search, $fields, Request $request) {
@@ -115,25 +115,12 @@ class AutocompleteController extends ControllerBase implements ContainerInjectio
 
             /*** @var \Drupal\search_api_autocomplete\SuggestionInterface $suggestion */
             foreach ($ret as $key => $suggestion) {
-              if ($build = $suggestion->getRender()) {
+              if ($build = $suggestion->toRenderable()) {
                 $matches[] = [
                   'value' => $key,
                   'label' => $this->renderer->render($build),
                 ];
               }
-              else {
-                $ret[$key] = [
-                  '#theme' => 'search_api_autocomplete_suggestion',
-                ] + array_combine(array_map(function ($key) {
-                  // Convert the suggestion into a suitable variable for
-                  // templates, by adding # in front.
-                  return '#' . $key;
-                }, array_keys($suggestion)), array_values($suggestion));
-                $matches[] = [
-                  'value' => $key,
-                  'label' => $this->renderer->render($ret[$key]),
-                ];
-              }
             }
           }
         }
@@ -143,6 +130,8 @@ class AutocompleteController extends ControllerBase implements ContainerInjectio
       watchdog_exception('search_api_autocomplete', $e, '%type while retrieving autocomplete suggestions: !message in %function (line %line of %file).');
     }
 
+    // @todo Get cacheability metadata from search_api and use
+    //   \Drupal\Core\Cache\CacheableJsonResponse instead.
     return new JsonResponse($matches);
   }
 
diff --git a/src/Entity/SearchApiAutocompleteSearch.php b/src/Entity/SearchApiAutocompleteSearch.php
index 1351de5..a9831f4 100644
--- a/src/Entity/SearchApiAutocompleteSearch.php
+++ b/src/Entity/SearchApiAutocompleteSearch.php
@@ -5,7 +5,6 @@ namespace Drupal\search_api_autocomplete\Entity;
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Config\Entity\ConfigEntityBase;
 use Drupal\search_api\Entity\Index;
-use Drupal\search_api_autocomplete\Controller\AutocompleteController;
 use Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface;
 
 /**
diff --git a/src/Form/AutocompleteSearchAdminOverview.php b/src/Form/AutocompleteSearchAdminOverview.php
index 0aa6771..4713ff0 100644
--- a/src/Form/AutocompleteSearchAdminOverview.php
+++ b/src/Form/AutocompleteSearchAdminOverview.php
@@ -20,11 +20,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 class AutocompleteSearchAdminOverview extends FormBase {
 
   /**
-   * @var \Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface
-   */
-  protected $entity;
-
-  /**
    * The autocomplete suggester manager.
    *
    * @var \Drupal\Component\Plugin\PluginManagerInterface
@@ -50,7 +45,7 @@ class AutocompleteSearchAdminOverview extends FormBase {
    *
    * @var \Drupal\Core\Routing\RedirectDestinationInterface
    */
-  protected $destination;
+  protected $redirectDestination;
 
   /**
    * Creates a new AutocompleteSearchAdminOverview instance.
@@ -98,7 +93,9 @@ class AutocompleteSearchAdminOverview extends FormBase {
     $index = $form_state->get('index');
     $ids = array_keys($this->loadAutocompleteSearchByIndex($index->id()));
     if ($ids) {
-      entity_delete_multiple('search_api_autocomplete_search', $ids);
+      $autocomplete_search_storage = $this->entityTypeManager->getStorage('search_api_autocomplete_search');
+      $autocomplete_searches = $autocomplete_search_storage->loadMultiple($ids);
+      $autocomplete_search_storage->delete($autocomplete_searches);
       drupal_set_message($this->t('All autocompletion settings stored for this index were deleted.'));
     }
     else {
@@ -122,12 +119,12 @@ class AutocompleteSearchAdminOverview extends FormBase {
       ];
       drupal_set_message($this->t('There are currently no suggester plugins installed that support this index. To solve this problem, you can either:<ul><li>move the index to a server which supports the "@feature" feature (see the <a href=":service_classes_url">available service class</a>)</li><li>or install a module providing a new suggester plugin that supports this index</li></ul>', $args), 'error');
       if ($this->loadAutocompleteSearchByIndex($index_id)) {
-        $form['description'] = array(
+        $form['description'] = [
           '#type' => 'item',
           '#title' => $this->t('Delete autocompletion settings'),
           '#description' => $this->t("If you won't use autocompletion with this index anymore, you can delete all autocompletion settings associated with it. " .
             "This will delete all autocompletion settings on this index. Settings on other indexes won't be influenced."),
-        );
+        ];
         $form['button'] = [
           '#type' => 'submit',
           '#value' => $this->t('Delete autocompletion settings'),
@@ -226,7 +223,7 @@ class AutocompleteSearchAdminOverview extends FormBase {
         if ($unavailable) {
           $options['label'] = '* ' . $options['label'];
         }
-        $items = array();
+        $items = [];
         if (!$unavailable && !empty($search->status())) {
           $items[] = [
             'title' => $this->t('Edit'),
@@ -277,7 +274,7 @@ class AutocompleteSearchAdminOverview extends FormBase {
       if ($search->status() != $enabled) {
         $change = TRUE;
         if (!empty($search)) {
-          $options['query'] = $this->destination->getAsArray();
+          $options['query'] = $this->redirectDestination->getAsArray();
           $options['fragment'] = 'module-search_api_autocomplete';
           $vars[':perm_url'] = Url::fromRoute('user.admin_permissions', [], $options)->toString();
           $messages = $this->t('The settings have been saved. Please remember to set the <a href=":perm_url">permissions</a> for the newly enabled searches.', $vars);
diff --git a/src/Form/AutocompleteSearchEditForm.php b/src/Form/AutocompleteSearchEditForm.php
index b9f670f..69f1c52 100644
--- a/src/Form/AutocompleteSearchEditForm.php
+++ b/src/Form/AutocompleteSearchEditForm.php
@@ -63,7 +63,12 @@ class AutocompleteSearchEditForm extends EntityForm {
   }
 
   /**
+   * Returns all suggesters matching for a particular search index.
    *
+   * @param \Drupal\search_api\IndexInterface $index
+   *   The search index to filter by
+   *
+   * @return \Drupal\search_api_autocomplete\Suggester\SuggesterInterface[]
    */
   protected function getSuggestersForIndex(IndexInterface $index) {
     $suggesters = array_map(function ($suggester_info) {
@@ -149,7 +154,7 @@ class AutocompleteSearchEditForm extends EntityForm {
       if ($suggester_form) {
         $form['options']['suggester_configuration'] = $suggester_form;
         $form['options']['suggester_configuration']['#type'] = 'fieldset';
-        $form['options']['suggester_configuration']['#title'] = $this->t('Configure the %suggester suggester plugin', array('%suggester' => $suggester->label()));
+        $form['options']['suggester_configuration']['#title'] = $this->t('Configure the %suggester suggester plugin', ['%suggester' => $suggester->label()]);
         $form['options']['suggester_configuration']['#description'] = $suggester->getDescription();
         $form['options']['suggester_configuration']['#collapsible'] = TRUE;
       }
@@ -195,7 +200,7 @@ class AutocompleteSearchEditForm extends EntityForm {
     $custom_form = empty($form['options']['custom']) ? [] : $form['options']['custom'];
     if ($type instanceof PluginFormInterface) {
       $type_form_state = new SubFormState($form_state, ['options', 'custom']);
-      $form['options']['custom'] = $type->buildConfigurationForm($custom_form, $type_form_state, $search);
+      $form['options']['custom'] = $type->buildConfigurationForm($custom_form, $type_form_state);
     }
 
     $form['advanced'] = [
diff --git a/src/Plugin/search_api_autocomplete/AutocompleteType/Page.php b/src/Plugin/search_api_autocomplete/AutocompleteType/Page.php
index 80d394f..bdcd911 100644
--- a/src/Plugin/search_api_autocomplete/AutocompleteType/Page.php
+++ b/src/Plugin/search_api_autocomplete/AutocompleteType/Page.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\type;
+namespace Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\AutocompleteType;
 
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -79,7 +79,7 @@ class Page extends PluginBase implements TypeInterface, ContainerFactoryPluginIn
    * {@inheritdoc}
    */
   public function listSearches(IndexInterface $index) {
-    $ret = array();
+    $ret = [];
     $storage = $this->entityTypeManager->getStorage('search_api_page');
     foreach ($storage->loadByProperties(['index' => $index->id()]) as $page) {
       $id = 'search_api_page_' . $page->id();
diff --git a/src/Plugin/search_api_autocomplete/AutocompleteType/Views.php b/src/Plugin/search_api_autocomplete/AutocompleteType/Views.php
index a42feb4..761120f 100644
--- a/src/Plugin/search_api_autocomplete/AutocompleteType/Views.php
+++ b/src/Plugin/search_api_autocomplete/AutocompleteType/Views.php
@@ -19,7 +19,6 @@ use Drupal\views\Views as ViewsViews;
  *   label = @Translation("Search views"),
  *   description = @Translation("Searches provided by views"),
  *   provider = "search_api",
- *   deriver = "Drupal\search_api_autocomplete\Plugin\Derivative\ViewsAutocompleteType"
  * )
  */
 class Views extends PluginBase implements TypeInterface, ConfigurablePluginInterface, PluginFormInterface {
@@ -69,7 +68,7 @@ class Views extends PluginBase implements TypeInterface, ConfigurablePluginInter
     $search = $form_state->getFormObject()->getEntity();
     $views_id = substr($search->id(), 17);
     $view = ViewsViews::getView($views_id);
-    $options = array();
+    $options = [];
     $view->initDisplay();
     foreach ($view->displayHandlers as $id => $display) {
       /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase $display */
@@ -114,7 +113,7 @@ class Views extends PluginBase implements TypeInterface, ConfigurablePluginInter
    * {@inheritdoc}
    */
   public function listSearches(IndexInterface $index) {
-    $ret = array();
+    $ret = [];
     $base_table = 'search_api_index_' . $index->id();
     foreach (ViewsViews::getAllViews() as $id => $view) {
       if ($view->get('base_table') === $base_table) {
diff --git a/src/Plugin/search_api_autocomplete/suggester/Server.php b/src/Plugin/search_api_autocomplete/suggester/Server.php
index 57458c8..38ccf40 100644
--- a/src/Plugin/search_api_autocomplete/suggester/Server.php
+++ b/src/Plugin/search_api_autocomplete/suggester/Server.php
@@ -6,8 +6,8 @@ use Drupal\Core\Form\FormStateInterface;
 use Drupal\search_api\IndexInterface;
 use Drupal\search_api\Query\QueryInterface;
 use Drupal\search_api\SearchApiException;
-use Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\AutocompleteSuggester\SuggesterPluginBase;
 use Drupal\search_api_autocomplete\Suggester\SuggesterInterface;
+use Drupal\search_api_autocomplete\Suggester\SuggesterPluginBase;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -41,6 +41,18 @@ class Server extends SuggesterPluginBase implements SuggesterInterface {
   /**
    * {@inheritdoc}
    */
+  public function setConfiguration(array $configuration) {
+    if (isset($configuration['fields'])) {
+      $configuration['fields'] = array_filter($configuration['fields']);
+    }
+
+    return parent::setConfiguration($configuration);
+  }
+
+
+  /**
+   * {@inheritdoc}
+   */
   public static function supportsIndex(IndexInterface $index) {
     try {
       return $index->getServerInstance() && $index->getServerInstance()->supportsFeature('search_api_autocomplete');
diff --git a/src/SearchApiAutocompleteInterface.php b/src/SearchApiAutocompleteInterface.php
index 3fb103e..b3df99a 100644
--- a/src/SearchApiAutocompleteInterface.php
+++ b/src/SearchApiAutocompleteInterface.php
@@ -20,21 +20,21 @@ interface SearchApiAutocompleteInterface extends BackendInterface {
    * considered incomplete, the following might be returned:
    *
    * @code
-   *   array(
-   *     array(
+   *   [
+   *     [
    *       'prefix' => t('Did you mean:'),
    *       'user_input' => 'reach us',
-   *     ),
-   *     array(
+   *     ],
+   *     [
    *       'user_input' => 'teach us',
    *       'suggestion_suffix' => 'ers',
-   *     ),
-   *     array(
+   *     ],
+   *     [
    *       'user_input' => 'teach us',
    *       'suggestion_suffix' => ' swimming',
-   *     ),
+   *     ],
    *     'teach users swimming',
-   *   );
+   *   ];
    * @endcode
    *
    * @param \Drupal\search_api\Query\QueryInterface $query
diff --git a/src/Suggester/SuggesterInterface.php b/src/Suggester/SuggesterInterface.php
index 57df156..2b0cddb 100644
--- a/src/Suggester/SuggesterInterface.php
+++ b/src/Suggester/SuggesterInterface.php
@@ -28,22 +28,6 @@ interface SuggesterInterface extends ConfigurablePluginInterface, PluginInspecti
   public static function supportsIndex(IndexInterface $index);
 
   /**
-   * Retrieves the plugin's ID.
-   *
-   * @return string
-   *   The plugin's ID.
-   */
-  public function getPluginId();
-
-  /**
-   * Retrieves the plugin's definition.
-   *
-   * @return array
-   *   The plugin's definition.
-   */
-  public function getPluginDefinition();
-
-  /**
    * Retrieves the search this plugin is configured for.
    *
    * @return \Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface
@@ -74,21 +58,21 @@ interface SuggesterInterface extends ConfigurablePluginInterface, PluginInspecti
    * considered incomplete, the following might be returned:
    *
    * @code
-   *   array(
-   *     array(
+   *   [
+   *     [
    *       'prefix' => t('Did you mean:'),
    *       'user_input' => 'reach us',
-   *     ),
-   *     array(
+   *     ],
+   *     [
    *       'user_input' => 'teach us',
    *       'suggestion_suffix' => 'ers',
-   *     ),
-   *     array(
+   *     ],
+   *     [
    *       'user_input' => 'teach us',
    *       'suggestion_suffix' => ' swimming',
-   *     ),
+   *     ],
    *     'teach users swimming',
-   *   );
+   *   ];
    * @endcode
    *
    * @param \Drupal\search_api\Query\QueryInterface $query
diff --git a/src/Suggester/SuggesterPluginBase.php b/src/Suggester/SuggesterPluginBase.php
index ffc0a5a..adaa208 100644
--- a/src/Suggester/SuggesterPluginBase.php
+++ b/src/Suggester/SuggesterPluginBase.php
@@ -1,12 +1,11 @@
 <?php
 
-namespace Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\AutocompleteSuggester;
+namespace Drupal\search_api_autocomplete\Suggester;
 
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Plugin\PluginBase;
 use Drupal\search_api\IndexInterface;
 use Drupal\search_api\Plugin\ConfigurablePluginInterface;
-use Drupal\search_api_autocomplete\Suggester\SuggesterInterface;
 use Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface;
 
 /**
@@ -67,6 +66,8 @@ abstract class SuggesterPluginBase extends PluginBase implements SuggesterInterf
    */
   public function __construct(SearchApiAutocompleteSearchInterface $search, array $configuration, $plugin_id, array $plugin_definition) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
+
+    $this->setConfiguration($configuration);
     $this->search = $search;
   }
 
diff --git a/src/Suggestion.php b/src/Suggestion.php
index 42816e4..514c766 100644
--- a/src/Suggestion.php
+++ b/src/Suggestion.php
@@ -59,7 +59,7 @@ class Suggestion implements SuggestionInterface {
   /**
    * If given, an HTML string or render array.
    *
-   * @var array|null
+   * @var array
    */
   protected $render;
 
@@ -80,10 +80,10 @@ class Suggestion implements SuggestionInterface {
    *   The suggestion suffix.
    * @param array|null $results
    *   The results.
-   * @param array|null|string $render
-   *   The render.
+   * @param array $render
+   *   The render array.
    */
-  public function __construct($keys = NULL, $url = '', $prefix = '', $suggestionPrefix = '', $userInput = '', $suggestionSuffix = '', $results = 0, $render = '') {
+  public function __construct($keys = NULL, $url = '', $prefix = '', $suggestionPrefix = '', $userInput = '', $suggestionSuffix = '', $results = 0, $render = []) {
     $this->keys = $keys;
     $this->url = $url;
     $this->prefix = $prefix;
@@ -248,4 +248,25 @@ class Suggestion implements SuggestionInterface {
     return $this;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function toRenderable() {
+    if (!empty($this->render)) {
+      return $this->render;
+    }
+    else {
+      return [
+        '#theme' => 'search_api_autocomplete_suggestion',
+        '#keys' => $this->getKeys(),
+        '#prefix' => $this->getPrefix(),
+        '#results' => $this->getResults(),
+        '#suggestion_prefix' => $this->getSuggestionPrefix(),
+        '#suggestion_suffix' => $this->getSuggestionSuffix(),
+        '#url' => $this->getUrl(),
+        '#user_input' => $this->getUserInput(),
+      ];
+    }
+  }
+
 }
diff --git a/src/SuggestionInterface.php b/src/SuggestionInterface.php
index 3c54d5e..9e1faab 100644
--- a/src/SuggestionInterface.php
+++ b/src/SuggestionInterface.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\search_api_autocomplete;
 
+use Drupal\Core\Render\RenderableInterface;
+
 /**
  * Defines a single autocompletion suggestion.
  *
@@ -9,7 +11,7 @@ namespace Drupal\search_api_autocomplete;
  * "url", "suggestion_prefix", "user_input" or "suggestion_suffix" has to be
  * present.
  */
-interface SuggestionInterface {
+interface SuggestionInterface extends RenderableInterface {
 
   /**
    * The keywords this suggestion will autocomplete to.
diff --git a/src/Type/TypeInterface.php b/src/Type/TypeInterface.php
index 0c2a610..b4ac6ce 100644
--- a/src/Type/TypeInterface.php
+++ b/src/Type/TypeInterface.php
@@ -14,27 +14,33 @@ use Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface;
 interface TypeInterface {
 
   /**
+   * Returns the label of the autocompletion type.
    *
+   * @return string
    */
   public function getLabel();
 
   /**
+   * Returns the description of the autocompletion type.
    *
+   * @return string
    */
   public function getDescription();
 
   /**
-   *
    */
   public function listSearches(IndexInterface $index);
 
   /**
+   * Creates the searchapi query based upon the typed strings.
+   *
    * @param \Drupal\search_api_autocomplete\SearchApiAutocompleteSearchInterface $search
    *   The autocomplete search configuration.
    * @param string $complete
    * @param string $incomplete
    *
    * @return \Drupal\search_api\Query\QueryInterface
+   *   The created query.
    */
   public function createQuery(SearchApiAutocompleteSearchInterface $search, $complete, $incomplete);
 
diff --git a/src/Type/TypeManager.php b/src/Type/TypeManager.php
index b6e6cb6..6f51607 100644
--- a/src/Type/TypeManager.php
+++ b/src/Type/TypeManager.php
@@ -6,7 +6,6 @@ use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Plugin\DefaultPluginManager;
 use Drupal\search_api_autocomplete\Annotation\SearchapiAutocompleteType;
-use Drupal\search_api_autocomplete\Type\TypeInterface;
 
 /**
  * Provides a plugin manager for autocomplete type plugins.
@@ -28,7 +27,7 @@ class TypeManager extends DefaultPluginManager {
    *   The module handler to invoke the alter hook with.
    */
   public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
-    parent::__construct('Plugin/search_api_autocomplete/type', $namespaces, $module_handler, TypeInterface::class, SearchapiAutocompleteType::class);
+    parent::__construct('Plugin/search_api_autocomplete/AutocompleteType', $namespaces, $module_handler, TypeInterface::class, SearchapiAutocompleteType::class);
 
     $this->setCacheBackend($cache_backend, 'search_api_autocomplete_type');
     $this->alterInfo('search_api_autocomplete_type');
