diff --git a/src/Controller/VideoFilter.php b/src/Controller/VideoFilter.php
index 80641dc..27be962 100644
--- a/src/Controller/VideoFilter.php
+++ b/src/Controller/VideoFilter.php
@@ -8,8 +8,6 @@
 namespace Drupal\video_filter\Controller;
 
 use Drupal\Core\Controller\ControllerBase;
-use Drupal\Core\Url;
-use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
 
 /**
  * Returns responses for Video Filter module routes.
diff --git a/src/Form/VideoFilterDialog.php b/src/Form/VideoFilterDialog.php
index 1f1947d..0fbdec9 100644
--- a/src/Form/VideoFilterDialog.php
+++ b/src/Form/VideoFilterDialog.php
@@ -12,8 +12,6 @@ use Drupal\Core\Form\FormStateInterface;
 use Drupal\filter\Entity\FilterFormat;
 use Drupal\Core\Ajax\AjaxResponse;
 use Drupal\Core\Ajax\HtmlCommand;
-use Drupal\Core\Ajax\InvokeCommand;
-use Drupal\Core\Ajax\UpdateBuildIdCommand;
 use Drupal\editor\Ajax\EditorDialogSave;
 use Drupal\Core\Ajax\CloseModalDialogCommand;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
diff --git a/src/Plugin/Filter/VideoFilter.php b/src/Plugin/Filter/VideoFilter.php
index 6e4bf7a..e5f66c9 100644
--- a/src/Plugin/Filter/VideoFilter.php
+++ b/src/Plugin/Filter/VideoFilter.php
@@ -179,7 +179,7 @@ class VideoFilter extends FilterBase implements ContainerInjectionInterface {
               '#theme' => 'video_filter_iframe',
               '#video' => $video,
             ];
-            $replacement = drupal_render($element);
+            $replacement = \Drupal::service('renderer')->render($element);
           }
           // flash
           elseif (!empty($flash['src'])) {
@@ -197,7 +197,7 @@ class VideoFilter extends FilterBase implements ContainerInjectionInterface {
               '#theme' => 'video_filter_flash',
               '#video' => $video,
             ];
-            $replacement = drupal_render($element);
+            $replacement = \Drupal::service('renderer')->render($element);
           }
           // html
           elseif (!empty($html)) {
@@ -206,7 +206,7 @@ class VideoFilter extends FilterBase implements ContainerInjectionInterface {
               '#theme' => 'video_filter_html',
               '#video' => $video,
             ];
-            $replacement = drupal_render($element);
+            $replacement = \Drupal::service('renderer')->render($element);
           }
           else {
             // Plugin doesn't exists
diff --git a/src/Plugin/VideoFilter/Slideshare.php b/src/Plugin/VideoFilter/Slideshare.php
index c56c5e1..d45dac3 100755
--- a/src/Plugin/VideoFilter/Slideshare.php
+++ b/src/Plugin/VideoFilter/Slideshare.php
@@ -7,7 +7,6 @@
 namespace Drupal\video_filter\Plugin\VideoFilter;
 
 use Drupal\video_filter\VideoFilterBase;
-use Drupal\Core\StringTranslation\StringTranslationTrait;
 
 /**
  * Provides Slideshare codec for Video Filter
diff --git a/src/Tests/VideoFilterBasicTest.php b/src/Tests/VideoFilterBasicTest.php
index bf9b570..e720084 100644
--- a/src/Tests/VideoFilterBasicTest.php
+++ b/src/Tests/VideoFilterBasicTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\video_filter\Tests;
 
-use Drupal\Core\Session\AccountInterface;
 use Drupal\simpletest\WebTestBase;
 
 /**
