diff --git a/menu_trail_by_path.services.yml b/menu_trail_by_path.services.yml
index 5515328..34a80f6 100644
--- a/menu_trail_by_path.services.yml
+++ b/menu_trail_by_path.services.yml
@@ -1,13 +1,4 @@
 services:
-  menu_trail_by_path.menu_tree_storage:
-    class: Drupal\menu_trail_by_path\Menu\MenuTreeStorage
-    arguments: ['@database', '@cache.menu', '@cache_tags.invalidator', 'menu_tree']
-    public: false  # Private to plugin.manager.menu.link and menu.link_tree
-    tags:
-      - { name: backend_overridable }
   menu_trail_by_path.path_helper:
     class: Drupal\menu_trail_by_path\Path\CurrentPathHelper
-    arguments: ['@current_route_match', '@router.request_context']
-  menu_trail_by_path.menu_helper:
-    class: Drupal\menu_trail_by_path\Menu\MenuTreeStorageMenuHelper
-    arguments: ['@plugin.manager.menu.link', '@menu_trail_by_path.menu_tree_storage']
+    arguments: ['@current_route_match', '@router.request_context']
\ No newline at end of file
diff --git a/src/Menu/MenuHelperInterface.php b/src/Menu/MenuHelperInterface.php
deleted file mode 100644
index 997f4b9..0000000
--- a/src/Menu/MenuHelperInterface.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-namespace Drupal\menu_trail_by_path\Menu;
-
-interface MenuHelperInterface {
-  /**
-   * @param $menu_name
-   * @return \Drupal\Core\Menu\MenuLinkInterface[]
-   */
-  public function getMenuLinks($menu_name);
-}
diff --git a/src/Menu/MenuTreeStorage.php b/src/Menu/MenuTreeStorage.php
deleted file mode 100644
index 4540b59..0000000
--- a/src/Menu/MenuTreeStorage.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-namespace Drupal\menu_trail_by_path\Menu;
-
-use Drupal\Core\Menu\MenuTreeStorage AS CoreMenuTreeStorage;
-use Drupal\Core\Menu\MenuTreeStorageInterface;
-
-class MenuTreeStorage extends CoreMenuTreeStorage implements MenuTreeStorageInterface {
-  /**
-   * Same as parent, but with ordering
-   *
-   * {@inheritdoc}
-   */
-  public function loadByProperties(array $properties) {
-    $query = $this->connection->select($this->table, $this->options);
-    $query->fields($this->table, $this->definitionFields());
-    foreach ($properties as $name => $value) {
-      if (!in_array($name, $this->definitionFields(), TRUE)) {
-        $fields = implode(', ', $this->definitionFields());
-        throw new \InvalidArgumentException("An invalid property name, $name was specified. Allowed property names are: $fields.");
-      }
-      $query->condition($name, $value);
-    }
-    // Make the ordering deterministic.
-    $query->orderBy('depth');
-    $query->orderBy('weight');
-    $query->orderBy('id');
-    $loaded = $this->safeExecuteSelect($query)->fetchAllAssoc('id', \PDO::FETCH_ASSOC);
-    foreach ($loaded as $id => $link) {
-      $loaded[$id] = $this->prepareLink($link);
-    }
-    return $loaded;
-  }
-}
diff --git a/src/Menu/MenuTreeStorageMenuHelper.php b/src/Menu/MenuTreeStorageMenuHelper.php
deleted file mode 100644
index 03f3d66..0000000
--- a/src/Menu/MenuTreeStorageMenuHelper.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-namespace Drupal\menu_trail_by_path\Menu;
-
-use Drupal\Core\Menu\MenuLinkManagerInterface;
-use Drupal\Core\Menu\MenuTreeStorageInterface;
-
-class MenuTreeStorageMenuHelper implements MenuHelperInterface {
-  /**
-   * @var MenuLinkManagerInterface
-   */
-  protected $menuLinkManager;
-
-  /**
-   * @var MenuTreeStorageInterface
-   */
-  protected $menuTreeStorage;
-
-  /**
-   * MenuTreeStorageMenuHelper constructor.
-   * @param \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager
-   * @param \Drupal\Core\Menu\MenuTreeStorageInterface $menu_tree_storage
-   */
-  public function __construct(MenuLinkManagerInterface $menu_link_manager, MenuTreeStorageInterface $menu_tree_storage) {
-    $this->menuLinkManager = $menu_link_manager;
-    $this->menuTreeStorage = $menu_tree_storage;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getMenuLinks($menu_name) {
-    // nice to have: implement filtering like public/core/lib/Drupal/Core/Menu/MenuLinkTree.php:153
-    $menu_links    = [];
-    $menu_plugins = $this->menuTreeStorage->loadByProperties(['menu_name' => $menu_name]);
-    foreach ($menu_plugins as $plugin_id => $definition) {
-      $menu_links[$plugin_id] = $this->menuLinkManager->createInstance($plugin_id);
-    }
-    return $menu_links;
-  }
-}
diff --git a/src/MenuTrailByPathActiveTrail.php b/src/MenuTrailByPathActiveTrail.php
index cd154d0..2afb8e4 100644
--- a/src/MenuTrailByPathActiveTrail.php
+++ b/src/MenuTrailByPathActiveTrail.php
@@ -7,7 +7,7 @@ use Drupal\Core\Menu\MenuLinkManagerInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Lock\LockBackendInterface;
-use Drupal\menu_trail_by_path\Menu\MenuHelperInterface;
+use Drupal\Core\Path\PathValidatorInterface;
 use Drupal\menu_trail_by_path\Path\PathHelperInterface;
 use Drupal\Core\Routing\RequestContext;
 use Drupal\Core\Language\LanguageManagerInterface;
@@ -23,9 +23,9 @@ class MenuTrailByPathActiveTrail extends MenuActiveTrail {
   protected $pathHelper;
 
   /**
-   * @var \Drupal\menu_trail_by_path\Menu\MenuHelperInterface
+   * @var \Drupal\Core\Path\PathValidatorInterface
    */
-  protected $menuHelper;
+  protected $pathValidator;
 
   /**
    * @var \Drupal\Core\Routing\RequestContext
@@ -39,19 +39,20 @@ class MenuTrailByPathActiveTrail extends MenuActiveTrail {
 
   /**
    * MenuTrailByPathActiveTrail constructor.
+   *
    * @param \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager
    * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
    * @param \Drupal\Core\Cache\CacheBackendInterface $cache
    * @param \Drupal\Core\Lock\LockBackendInterface $lock
    * @param \Drupal\menu_trail_by_path\Path\PathHelperInterface $path_helper
-   * @param \Drupal\menu_trail_by_path\Menu\MenuHelperInterface $menu_helper
+   * @param \Drupal\Core\Path\PathValidatorInterface $path_validator
    * @param \Drupal\Core\Routing\RequestContext $context
    * @param \Drupal\Core\Language\LanguageManagerInterface $languageManager
    */
-  public function __construct(MenuLinkManagerInterface $menu_link_manager, RouteMatchInterface $route_match, CacheBackendInterface $cache, LockBackendInterface $lock, PathHelperInterface $path_helper, MenuHelperInterface $menu_helper, RequestContext $context, LanguageManagerInterface $languageManager) {
+  public function __construct(MenuLinkManagerInterface $menu_link_manager, RouteMatchInterface $route_match, CacheBackendInterface $cache, LockBackendInterface $lock, PathHelperInterface $path_helper, PathValidatorInterface $path_validator, RequestContext $context, LanguageManagerInterface $languageManager) {
     parent::__construct($menu_link_manager, $route_match, $cache, $lock);
     $this->pathHelper      = $path_helper;
-    $this->menuHelper      = $menu_helper;
+    $this->pathValidator   = $path_validator;
     $this->context         = $context;
     $this->languageManager = $languageManager;
   }
@@ -75,7 +76,7 @@ class MenuTrailByPathActiveTrail extends MenuActiveTrail {
   protected function doGetActiveTrailIds($menu_name) {
     // Parent ids; used both as key and value to ensure uniqueness.
     // We always want all the top-level links with parent == ''.
-    $active_trail = array('' => '');
+    $active_trail = ['' => ''];
 
     // If a link in the given menu indeed matches the path, then use it to
     // complete the active trail.
@@ -88,29 +89,39 @@ class MenuTrailByPathActiveTrail extends MenuActiveTrail {
     return $active_trail;
   }
 
+
   /**
    * Fetches the deepest, heaviest menu link which matches the deepest trail path url.
    *
    * @param string $menu_name
    *   The menu within which to find the active trail link.
    *
-   * @return \Drupal\Core\Menu\MenuLinkInterface|NULL
+   * @return \Drupal\Core\Menu\MenuLinkInterface|null
    *   The menu link for the given menu, or NULL if there is no matching menu link.
    */
   public function getActiveTrailLink($menu_name) {
-    $menu_links = $this->menuHelper->getMenuLinks($menu_name);
     $trail_urls = $this->pathHelper->getUrls();
 
-    foreach (array_reverse($trail_urls) as $trail_url) {
-      foreach (array_reverse($menu_links) as $menu_link) {
-        /* @var $menu_link \Drupal\Core\Menu\MenuLinkInterface */
-        /* @var $trail_url \Drupal\Core\Url */
-        if ($menu_link->getUrlObject()->toString() == $trail_url->toString()) {
-          return $menu_link;
+    // Gather trail urls strings.
+    $trail_url_strings = [];
+    foreach ($trail_urls as $trail_url) {
+      /* @var $trail_url \Drupal\Core\Url */
+      $trail_url_strings[] = $trail_url->toString();
+    }
+
+    foreach (array_reverse($trail_url_strings) as $trail_url_string) {
+      $url_object = $this->pathValidator->getUrlIfValid($trail_url_string);
+      if ($url_object) {
+        $links = $this->menuLinkManager->loadLinksByRoute($url_object->getRouteName(), $url_object->getRouteParameters(), $menu_name);
+        if ($links) {
+          // Menu link manager sorts ascending by depth, weight, id. Get the
+          // last one which should be de deepest menu item.
+          return end($links);
         }
       }
     }
 
     return NULL;
   }
+
 }
diff --git a/src/MenuTrailByPathServiceProvider.php b/src/MenuTrailByPathServiceProvider.php
index bf8b835..26e98e8 100644
--- a/src/MenuTrailByPathServiceProvider.php
+++ b/src/MenuTrailByPathServiceProvider.php
@@ -17,7 +17,7 @@ class MenuTrailByPathServiceProvider extends ServiceProviderBase {
     $definition = $container->getDefinition('menu.active_trail');
     $definition->setClass('Drupal\menu_trail_by_path\MenuTrailByPathActiveTrail');
     $definition->addArgument(new Reference('menu_trail_by_path.path_helper'));
-    $definition->addArgument(new Reference('menu_trail_by_path.menu_helper'));
+    $definition->addArgument(new Reference('path.validator'));
     $definition->addArgument(new Reference('router.request_context'));
     $definition->addArgument(new Reference('language_manager'));
   }
