diff --git a/core/includes/common.inc b/core/includes/common.inc
index 18ed1d5..77e0285 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2379,8 +2379,8 @@ function _drupal_add_library($library_name, $every_page = NULL) {
  * In a situation where tree relationships are present, adding multiple
  * subgroups is not necessary, because the table will contain indentations that
  * provide enough information about the sibling and parent relationships. See
- * theme_menu_overview_form() for an example creating a table containing parent
- * relationships.
+ * MenuForm::BuildOverviewForm for an example creating a table
+ * containing parent relationships.
  *
  * @param $element
  *   A form element to attach the tableDrag behavior to.
@@ -2417,7 +2417,7 @@ function _drupal_add_library($library_name, $every_page = NULL) {
  *     to FALSE if the column should not be hidden.
  *   - 'limit': (optional) Limit the maximum amount of parenting in this table.
  *
- * @see theme_menu_overview_form()
+ * @see MenuForm::BuildOverviewForm()
  */
 function drupal_attach_tabledrag(&$element, array $options) {
   // Add default values to elements.
diff --git a/core/modules/menu_ui/menu_ui.admin.inc b/core/modules/menu_ui/menu_ui.admin.inc
deleted file mode 100644
index f23093f..0000000
--- a/core/modules/menu_ui/menu_ui.admin.inc
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-/**
- * @file
- * Administrative page callbacks for Menu UI module.
- */
-
-use Drupal\Component\Utility\SafeMarkup;
-use Drupal\Core\Render\Element;
-
-/**
- * Returns HTML for the menu overview form into a table.
- *
- * @param array $variables
- *   An associative array containing:
- *   - form: A render element representing the form.
- *
- * @return string
- *   The themed HTML.
- *
- * @ingroup themeable
- */
-function theme_menu_overview_form($variables) {
-  $form = $variables['form'];
-
-  $header = array(
-    t('Menu link'),
-    array('data' => t('Enabled'), 'class' => array('checkbox')),
-    t('Weight'),
-    t('Operations'),
-  );
-
-  $rows = array();
-  foreach (Element::children($form) as $id) {
-    if (isset($form[$id]['#item'])) {
-      $element = &$form[$id];
-
-      // Add special classes to be used for tabledrag.js.
-      $element['parent']['#attributes']['class'] = array('menu-parent');
-      $element['id']['#attributes']['class'] = array('menu-id');
-      $element['weight']['#attributes']['class'] = array('menu-weight');
-
-      // Change the parent field to a hidden. This allows any value but hides
-      // the field.
-      $element['parent']['#type'] = 'hidden';
-
-      $indent = array(
-        '#theme' => 'indentation',
-        '#size' => $element['#item']->depth - 1,
-      );
-
-      $row = array();
-      $row[] = SafeMarkup::set(drupal_render($indent) . drupal_render($element['title']));
-      $row[] = array('data' => drupal_render($element['enabled']), 'class' => array('checkbox', 'menu-enabled'));
-      $row[] = SafeMarkup::set(drupal_render($element['weight']) . drupal_render($element['parent']) . drupal_render($element['id']));
-      $row[] = drupal_render($element['operations']);
-
-      $row = array_merge(array('data' => $row), $element['#attributes']);
-      $row['class'][] = 'draggable';
-      $rows[] = $row;
-    }
-  }
-  $output = '';
-  if (empty($rows)) {
-    $rows[] = array(array('data' => $form['#empty_text'], 'colspan' => '7'));
-  }
-
-  $table = array(
-    '#type' => 'table',
-    '#header' => $header,
-    '#rows' => $rows,
-    '#attributes' => array(
-      'id' => 'menu-overview',
-    ),
-    '#tabledrag' => array(
-      array(
-        'action' => 'match',
-        'relationship' => 'parent',
-        'group' => 'menu-parent',
-        'subgroup' => 'menu-parent',
-        'source' => 'menu-id',
-        'hidden' => TRUE,
-        'limit' => \Drupal::menuTree()->maxDepth() - 1,
-      ),
-      array(
-        'action' => 'order',
-        'relationship' => 'sibling',
-        'group' => 'menu-weight',
-      ),
-    ),
-  );
-
-  $output .= drupal_render($form['inline_actions']);
-  $output .= drupal_render($table);
-  $output .= drupal_render_children($form);
-  return $output;
-}
diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module
index e77410f..55c20a5 100644
--- a/core/modules/menu_ui/menu_ui.module
+++ b/core/modules/menu_ui/menu_ui.module
@@ -79,19 +79,6 @@ function menu_ui_entity_type_build(array &$entity_types) {
     ->setLinkTemplate('add-link-form', 'menu_link_content.link_add');
 }
 
-
-/**
- * Implements hook_theme().
- */
-function menu_ui_theme() {
-  return array(
-    'menu_overview_form' => array(
-      'file' => 'menu_ui.admin.inc',
-      'render element' => 'form',
-    ),
-  );
-}
-
 /**
  * Implements hook_ENTITY_TYPE_insert( for menu entities.
  */
diff --git a/core/modules/menu_ui/src/MenuForm.php b/core/modules/menu_ui/src/MenuForm.php
index 2b3758f..0e73b97 100644
--- a/core/modules/menu_ui/src/MenuForm.php
+++ b/core/modules/menu_ui/src/MenuForm.php
@@ -212,11 +212,9 @@ public function save(array $form, FormStateInterface $form_state) {
   protected function buildOverviewForm(array &$form, FormStateInterface $form_state) {
     // Ensure that menu_overview_form_submit() knows the parents of this form
     // section.
-    $form['#tree'] = TRUE;
-    $form['#theme'] = 'menu_overview_form';
     $form_state->setIfNotExists('menu_overview_form_parents', array());
 
-    $form['#attached']['css'] = array(drupal_get_path('module', 'menu') . '/css/menu.admin.css');
+    $form['#attached']['css'] = array(drupal_get_path('module', 'menu_ui') . '/css/menu_ui.admin.css');
 
     $tree = $this->menuTree->load($this->entity->id(), new MenuTreeParameters());
 
@@ -238,10 +236,79 @@ protected function buildOverviewForm(array &$form, FormStateInterface $form_stat
     };
     $delta = max($count($tree), 50);
 
-    $form = array_merge($form, $this->buildOverviewTreeForm($tree, $delta));
+    $form['links'] = array(
+      '#type' => 'table',
+      '#theme' => 'table__menu_overview',
+      '#header' => array(
+        $this->t('Menu link'),
+        array(
+          'data' => $this->t('Enabled'),
+          'class' => array('checkbox'),
+        ),
+        $this->t('Weight'),
+        $this->t('Operations'),
+      ),
+      '#attributes' => array(
+        'id' => 'menu-overview',
+      ),
+      '#tabledrag' => array(
+        array(
+          'action' => 'match',
+          'relationship' => 'parent',
+          'group' => 'menu-parent',
+          'subgroup' => 'menu-parent',
+          'source' => 'menu-id',
+          'hidden' => TRUE,
+          'limit' => \Drupal::menuTree()->maxDepth() - 1,
+        ),
+        array(
+          'action' => 'order',
+          'relationship' => 'sibling',
+          'group' => 'menu-weight',
+        ),
+      ),
+    );
+
     $destination = $this->getUrlGenerator()->getPathFromRoute('menu_ui.menu_edit', array('menu' => $this->entity->id()));
     $url = $destination = $this->url('menu_link_content.link_add', array('menu' => $this->entity->id()), array('query' => array('destination' => $destination)));
-    $form['#empty_text'] = $this->t('There are no menu links yet. <a href="@url">Add link</a>.', array('@url' => $url));
+    $form['links']['#empty'] = $this->t('There are no menu links yet. <a href="@url">Add link</a>.', array('@url' => $url));
+    $links = $this->buildOverviewTreeForm($tree, $delta);
+    foreach (Element::children($links) as $id) {
+      if (isset($links[$id]['#item'])) {
+        $element = $links[$id];
+
+        // TableDrag: Mark the table row as draggable.
+        $form['links'][$id]['#attributes'] = $element['#attributes'];
+        $form['links'][$id]['#attributes']['class'][] = 'draggable';
+
+        // TableDrag: Sort the table row according to its existing/configured weight.
+        $form['links'][$id]['#weight'] = $element['#item']->link->getWeight();
+
+        // Add special classes to be used for tabledrag.js.
+        $element['parent']['#attributes']['class'] = array('menu-parent');
+        $element['weight']['#attributes']['class'] = array('menu-weight');
+        $element['id']['#attributes']['class'] = array('menu-id');
+
+        $form['links'][$id]['title'] = array(
+          array(
+            '#theme' => 'indentation',
+            '#size' => $element['#item']->depth - 1,
+          ),
+          $element['title'],
+        );
+        $form['links'][$id]['enabled'] = $element['enabled'];
+        $form['links'][$id]['enabled']['#wrapper_attributes']['class'] = array('checkbox', 'menu-enabled');
+
+        $form['links'][$id]['weight'] = array(
+          $element['weight'],
+          $element['parent'],
+          $element['id'],
+        );
+
+        // Operations (dropbutton) column.
+        $form['links'][$id]['operations'] = $element['operations'];
+      }
+    }
 
     return $form;
   }
