diff --git a/.travis.yml b/.travis.yml
index af2c9d9..00133d6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,9 +42,8 @@ before_install:
 script:
   - phpcs --report=full --standard=Drupal "$TRAVIS_BUILD_DIR" || true
   - cd ~/
-  - git clone --depth 1 --branch 8.0.x http://git.drupal.org/project/drupal.git
+  - git clone --depth 1 --branch 8.4.x http://git.drupal.org/project/drupal.git
   - cd drupal/modules
-  - git clone --depth 1 --branch 8.x-1.x http://git.drupal.org/project/media_entity.git
   - ln -s $TRAVIS_BUILD_DIR
   - cd ../
   - ./vendor/bin/phpunit -c core modules/media_entity_instagram/tests/src/Unit
diff --git a/README.md b/README.md
index 18b114e..d2a06e4 100644
--- a/README.md
+++ b/README.md
@@ -1,50 +1,23 @@
-## About Media entity
-
-Media entity provides a 'base' entity for a media element. This is a very basic
-entity which can reference to all kinds of media-objects (local files, YouTube
-videos, tweets, CDN-files, ...). This entity only provides a relation between
-Drupal (because it is an entity) and the resource. You can reference to this
-entity within any other Drupal entity.
-
 ## About Media entity Instagram
 
-This module provides Instagram integration for Media entity (i.e. media type provider
+This module provides Instagram integration for Media (i.e. media type provider
 plugin).
 
 ### Instagram API
-This module uses Instagrams oembed API to fetch the instagram html and all the metadata.
-You will need to:
-
-- Create a Media bundle with the type provider "Instagram".
-- On that bundle create a field for the Instagram url/source (this should be a plain text or link field).
-- Return to the bundle configuration and set "Field with source information" to use that field.
-
-### Storing field values
-If you want to store the fields that are retrieved from Instagram you should create appropriate fields on the created media bundle (id) and map this to the fields provided by Instagram.php.
-
-**NOTE:** At the moment there is no GUI for that, so the only method of doing that for now is via CMI.
-
-This would be an example of that (the field_map section):
-
-```
-langcode: en
-status: true
-dependencies:
-  module:
-    - media_entity_instagram
-id: instagram
-label: Instagram
-description: 'Instagram photo/video to be used with content.'
-type: instagram
-type_configuration:
-  source_field: link
-field_map:
-  id: instagram_id
-  type: instagram_type
-  thumbnail: instagram_thumbnail
-  username: instagram_username
-  caption: instagram_caption
-```
+This module uses Instagrams oembed API to fetch the instagram html and all the
+metadata.
+
+After enabling the module, you can create a new Media Type choosing "Instagram"
+on the provider dropdown.
+
+A source field will be automatically created and configured on the Media Type if
+this is the first Instagram type on the site. If you need to have additional
+types, you can choose to reuse an existing field as source, or create one field
+per type. Source fields for the Instagram Media Type need to be plain text or
+link fields.
+
+Please refer to the Media documentation for more instructions on how to work
+with Media Types.
 
 Project page: http://drupal.org/project/media_entity_instagram
 
diff --git a/config/optional/core.entity_form_display.media.instagram.default.yml b/config/optional/core.entity_form_display.media.instagram.default.yml
new file mode 100644
index 0000000..ecb6b1e
--- /dev/null
+++ b/config/optional/core.entity_form_display.media.instagram.default.yml
@@ -0,0 +1,58 @@
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.field.media.instagram.field_media_instagram
+    - media.type.instagram
+  module:
+    - path
+id: media.instagram.default
+targetEntityType: media
+bundle: instagram
+mode: default
+content:
+  created:
+    type: datetime_timestamp
+    weight: 3
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  field_media_instagram:
+    type: string_textfield
+    weight: 1
+    region: content
+    settings:
+      size: 60
+      placeholder: ''
+    third_party_settings: {  }
+  name:
+    type: string_textfield
+    weight: 0
+    region: content
+    settings:
+      size: 60
+      placeholder: ''
+    third_party_settings: {  }
+  path:
+    type: path
+    weight: 4
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  status:
+    type: boolean_checkbox
+    settings:
+      display_label: true
+    weight: 5
+    region: content
+    third_party_settings: {  }
+  uid:
+    type: entity_reference_autocomplete
+    weight: 2
+    settings:
+      match_operator: CONTAINS
+      size: 60
+      placeholder: ''
+    region: content
+    third_party_settings: {  }
+hidden: {  }
diff --git a/config/optional/core.entity_view_display.media.instagram.default.yml b/config/optional/core.entity_view_display.media.instagram.default.yml
new file mode 100644
index 0000000..aa9dc13
--- /dev/null
+++ b/config/optional/core.entity_view_display.media.instagram.default.yml
@@ -0,0 +1,51 @@
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.field.media.instagram.field_media_instagram
+    - image.style.thumbnail
+    - media.type.instagram
+  module:
+    - image
+    - media_entity_instagram
+    - user
+id: media.instagram.default
+targetEntityType: media
+bundle: instagram
+mode: default
+content:
+  created:
+    label: hidden
+    type: timestamp
+    weight: 1
+    region: content
+    settings:
+      date_format: medium
+      custom_date_format: ''
+      timezone: ''
+    third_party_settings: {  }
+  field_media_instagram:
+    type: instagram_embed
+    weight: 0
+    region: content
+    label: above
+    settings:
+      width: null
+      hidecaption: false
+    third_party_settings: {  }
+  thumbnail:
+    type: image_url
+    weight: 3
+    label: hidden
+    settings:
+      image_style: thumbnail
+    region: content
+    third_party_settings: {  }
+  uid:
+    label: hidden
+    type: author
+    weight: 2
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+hidden: {  }
diff --git a/config/optional/field.field.media.instagram.field_media_instagram.yml b/config/optional/field.field.media.instagram.field_media_instagram.yml
new file mode 100644
index 0000000..04e2407
--- /dev/null
+++ b/config/optional/field.field.media.instagram.field_media_instagram.yml
@@ -0,0 +1,18 @@
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.storage.media.field_media_instagram
+    - media.type.instagram
+id: media.instagram.field_media_instagram
+field_name: field_media_instagram
+entity_type: media
+bundle: instagram
+label: Instagram
+description: ''
+required: true
+translatable: true
+default_value: {  }
+default_value_callback: ''
+settings: {  }
+field_type: string
diff --git a/config/optional/field.storage.media.field_media_instagram.yml b/config/optional/field.storage.media.field_media_instagram.yml
new file mode 100644
index 0000000..9de32f4
--- /dev/null
+++ b/config/optional/field.storage.media.field_media_instagram.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - media
+id: media.field_media_instagram
+field_name: field_media_instagram
+entity_type: media
+type: string
+settings:
+  max_length: 255
+  is_ascii: false
+  case_sensitive: false
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/optional/media.type.instagram.yml b/config/optional/media.type.instagram.yml
new file mode 100644
index 0000000..0c9b887
--- /dev/null
+++ b/config/optional/media.type.instagram.yml
@@ -0,0 +1,14 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - media_entity_instagram
+id: instagram
+label: Instagram
+description: 'Create media items from Instagram posts.'
+source: instagram
+queue_thumbnail_downloads: false
+new_revision: false
+source_configuration:
+  source_field: field_media_instagram
+field_map: {  }
diff --git a/config/schema/media_entity_instagram.schema.yml b/config/schema/media_entity_instagram.schema.yml
index 9d74d44..8a11bdf 100644
--- a/config/schema/media_entity_instagram.schema.yml
+++ b/config/schema/media_entity_instagram.schema.yml
@@ -6,13 +6,9 @@ media_entity_instagram.settings:
       type: string
       label: 'Base folder for thumbnails'
 
-media_entity.bundle.type.instagram:
-  type: mapping
-  label: 'Instagram type configuration'
-  mapping:
-    source_field:
-      type: string
-      label: 'Field with embed code/URL'
+media.source.instagram:
+  type: media.source.field_aware
+  label: '"Instagram" media source configuration'
 
 field.formatter.settings.instagram_embed:
   type: mapping
diff --git a/media_entity_instagram.info.yml b/media_entity_instagram.info.yml
index b5e17a7..6b5eaee 100644
--- a/media_entity_instagram.info.yml
+++ b/media_entity_instagram.info.yml
@@ -4,4 +4,4 @@ type: module
 package: Media
 core: 8.x
 dependencies:
-  - media_entity:media_entity
+  - drupal:media (>= 8.4.0)
diff --git a/media_entity_instagram.install b/media_entity_instagram.install
index f2cd589..6324677 100644
--- a/media_entity_instagram.install
+++ b/media_entity_instagram.install
@@ -10,6 +10,19 @@
  */
 function media_entity_instagram_install() {
   $source = drupal_get_path('module', 'media_entity_instagram') . '/images/icons';
-  $destination = \Drupal::config('media_entity.settings')->get('icon_base');
-  media_entity_copy_icons($source, $destination);
+  $destination = \Drupal::config('media.settings')->get('icon_base_uri');
+  file_prepare_directory($destination, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+
+  $files = file_scan_directory($source, '/.*\.(svg|png|jpg|jpeg|gif)$/');
+  foreach ($files as $file) {
+    // When reinstalling we don't want to copy the icons when
+    // they already exist. The icons could be replaced (by a contrib module or
+    // manually), so we don't want to replace the existing files. Removing the
+    // files when we uninstall could also be a problem if the files are
+    // referenced somewhere else. Since showing an error that it was not
+    // possible to copy the files is also confusing, we silently do nothing.
+    if (!file_exists($destination . DIRECTORY_SEPARATOR . $file->filename)) {
+      file_unmanaged_copy($file->uri, $destination, FILE_EXISTS_ERROR);
+    }
+  }
 }
diff --git a/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php b/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php
index 860be6f..359b472 100644
--- a/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php
@@ -3,12 +3,12 @@
 namespace Drupal\media_entity_instagram\Plugin\Field\FieldFormatter;
 
 use Drupal\Core\Field\FieldDefinitionInterface;
+use Drupal\Core\Field\FieldItemInterface;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\FormatterBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
-use Drupal\media_entity\EmbedCodeValueTrait;
-use Drupal\media_entity_instagram\Plugin\MediaEntity\Type\Instagram;
+use Drupal\media_entity_instagram\Plugin\media\Source\Instagram;
 use Drupal\media_entity_instagram\InstagramEmbedFetcher;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -25,12 +25,10 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  */
 class InstagramEmbedFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
 
-  use EmbedCodeValueTrait;
-
   /**
    * The instagram fetcher.
    *
-   * @var \Drupal\media_entity_instagram\Plugin\MediaEntity\Type\InstagramEmbedFetcher
+   * @var \Drupal\media_entity_instagram\InstagramEmbedFetcher
    */
   protected $fetcher;
 
@@ -155,4 +153,27 @@ class InstagramEmbedFormatter extends FormatterBase implements ContainerFactoryP
     return $summary;
   }
 
+  /**
+   * Extracts the raw embed code from input which may or may not be wrapped.
+   *
+   * @param mixed $value
+   *   The input value. Can be a normal string or a value wrapped by the
+   *   Typed Data API.
+   *
+   * @return string|null
+   *   The raw embed code.
+   */
+  protected function getEmbedCode($value) {
+    if (is_string($value)) {
+      return $value;
+    }
+    elseif ($value instanceof FieldItemInterface) {
+      $class = get_class($value);
+      $property = $class::mainPropertyName();
+      if ($property) {
+        return $value->$property;
+      }
+    }
+  }
+
 }
diff --git a/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php b/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php
index 1cd9516..367b7f3 100644
--- a/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php
+++ b/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php
@@ -2,8 +2,8 @@
 
 namespace Drupal\media_entity_instagram\Plugin\Validation\Constraint;
 
-use Drupal\media_entity\EmbedCodeValueTrait;
-use Drupal\media_entity_instagram\Plugin\MediaEntity\Type\Instagram;
+use Drupal\Core\Field\FieldItemInterface;
+use Drupal\media_entity_instagram\Plugin\media\Source\Instagram;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
 
@@ -12,27 +12,34 @@ use Symfony\Component\Validator\ConstraintValidator;
  */
 class InstagramEmbedCodeConstraintValidator extends ConstraintValidator {
 
-  use EmbedCodeValueTrait;
-
   /**
    * {@inheritdoc}
    */
   public function validate($value, Constraint $constraint) {
-    $value = $this->getEmbedCode($value);
-    if (!isset($value)) {
-      return;
+    $data = '';
+    if (is_string($value)) {
+      $data = $value;
     }
-
-    $matches = [];
-    foreach (Instagram::$validationRegexp as $pattern => $key) {
-      if (preg_match($pattern, $value, $item_matches)) {
-        $matches[] = $item_matches;
+    elseif ($value instanceof FieldItemInterface) {
+      $class = get_class($value);
+      $property = $class::mainPropertyName();
+      if ($property) {
+        $data = $value->{$property};
       }
     }
 
-    if (empty($matches)) {
-      $this->context->addViolation($constraint->message);
+    if ($data) {
+      $matches = [];
+      foreach (Instagram::$validationRegexp as $pattern => $key) {
+        if (preg_match($pattern, $data, $item_matches)) {
+          $matches[] = $item_matches;
+        }
+      }
+      if (empty($matches)) {
+        $this->context->addViolation($constraint->message);
+      }
     }
+
   }
 
 }
diff --git a/src/Plugin/MediaEntity/Type/Instagram.php b/src/Plugin/media/Source/Instagram.php
similarity index 63%
rename from src/Plugin/MediaEntity/Type/Instagram.php
rename to src/Plugin/media/Source/Instagram.php
index 1a97d90..b2cc3fb 100644
--- a/src/Plugin/MediaEntity/Type/Instagram.php
+++ b/src/Plugin/media/Source/Instagram.php
@@ -1,13 +1,14 @@
 <?php
 
-namespace Drupal\media_entity_instagram\Plugin\MediaEntity\Type;
+namespace Drupal\media_entity_instagram\Plugin\media\Source;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Entity\EntityFieldManagerInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\media_entity\MediaInterface;
-use Drupal\media_entity\MediaTypeBase;
+use Drupal\Core\Field\FieldTypePluginManagerInterface;
+use Drupal\media\MediaInterface;
+use Drupal\media\MediaSourceBase;
+use Drupal\media\MediaSourceFieldConstraintsInterface;
 use Drupal\media_entity_instagram\InstagramEmbedFetcher;
 use GuzzleHttp\Client;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -15,20 +16,15 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 /**
  * Provides media type plugin for Instagram.
  *
- * @MediaType(
+ * @MediaSource(
  *   id = "instagram",
  *   label = @Translation("Instagram"),
- *   description = @Translation("Provides business logic and metadata for Instagram.")
+ *   description = @Translation("Provides business logic and metadata for Instagram."),
+ *   allowed_field_types = {"string", "string_long", "link"},
+ *   default_thumbnail_filename = "instagram.png"
  * )
  */
-class Instagram extends MediaTypeBase {
-
-  /**
-   * Config factory service.
-   *
-   * @var \Drupal\Core\Config\ConfigFactoryInterface
-   */
-  protected $configFactory;
+class Instagram extends MediaSourceBase implements MediaSourceFieldConstraintsInterface {
 
   /**
    * The instagram fetcher.
@@ -59,14 +55,15 @@ class Instagram extends MediaTypeBase {
    *   Entity field manager service.
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   Config factory service.
+   * @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager
+   *   The field type plugin manager service.
    * @param \Drupal\media_entity_instagram\InstagramEmbedFetcher $fetcher
    *   Instagram fetcher service.
    * @param \GuzzleHttp\Client $httpClient
    *   Guzzle client.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, ConfigFactoryInterface $config_factory, InstagramEmbedFetcher $fetcher, Client $httpClient) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager, $config_factory->get('media_entity.settings'));
-    $this->configFactory = $config_factory;
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, ConfigFactoryInterface $config_factory, FieldTypePluginManagerInterface $field_type_manager, InstagramEmbedFetcher $fetcher, Client $httpClient) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager, $field_type_manager, $config_factory);
     $this->fetcher = $fetcher;
     $this->httpClient = $httpClient;
   }
@@ -82,6 +79,7 @@ class Instagram extends MediaTypeBase {
       $container->get('entity_type.manager'),
       $container->get('entity_field.manager'),
       $container->get('config.factory'),
+      $container->get('plugin.manager.field.field_type'),
       $container->get('media_entity_instagram.instagram_embed_fetcher'),
       $container->get('http_client')
     );
@@ -100,7 +98,7 @@ class Instagram extends MediaTypeBase {
   /**
    * {@inheritdoc}
    */
-  public function providedFields() {
+  public function getMetadataAttributes() {
     return [
       'shortcode' => $this->t('Instagram shortcode'),
       'id' => $this->t('Media ID'),
@@ -116,20 +114,41 @@ class Instagram extends MediaTypeBase {
   /**
    * {@inheritdoc}
    */
-  public function getField(MediaInterface $media, $name) {
+  public function getMetadata(MediaInterface $media, $attribute_name) {
+    if ($attribute_name == 'default_name') {
+      // Try to get some fields that need the API, if not available, just use
+      // the shortcode as default name.
+      $username = $this->getMetadata($media, 'username');
+      $id = $this->getMetadata($media, 'id');
+      if ($username && $id) {
+        return $username . ' - ' . $id;
+      }
+      else {
+        $code = $this->getMetadata($media, 'shortcode');
+        if (!empty($code)) {
+          return $code;
+        }
+      }
+      // Fallback to the parent's default name if everything else failed.
+      return parent::getMetadata($media, 'default_name');
+    }
+    elseif ($attribute_name == 'thumbnail_uri') {
+      return parent::getMetadata($media, 'thumbnail_uri');
+    }
+
     $matches = $this->matchRegexp($media);
 
     if (!$matches['shortcode']) {
       return FALSE;
     }
 
-    if ($name == 'shortcode') {
+    if ($attribute_name == 'shortcode') {
       return $matches['shortcode'];
     }
 
     // If we have auth settings return the other fields.
     if ($instagram = $this->fetcher->fetchInstagramEmbed($matches['shortcode'])) {
-      switch ($name) {
+      switch ($attribute_name) {
         case 'id':
           if (isset($instagram['media_id'])) {
             return $instagram['media_id'];
@@ -146,7 +165,7 @@ class Instagram extends MediaTypeBase {
           return 'http://instagram.com/p/' . $matches['shortcode'] . '/media/?size=m';
 
         case 'thumbnail_local':
-          $local_uri = $this->getField($media, 'thumbnail_local_uri');
+          $local_uri = $this->getMetadata($media, 'thumbnail_local_uri');
 
           if ($local_uri) {
             if (file_exists($local_uri)) {
@@ -157,7 +176,7 @@ class Instagram extends MediaTypeBase {
               $directory = dirname($local_uri);
               file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
 
-              $image_url = $this->getField($media, 'thumbnail');
+              $image_url = $this->getMetadata($media, 'thumbnail');
 
               $response = $this->httpClient->get($image_url);
               if ($response->getStatusCode() == 200) {
@@ -194,49 +213,14 @@ class Instagram extends MediaTypeBase {
   /**
    * {@inheritdoc}
    */
-  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
-    $options = [];
-    $bundle = $form_state->getFormObject()->getEntity();
-    $allowed_field_types = ['string', 'string_long', 'link'];
-    foreach ($this->entityFieldManager->getFieldDefinitions('media', $bundle->id()) as $field_name => $field) {
-      if (in_array($field->getType(), $allowed_field_types) && !$field->getFieldStorageDefinition()->isBaseField()) {
-        $options[$field_name] = $field->getLabel();
-      }
-    }
-
-    $form['source_field'] = [
-      '#type' => 'select',
-      '#title' => $this->t('Field with source information'),
-      '#description' => $this->t('Field on media entity that stores Instagram embed code or URL. You can create a bundle without selecting a value for this dropdown initially. This dropdown can be populated after adding fields to the bundle.'),
-      '#default_value' => empty($this->configuration['source_field']) ? NULL : $this->configuration['source_field'],
-      '#options' => $options,
-    ];
-
-    return $form;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function attachConstraints(MediaInterface $media) {
-    parent::attachConstraints($media);
-
-    if (isset($this->configuration['source_field'])) {
-      $source_field_name = $this->configuration['source_field'];
-      if ($media->hasField($source_field_name)) {
-        foreach ($media->get($source_field_name) as &$embed_code) {
-          /** @var \Drupal\Core\TypedData\DataDefinitionInterface $typed_data */
-          $typed_data = $embed_code->getDataDefinition();
-          $typed_data->addConstraint('InstagramEmbedCode');
-        }
-      }
-    }
+  public function getSourceFieldConstraints() {
+    return ['InstagramEmbedCode' => []];
   }
 
   /**
    * Runs preg_match on embed code/URL.
    *
-   * @param \Drupal\media_entity\MediaInterface $media
+   * @param \Drupal\media\MediaInterface $media
    *   Media object.
    *
    * @return array|bool
@@ -261,43 +245,4 @@ class Instagram extends MediaTypeBase {
     return FALSE;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getDefaultThumbnail() {
-    return $this->config->get('icon_base') . '/instagram.png';
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function thumbnail(MediaInterface $media) {
-    if ($local_image = $this->getField($media, 'thumbnail_local')) {
-      return $local_image;
-    }
-
-    return $this->getDefaultThumbnail();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getDefaultName(MediaInterface $media) {
-    // Try to get some fields that need the API, if not available, just use the
-    // shortcode as default name.
-    $username = $this->getField($media, 'username');
-    $id = $this->getField($media, 'id');
-    if ($username && $id) {
-      return $username . ' - ' . $id;
-    }
-    else {
-      $code = $this->getField($media, 'shortcode');
-      if (!empty($code)) {
-        return $code;
-      }
-    }
-
-    return parent::getDefaultName($media);
-  }
-
 }
diff --git a/src/Tests/InstagramEmbedFormatterTest.php b/src/Tests/InstagramEmbedFormatterTest.php
deleted file mode 100644
index 0e1e167..0000000
--- a/src/Tests/InstagramEmbedFormatterTest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-<?php
-
-namespace Drupal\media_entity_instagram\Tests;
-
-use Drupal\simpletest\WebTestBase;
-use Drupal\media_entity\Tests\MediaTestTrait;
-
-/**
- * Tests for Instagram embed formatter.
- *
- * @group media_entity_instagram
- */
-class InstagramEmbedFormatterTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = [
-    'media_entity_instagram',
-    'media_entity',
-    'node',
-    'field_ui',
-    'views_ui',
-    'block',
-  ];
-
-  use MediaTestTrait;
-
-  /**
-   * The test user.
-   *
-   * @var \Drupal\User\UserInterface
-   */
-  protected $adminUser;
-
-  /**
-   * Media entity machine id.
-   *
-   * @var string
-   */
-  protected $mediaId = 'instagram';
-
-  /**
-   * The test media bundle.
-   *
-   * @var \Drupal\media_entity\MediaBundleInterface
-   */
-  protected $testBundle;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $bundle['bundle'] = $this->mediaId;
-    $this->testBundle = $this->drupalCreateMediaBundle($bundle, 'instagram');
-    $this->drupalPlaceBlock('local_actions_block');
-    $this->adminUser = $this->drupalCreateUser([
-      'administer media',
-      'administer media bundles',
-      'administer media fields',
-      'administer media form display',
-      'administer media display',
-      // Media entity permissions.
-      'view media',
-      'create media',
-      'update media',
-      'update any media',
-      'delete media',
-      'delete any media',
-      // Other permissions.
-      'administer views',
-    ]);
-    $this->drupalLogin($this->adminUser);
-  }
-
-  /**
-   * Tests adding and editing an instagram embed formatter.
-   */
-  public function testManageFieldFormatter() {
-    // Test and create one media bundle.
-    $bundle = $this->testBundle;
-
-    // Assert that the media bundle has the expected values before proceeding.
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id());
-    $this->assertFieldByName('label', $bundle->label());
-    $this->assertFieldByName('type', 'instagram');
-
-    // Add and save field settings (Embed code).
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id() . '/fields/add-field');
-    $edit_conf = [
-      'new_storage_type' => 'string_long',
-      'label' => 'Embed code',
-      'field_name' => 'embed_code',
-    ];
-    $this->drupalPostForm(NULL, $edit_conf, t('Save and continue'));
-    $this->assertText('These settings apply to the ' . $edit_conf['label'] . ' field everywhere it is used.');
-    $edit = [
-      'cardinality' => 'number',
-      'cardinality_number' => '1',
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save field settings'));
-    $this->assertText('Updated field ' . $edit_conf['label'] . ' field settings.');
-
-    // Set the new field as required.
-    $edit = [
-      'required' => TRUE,
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save settings'));
-    $this->assertText('Saved ' . $edit_conf['label'] . ' configuration.');
-
-    // Assert that the new field configuration has been successfully saved.
-    $xpath = $this->xpath('//*[@id="field-embed-code"]');
-    $this->assertEqual((string) $xpath[0]->td[0], 'Embed code');
-    $this->assertEqual((string) $xpath[0]->td[1], 'field_embed_code');
-    $this->assertEqual((string) $xpath[0]->td[2]->a, 'Text (plain, long)');
-
-    // Test if edit worked and if new field values have been saved as
-    // expected.
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id());
-    $this->assertFieldByName('label', $bundle->label());
-    $this->assertFieldByName('type', 'instagram');
-    $this->assertFieldByName('type_configuration[instagram][source_field]', 'field_embed_code');
-    $this->drupalPostForm(NULL, NULL, t('Save media bundle'));
-    $this->assertText('The media bundle ' . $bundle->label() . ' has been updated.');
-    $this->assertText($bundle->label());
-
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id() . '/display');
-
-    // Set and save the settings of the new field.
-    $edit = [
-      'fields[field_embed_code][label]' => 'above',
-      'fields[field_embed_code][type]' => 'instagram_embed',
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save'));
-    $this->assertText('Your settings have been saved.');
-
-    // First set absolute size of the embed.
-    $this->drupalPostAjaxForm(NULL, [], 'field_embed_code_settings_edit');
-    $edit = [
-      'fields[field_embed_code][settings_edit_form][settings][hidecaption]' => FALSE,
-    ];
-    $this->drupalPostAjaxForm(NULL, $edit, 'field_embed_code_plugin_settings_update');
-    $this->drupalPostForm(NULL, [], t('Save'));
-    $this->assertText('Your settings have been saved.');
-    $this->assertText('Caption: Visible');
-
-    // Create and save the media with an instagram media code.
-    $this->drupalGet('media/add/' . $bundle->id());
-
-    // Example instagram from https://www.instagram.com/developer/embedding/
-    $instagram = 'https://www.instagram.com/p/bNd86MSFv6/';
-
-    $edit = [
-      'name[0][value]' => 'My test instagram',
-      'field_embed_code[0][value]' => $instagram,
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save and publish'));
-
-    // Assert that the media has been successfully saved.
-    $this->assertText('My test instagram');
-    $this->assertText('Embed code');
-
-    // Assert that the formatter exists on this page and that it has absolute
-    // size.
-    $this->assertFieldByXPath('//blockquote');
-    $this->assertRaw('platform.instagram.com/en_US/embeds.js');
-  }
-
-}
diff --git a/tests/src/Unit/ConstraintsTest.php b/tests/src/Unit/ConstraintsTest.php
index f15f003..0d59344 100644
--- a/tests/src/Unit/ConstraintsTest.php
+++ b/tests/src/Unit/ConstraintsTest.php
@@ -11,7 +11,7 @@ use Drupal\Tests\UnitTestCase;
 /**
  * Tests media_entity_instagram constrains.
  *
- * @group media_entity
+ * @group media
  */
 class ConstraintsTest extends UnitTestCase {
 
