diff --git a/core/modules/action/action.admin.inc b/core/modules/action/action.admin.inc
index 2f94445..822284c 100644
--- a/core/modules/action/action.admin.inc
+++ b/core/modules/action/action.admin.inc
@@ -168,10 +168,3 @@ function action_admin_delete_orphans_post($orphaned) {
   }
 }
 
-/**
- * Removes actions that are in the database but not supported by any enabled module.
- */
-function action_admin_remove_orphans() {
-  action_synchronize(TRUE);
-  drupal_goto('admin/config/system/actions/manage');
-}
diff --git a/core/modules/action/action.module b/core/modules/action/action.module
index 1f9c77b..af6ffe9 100644
--- a/core/modules/action/action.module
+++ b/core/modules/action/action.module
@@ -88,10 +88,9 @@ function action_menu() {
   );
   $items['admin/config/system/actions/orphan'] = array(
     'title' => 'Remove orphans',
-    'page callback' => 'action_admin_remove_orphans',
-    'access arguments' => array('administer actions'),
+    'description' => 'Remove actions that are in the database but not supported by any enabled module.',
+    'route_name' => 'action_admin_orphans_remove',
     'type' => MENU_CALLBACK,
-    'file' => 'action.admin.inc',
   );
   return $items;
 }
diff --git a/core/modules/action/action.routing.yml b/core/modules/action/action.routing.yml
index bca4b36..da9b78d 100644
--- a/core/modules/action/action.routing.yml
+++ b/core/modules/action/action.routing.yml
@@ -4,3 +4,10 @@ action_admin_manage:
     _content: '\Drupal\action\Controller\ActionController::adminManage'
   requirements:
     _permission: 'administer actions'
+
+action_admin_orphans_remove:
+  pattern: '/admin/config/system/actions/orphan'
+  defaults:
+    _content: '\Drupal\action\Controller\ActionController::adminRemoveOrphans'
+  requirements:
+    _permission: 'administer actions'
diff --git a/core/modules/action/lib/Drupal/action/Controller/ActionController.php b/core/modules/action/lib/Drupal/action/Controller/ActionController.php
index 93e2990..f01686a 100644
--- a/core/modules/action/lib/Drupal/action/Controller/ActionController.php
+++ b/core/modules/action/lib/Drupal/action/Controller/ActionController.php
@@ -1,7 +1,13 @@
 <?php
 
+/**
+ * @file
+ * Contains \Drupal\action\Controller\ActionController.
+ */
+
 namespace Drupal\action\Controller;
 
+use Drupal\action\ActionAdminManageForm;
 use Drupal\Core\ControllerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -84,9 +90,25 @@ public function adminManage() {
     }
 
     if ($actions_map) {
-      $build['action_admin_manage_form'] = drupal_get_form(new \Drupal\action\ActionAdminManageForm(), $options);
+      $build['action_admin_manage_form'] = drupal_get_form(new ActionAdminManageForm(), $options);
     }
 
     return $build;
   }
+
+  /**
+   * Implements \Drupal\Core\ControllerInterface::create().
+   */
+  public static function create(ContainerInterface $container) {
+    return new static();
+  }
+
+  /**
+   * Removes actions that are in the database but not supported by any enabled module.
+   */
+  public function adminRemoveOrphans() {
+    action_synchronize(TRUE);
+    return new RedirectResponse(url('admin/config/system/actions/manage'));
+  }
+
 }
