diff --git a/sharethis.module b/sharethis.module
index 718e126..a877217 100644
--- a/sharethis.module
+++ b/sharethis.module
@@ -60,7 +60,7 @@ function sharethis_entity_extra_field_info() {
   $extra = array();
   // Only add extra fields if the location is the node content.
   if ($sharethis_settings->get('location') == 'content') {
-    $entity_info = \Drupal::entityManager()->getAllBundleInfo('node');
+    $entity_info = \Drupal::service('entity_type.bundle.info')->getAllBundleInfo();
     if (isset($entity_info['node'])) {
       foreach ($entity_info['node'] as $bundle => $bundle_info) {
         $extra['node'][$bundle]['display'] = array(
@@ -97,7 +97,7 @@ function sharethis_node_view(array &$build, EntityInterface $node, EntityViewDis
   $data_options = $sharethis_manager->getOptions();
 
   // Get the full path to insert into the Share Buttons.
-  $path = $node->urlInfo();
+  $path = $node->toUrl();
   $path = $path->getInternalPath();
   global $base_url;
   $path_obj = Url::fromUri($base_url . '/' . $path,
diff --git a/sharethis.services.yml b/sharethis.services.yml
index 19668ba..bff458e 100644
--- a/sharethis.services.yml
+++ b/sharethis.services.yml
@@ -3,4 +3,4 @@ services:
     class: Drupal\sharethis\SharethisManager
     tags:
       - {name: sharethis_manager}
-    arguments: ['@config.factory', '@title_resolver']
+    arguments: ['@config.factory', '@title_resolver', '@renderer', '@current_route_match', '@request_stack']
diff --git a/src/Form/SharethisConfigurationForm.php b/src/Form/SharethisConfigurationForm.php
index 959961f..e25c3bb 100644
--- a/src/Form/SharethisConfigurationForm.php
+++ b/src/Form/SharethisConfigurationForm.php
@@ -10,12 +10,15 @@ namespace Drupal\sharethis\Form;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\Entity\EntityDisplayRepositoryInterface;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
+use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\sharethis\SharethisManagerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 
 /**
  * Provides a settings for sharethis module.
@@ -30,11 +33,25 @@ class SharethisConfigurationForm extends ConfigFormBase {
   protected $moduleHandler;
 
   /**
-   * The entity manager.
+   * The entity type Bundle Information.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface
+   * @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface
    */
-  protected $entityManager;
+  protected $entityTypeBundleInfo;
+
+  /**
+   * The entity display Repository.
+   *
+   * @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface
+   */
+  protected $entityDisplayRepository;
+
+  /**
+   * The entity field Manager.
+   *
+   * @var \Drupal\Core\Entity\EntityFieldManagerInterface
+   */
+  protected $entityFieldManager;
 
   /**
    * The sharethis manager.
@@ -50,14 +67,22 @@ class SharethisConfigurationForm extends ConfigFormBase {
    *   The factory for configuration objects.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
+   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface
+   *   The entity type bundle information.
+   * @param \Drupal\Core\Entity\EntityDisplayRepositoryInterface
+   *   The entity display Repository.
+   * @param \Drupal\Core\Entity\EntityFieldManagerInterface
+   *   The entity field Manager.
    * @param \Drupal\sharethis\SharethisManagerInterface $sharethis_manager
    *   The sharethis Manager.
    */
-  public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, EntityManagerInterface $entity_manager, SharethisManagerInterface $sharethis_manager) {
+  public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityDisplayRepositoryInterface $entity_display_repository, EntityFieldManagerInterface $entity_field_manager, SharethisManagerInterface $sharethis_manager) {
     parent::__construct($config_factory);
 
     $this->moduleHandler = $module_handler;
-    $this->entityManager = $entity_manager;
+    $this->entityTypeBundleInfo = $entity_type_bundle_info;
+    $this->entityDisplayRepository = $entity_display_repository;
+    $this->entityFieldManager = $entity_field_manager;
     $this->sharethisManager = $sharethis_manager;
   }
 
@@ -68,7 +93,10 @@ class SharethisConfigurationForm extends ConfigFormBase {
     return new static(
       $container->get('config.factory'),
       $container->get('module_handler'),
-      $container->get('entity.manager'),
+      $container->get('entity_type.manager'),
+      $container->get('entity_type.bundle.info'),
+      $container->get('entity_display.repository'),
+      $container->get('entity_field.manager'),
       $container->get('sharethis.manager')
     );
   }
@@ -201,9 +229,9 @@ class SharethisConfigurationForm extends ConfigFormBase {
     );
     // Add help text for the 'block' location.
     $form['context']['block']['#children'] = 'You must choose which region to display the in from the Blocks administration';
-    $entity_bundles = $this->entityManager->getBundleInfo('node');
+    $entity_bundles = $this->entityTypeBundleInfo->getBundleInfo('node');
     // Add checkboxes for each view mode of each bundle.
-    $entity_modes = $this->entityManager->getViewModes('node');
+    $entity_modes = $this->entityDisplayRepository->getViewModes('node');
     ;
     $modes = array();
     foreach ($entity_modes as $mode => $mode_info) {
@@ -375,9 +403,9 @@ class SharethisConfigurationForm extends ConfigFormBase {
     $current_location = $config->get('location');
     $new_location = $values['location'];
     if (($current_location == 'content' || $new_location == 'content') && $current_location != $new_location) {
-      $this->entityManager->clearCachedFieldDefinitions();
+      $this->entityFieldManager->clearCachedFieldDefinitions();
     }
-    $entity_info = \Drupal::entityManager()->getAllBundleInfo('node');
+    $entity_info = $this->entityTypeBundleInfo->getAllBundleInfo('node');
     if (isset($entity_info['node'])) {
       $entity_types = $entity_info['node'];
     }
diff --git a/src/Plugin/Block/SharethisWidgetBlock.php b/src/Plugin/Block/SharethisWidgetBlock.php
index de10279..ae6a4f7 100644
--- a/src/Plugin/Block/SharethisWidgetBlock.php
+++ b/src/Plugin/Block/SharethisWidgetBlock.php
@@ -8,6 +8,7 @@
 namespace Drupal\sharethis\Plugin\Block;
 
 use Drupal\Core\Block\BlockBase;
+use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Config\Config;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -41,6 +42,13 @@ class SharethisWidgetBlock extends BlockBase implements ContainerFactoryPluginIn
   protected $sharethisManager;
 
   /**
+   * The Config factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactory
+   */
+  protected $configFactory;
+
+  /**
    * Constructs an SharethisBlock object.
    *
    * @param array $configuration
@@ -52,12 +60,15 @@ class SharethisWidgetBlock extends BlockBase implements ContainerFactoryPluginIn
    * @param \Drupal\Core\Config\Config $sharethis_settings
    *   The config object for 'sharethis.settings'.
    * @param \Drupal\sharethis\SharethisManagerInterface $sharethis_manager
-   *   The module manager service.
+   *   The sharethis manager service.
+   * @param \Drupal\Core\Config\ConfigFactory $config_factory
+   *   The Config factory.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, Config $sharethis_settings, SharethisManagerInterface $sharethis_manager) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, Config $sharethis_settings, SharethisManagerInterface $sharethis_manager, ConfigFactory $config_factory) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->sharethisSettings = $sharethis_settings;
     $this->sharethisManager = $sharethis_manager;
+    $this->configFactory = $config_factory;
   }
 
   /**
@@ -69,7 +80,8 @@ class SharethisWidgetBlock extends BlockBase implements ContainerFactoryPluginIn
       $plugin_id,
       $plugin_definition,
       $container->get('config.factory')->get('sharethis.settings'),
-      $container->get('sharethis.manager')
+      $container->get('sharethis.manager'),
+      $container->get('config.factory')
     );
   }
 
@@ -135,7 +147,7 @@ class SharethisWidgetBlock extends BlockBase implements ContainerFactoryPluginIn
         $mpath = $this->configuration['sharethis_path_external'];
       }
       else {
-        $current_path = \Drupal::url('<current>');
+        $current_path = Url::fromRoute('<current>')->toString();
         $path = ($this->configuration['sharethis_path'] == 'global') ? '<front>' : $current_path;
 
         global $base_url;
@@ -151,7 +163,7 @@ class SharethisWidgetBlock extends BlockBase implements ContainerFactoryPluginIn
       $title = \Drupal::service('title_resolver')
         ->getTitle($request, $route_match->getRouteObject());
       $title = is_object($title) ? $title->getUntranslatedString() : $title;
-      $mtitle = ($this->configuration['sharethis_path'] == 'current') ? $title : \Drupal::config('system.site')
+      $mtitle = ($this->configuration['sharethis_path'] == 'current') ? $title : $this->configFactory->get('system.site')
         ->get('name');
       $markup = $this->sharethisManager->widgetContents(array(
         'm_path' => $mpath,
diff --git a/src/Plugin/Views/field/SharethisNode.php b/src/Plugin/Views/field/SharethisNode.php
index f89feb3..0bc6d5a 100644
--- a/src/Plugin/Views/field/SharethisNode.php
+++ b/src/Plugin/Views/field/SharethisNode.php
@@ -6,9 +6,12 @@
  */
 
 namespace Drupal\sharethis\Plugin\views\field;
+
 use Drupal\Core\Url;
+use Drupal\sharethis\SharethisManagerInterface;
 use Drupal\views\ResultRow;
 use Drupal\views\Plugin\views\field\FieldPluginBase;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Field handler to display the number of new comments.
@@ -20,6 +23,42 @@ use Drupal\views\Plugin\views\field\FieldPluginBase;
 class SharethisNode extends FieldPluginBase {
 
   /**
+   * The Sharethis Manager.
+   *
+   * @var \Drupal\sharethis\SharethisManager
+   */
+  protected $sharethisManager;
+
+  /**
+   * Constructs an SharethisNode object.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param mixed $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Drupal\sharethis\SharethisManagerInterface $sharethis_manager
+   *   The sharethis manager service.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, SharethisManagerInterface $sharethis_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->sharethisManager = $sharethis_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('sharethis.manager')
+    );
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function query() {
@@ -31,10 +70,10 @@ class SharethisNode extends FieldPluginBase {
    * {@inheritdoc}
    */
   public function render(ResultRow $values) {
-    $sharethis_manager = \Drupal::service('sharethis.manager');
+    $sharethis_manager = $this->sharethisManager;
     $node = $values->_entity;
     $m_title = $node->getTitle();
-    $path = $node->urlInfo();
+    $path = $node->toUrl();
     $path = $path->getInternalPath();
     global $base_url;
     $path_obj = Url::fromUri($base_url . '/' . $path,
diff --git a/src/SharethisManager.php b/src/SharethisManager.php
index f173901..408ad06 100644
--- a/src/SharethisManager.php
+++ b/src/SharethisManager.php
@@ -7,12 +7,15 @@
 namespace Drupal\sharethis;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\Render\RendererInterface;
+use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Url;
 use Drupal\node\Entity\NodeType;
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Serialization\Json;
 use Drupal\Core\Controller\TitleResolverInterface;
+use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
  * Defines an SharethisManager service.
@@ -34,16 +37,42 @@ class SharethisManager implements SharethisManagerInterface {
   protected $titleResolver;
 
   /**
+   * The renderer service.
+   *
+   * @var \Drupal\Core\Render\RendererInterface
+   */
+  protected $renderer;
+
+  /**
+   * The currently active route match object.
+   *
+   * @var \Drupal\Core\Routing\RouteMatchInterface
+   */
+  protected $routeMatch;
+
+  /**
+   * The request Stack object.
+   *
+   * @var \Symfony\Component\HttpFoundation\Request
+   */
+  protected $requestStack;
+
+  /**
    * Constructs an SharethisManager object.
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   The Configuration Factory.
    * @param \Drupal\Core\Controller\TitleResolverInterface $title_resolver
    *   The Title Resolver.
+   * @param \Drupal\Core\Render\RendererInterface $renderer
+   *   The renderer service.
    */
-  public function __construct(ConfigFactoryInterface $config_factory, TitleResolverInterface $title_resolver) {
+  public function __construct(ConfigFactoryInterface $config_factory, TitleResolverInterface $title_resolver, RendererInterface $renderer, RouteMatchInterface $route_match, RequestStack $request_stack) {
     $this->configFactory = $config_factory;
     $this->titleResolver = $title_resolver;
+    $this->renderer = $renderer;
+    $this->routeMatch = $route_match;
+    $this->requestStack = $request_stack;
   }
 
   /**
@@ -88,7 +117,7 @@ class SharethisManager implements SharethisManagerInterface {
     if ($sharethis_config->get('location') == 'block') {
       // First Get all of the options for sharethis widget from database.
       $data_options = $this->getOptions();
-      $current_path = \Drupal::routeMatch()->getRouteName() ? Url::fromRouteMatch(\Drupal::routeMatch())->getInternalPath() : '';
+      $current_path = $this->routeMatch->getRouteName() ? Url::fromRouteMatch($this->routeMatch)->getInternalPath() : '';
       $path = isset($current_path) ? $current_path : '<front>';
       global $base_url;
       $path_obj = Url::fromUri($base_url . '/' . $path,
@@ -97,9 +126,7 @@ class SharethisManager implements SharethisManagerInterface {
         )
       );
       $m_path = $path_obj->toString();
-      $request = \Drupal::request();
-      $route_match = \Drupal::routeMatch();
-      $mtitle = $this->titleResolver->getTitle($request, $route_match->getRouteObject());
+      $mtitle = $this->titleResolver->getTitle($this->requestStack->getCurrentRequest(), $this->routeMatch->getRouteObject());
       $m_title = is_object($mtitle) ? $mtitle->getUntranslatedString() : $config->get('name');
       return $this->renderSpans($data_options, $m_title, $m_path);
 
@@ -244,7 +271,7 @@ class SharethisManager implements SharethisManagerInterface {
         '#value' => '',
       );
       // Render the span tag.
-      $st_spans .= drupal_render($meta_generator);
+      $st_spans .= $this->renderer->render($meta_generator);
     }
 
     return [
