diff --git a/handlers/views_handler_relationship_groupwise_max.inc b/handlers/views_handler_relationship_groupwise_max.inc
index a7f2065..eee3b58 100644
--- a/handlers/views_handler_relationship_groupwise_max.inc
+++ b/handlers/views_handler_relationship_groupwise_max.inc
@@ -6,6 +6,7 @@
  */
 
 use Drupal\Core\Database\Query\AlterableInterface;
+use Drupal\views\View;
 
 /**
  * Relationship handler that allows a groupwise maximum of the linked in table.
@@ -170,8 +171,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
    * We use this to obtain our subquery SQL.
    */
   function get_temporary_view() {
-    views_include('view');
-    $view = new view();
+    $view = new View();
     $view->vid = 'new'; // @todo: what's this?
     $view->base_table = $this->definition['base'];
     $view->add_display('default');
diff --git a/includes/admin.inc b/includes/admin.inc
index 4add87a..8ef3a90 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -6,6 +6,7 @@
  */
 
 use Drupal\Core\Database\Database;
+use Drupal\views\View;
 
 /**
  * Create an array of Views admin CSS for adding or attaching.
@@ -1997,7 +1998,6 @@ function views_ui_import_page($form, &$form_state) {
  */
 function views_ui_import_validate($form, &$form_state) {
   $view = '';
-  views_include('view');
   // Be forgiving if someone pastes views code that starts with '<?php'.
   if (substr($form_state['values']['view'], 0, 5) == '<?php') {
     $form_state['values']['view'] = substr($form_state['values']['view'], 5);
@@ -2071,7 +2071,7 @@ function views_ui_import_validate($form, &$form_state) {
         }
       }
 
-      foreach (views_object_types() as $type => $info) {
+      foreach (View::views_object_types() as $type => $info) {
         $handlers = $display->handler->get_handlers($type);
         if ($handlers) {
           foreach ($handlers as $id => $handler) {
@@ -2202,7 +2202,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
   $build = array(
     '#theme_wrappers' => array('views_ui_display_tab_bucket'),
   );
-  $types = views_object_types();
+  $types = View::views_object_types();
 
   $build['#overridden'] = FALSE;
   $build['#defaulted'] = FALSE;
@@ -3342,7 +3342,7 @@ function views_ui_config_type_form($form, &$form_state) {
   $display_id = $form_state['display_id'];
   $type = $form_state['type'];
 
-  $types = views_object_types();
+  $types = View::views_object_types();
   if (!$view->set_display($display_id)) {
     views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
   }
@@ -3374,7 +3374,7 @@ function views_ui_config_type_form($form, &$form_state) {
  * Submit handler for type configuration form
  */
 function views_ui_config_type_form_submit($form, &$form_state) {
-  $types = views_object_types();
+  $types = View::views_object_types();
   $display = &$form_state['view']->display[$form_state['display_id']];
 
   // Store in cache
@@ -3389,7 +3389,7 @@ function views_ui_rearrange_form($form, &$form_state) {
   $display_id = $form_state['display_id'];
   $type = $form_state['type'];
 
-  $types = views_object_types();
+  $types = View::views_object_types();
   if (!$view->set_display($display_id)) {
     views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
   }
@@ -3549,7 +3549,7 @@ function theme_views_ui_expose_filter_form($variables) {
  * Submit handler for rearranging form
  */
 function views_ui_rearrange_form_submit($form, &$form_state) {
-  $types = views_object_types();
+  $types = View::views_object_types();
   $display = &$form_state['view']->display[$form_state['display_id']];
 
   $old_fields = $display->handler->get_option($types[$form_state['type']]['plural']);
@@ -3585,7 +3585,7 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
   $display_id = $form_state['display_id'];
   $type = $form_state['type'];
 
-  $types = views_object_types();
+  $types = View::views_object_types();
   if (!$view->set_display($display_id)) {
     views_ajax_render(t('Invalid display id @display', array('@display' => $display_id)));
   }
@@ -3851,7 +3851,7 @@ function theme_views_ui_rearrange_filter_form(&$vars) {
  * Submit handler for rearranging form
  */
 function views_ui_rearrange_filter_form_submit($form, &$form_state) {
-  $types = views_object_types();
+  $types = View::views_object_types();
   $display = &$form_state['view']->display[$form_state['display_id']];
   $remember_groups = array();
 
@@ -3976,7 +3976,7 @@ function views_ui_add_item_form($form, &$form_state) {
   }
   $display = &$view->display[$display_id];
 
-  $types = views_object_types();
+  $types = View::views_object_types();
   $ltitle = $types[$type]['ltitle'];
   $section = $types[$type]['plural'];
 
@@ -4094,7 +4094,7 @@ function views_ui_add_item_form($form, &$form_state) {
  */
 function views_ui_add_item_form_submit($form, &$form_state) {
   $type = $form_state['type'];
-  $types = views_object_types();
+  $types = View::views_object_types();
   $section = $types[$type]['plural'];
 
   // Handle the override select.
@@ -4182,7 +4182,7 @@ function views_ui_config_item_form($form, &$form_state) {
       $form['markup'] = array('#markup' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
     }
     else {
-      $types = views_object_types();
+      $types = View::views_object_types();
 
       // If this item can come from the default display, show a dropdown
       // that lets the user choose which display the changes should apply to.
@@ -4302,7 +4302,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
   // Run it through the handler's submit function.
   $form_state['handler']->options_submit($form['options'], $form_state);
   $item = $form_state['handler']->options;
-  $types = views_object_types();
+  $types = View::views_object_types();
 
   // For footer/header $handler_type is area but $type is footer/header.
   // For all other handle types it's the same.
@@ -4357,7 +4357,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
   // Run it through the handler's submit function.
   $form_state['handler']->options_submit($form['options'], $form_state);
   $item = $form_state['handler']->options;
-  $types = views_object_types();
+  $types = View::views_object_types();
 
   // For footer/header $handler_type is area but $type is footer/header.
   // For all other handle types it's the same.
@@ -4434,7 +4434,7 @@ function views_ui_config_item_group_form($type, &$form_state) {
     }
     else {
       $handler->init($view, $item);
-      $types = views_object_types();
+      $types = View::views_object_types();
 
       $form['#title'] = t('Configure group settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name()));
 
@@ -4535,7 +4535,7 @@ function views_ui_config_item_extra_form($form, &$form_state) {
     }
     else {
       $handler->init($view, $item);
-      $types = views_object_types();
+      $types = View::views_object_types();
 
       $form['#title'] = t('Configure extra settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name()));
 
@@ -4606,7 +4606,7 @@ function views_ui_config_style_form($form, &$form_state) {
     }
     else {
       $handler->init($view, $item);
-      $types = views_object_types();
+      $types = View::views_object_types();
 
       $form['#title'] = t('Configure summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name()));
 
@@ -5016,7 +5016,6 @@ function views_ui_edit_display_form_change_theme($form, &$form_state) {
 function views_ui_autocomplete_tag($string = '') {
   $matches = array();
   // get matches from default views:
-  views_include('view');
   $views = views_get_all_views();
   foreach ($views as $view) {
     if (!empty($view->tag) && strpos($view->tag, $string) === 0) {
@@ -5371,7 +5370,7 @@ function views_ui_field_list() {
   foreach ($views as $view) {
     foreach ($view->display as $display_id => $display) {
       if ($view->set_display($display_id)) {
-        foreach (views_object_types() as $type => $info) {
+        foreach (View::views_object_types() as $type => $info) {
           foreach ($view->get_items($type, $display_id) as $item) {
             $data = views_fetch_data($item['table']);
             if (isset($data[$item['field']]) && isset($data[$item['field']][$type])
diff --git a/includes/handlers.inc b/includes/handlers.inc
index 15239f7..820de44 100644
--- a/includes/handlers.inc
+++ b/includes/handlers.inc
@@ -6,6 +6,7 @@
  */
 
 use Drupal\Core\Database\Database;
+use Drupal\views\View;
 
 /**
  * Instantiate and construct a new handler
@@ -213,7 +214,7 @@ class views_handler extends views_object {
       $options['field'] = $this->actual_field;
     }
 
-    $types = views_object_types();
+    $types = View::views_object_types();
     $plural = $this->handler_type;
     if (isset($types[$this->handler_type]['plural'])) {
       $plural = $types[$this->handler_type]['plural'];
@@ -430,7 +431,7 @@ class views_handler extends views_object {
   function groupby_form(&$form, &$form_state) {
     $view = &$form_state['view'];
     $display_id = $form_state['display_id'];
-    $types = views_object_types();
+    $types = View::views_object_types();
     $type = $form_state['type'];
     $id = $form_state['id'];
 
diff --git a/includes/view.inc b/lib/Drupal/views/View.php
similarity index 79%
rename from includes/view.inc
rename to lib/Drupal/views/View.php
index 604f956..2015282 100644
--- a/includes/view.inc
+++ b/lib/Drupal/views/View.php
@@ -2,21 +2,18 @@
 
 /**
  * @file
- * Provides the view object type and associated methods.
+ * Definition of Drupal\views\view.
  */
 
-/**
- * @defgroup views_objects Objects that represent a View or part of a view
- * @{
- * These objects are the core of Views do the bulk of the direction and
- * storing of data. All database activity is in these objects.
- */
+namespace Drupal\views;
+
+use Drupal\views\ViewsDbObject;
 
 /**
  * An object to contain all of the data to generate a view, plus the member
  * functions to build the view query, execute the query and render the output.
  */
-class view extends views_db_object {
+class View extends ViewsDbObject {
   var $db_table = 'views_view';
   var $base_table = 'node';
   var $base_field = 'nid';
@@ -285,7 +282,7 @@ class view extends views_db_object {
    * of initialization and loading/saving to/from the database.
    */
   static function db_objects() {
-    return array('display');
+    return array('Display');
   }
 
   /**
@@ -605,7 +602,7 @@ class view extends views_db_object {
     $base_tables = array_keys($base_tables);
     $missing_base_tables = array();
 
-    $types = views_object_types();
+    $types = View::views_object_types();
     foreach ($types as $key => $info) {
       foreach ($this->display_handler->get_option($info['plural']) as $id => $options) {
         $options['table'] = views_move_table($options['table']);
@@ -664,7 +661,7 @@ class view extends views_db_object {
   function init_handlers() {
     if (empty($this->inited)) {
       $this->fix_missing_relationships();
-      foreach (views_object_types() as $key => $info) {
+      foreach (View::views_object_types() as $key => $info) {
         $this->_init_handler($key, $info);
       }
       $this->inited = TRUE;
@@ -717,7 +714,7 @@ class view extends views_db_object {
    * Run the pre_query() on all active handlers.
    */
   function _pre_query() {
-    foreach (views_object_types() as $key => $info) {
+    foreach (View::views_object_types() as $key => $info) {
       $handlers = &$this->$key;
       $position = 0;
       foreach ($handlers as $id => $handler) {
@@ -732,7 +729,7 @@ class view extends views_db_object {
    * Run the post_execute() on all active handlers.
    */
   function _post_execute() {
-    foreach (views_object_types() as $key => $info) {
+    foreach (View::views_object_types() as $key => $info) {
       $handlers = &$this->$key;
       foreach ($handlers as $id => $handler) {
         $handlers[$id]->post_execute($this->result);
@@ -1299,7 +1296,7 @@ class view extends views_db_object {
    * have other side effects that are only intended for the 'proper'
    * use of the display, such as setting page titles and breadcrumbs.
    *
-   * If you simply want to view the display, use view::preview() instead.
+   * If you simply want to view the display, use View::preview() instead.
    */
   function execute_display($display_id = NULL, $args = array()) {
     if (empty($this->current_display) || $this->current_display != $this->choose_display($display_id)) {
@@ -1694,7 +1691,7 @@ class view extends views_db_object {
   /**
    * Add the list of queries run during render to buildinfo.
    *
-   * @see view::start_query_capture()
+   * @see View::start_query_capture()
    */
   function end_query_capture() {
     global $conf, $queries;
@@ -1733,7 +1730,7 @@ class view extends views_db_object {
 
     // Load all the views.
     foreach ($result as $data) {
-      $view = new view;
+      $view = new View();
       $view->load_row($data);
       $view->loaded = TRUE;
       $view->type = t('Normal');
@@ -1747,7 +1744,7 @@ class view extends views_db_object {
     }
 
     // Now load all the subtables:
-    foreach (view::db_objects() as $key) {
+    foreach (View::db_objects() as $key) {
       $object_name = "views_$key";
       $result = db_query("SELECT * FROM {{$object_name}} WHERE vid IN (:vids) ORDER BY vid, position",
         array(':vids' => array_keys($names)));
@@ -1817,7 +1814,7 @@ class view extends views_db_object {
 
   /**
    * Save a row to the database for the given key, which is one of the
-   * keys from view::db_objects()
+   * keys from View::db_objects()
    */
   function _save_rows($key) {
     $count = 0;
@@ -1920,7 +1917,7 @@ class view extends views_db_object {
    *    The cloned view.
    */
   function clone_view() {
-    $clone = version_compare(phpversion(), '5.0') < 0 ? $this : clone($this);
+    $clone = clone $this;
 
     $keys = array('current_display', 'display_handler', 'build_info', 'built', 'executed', 'attachment_before', 'attachment_after', 'field', 'argument', 'filter', 'sort', 'relationship', 'header', 'footer', 'empty', 'query', 'inited', 'style_plugin', 'plugin_name', 'exposed_data', 'exposed_input', 'exposed_widgets', 'many_to_one_tables', 'feed_icon');
     foreach ($keys as $key) {
@@ -1960,7 +1957,7 @@ class view extends views_db_object {
       }
     }
 
-    foreach (views_object_types() as $type => $info) {
+    foreach (View::views_object_types() as $type => $info) {
       if (isset($this->$type)) {
         $handlers = &$this->$type;
         foreach ($handlers as $id => $item) {
@@ -2104,518 +2101,78 @@ class view extends views_db_object {
     }
   }
 
-}
-
-/**
- * Base class for views' database objects.
- */
-class views_db_object {
-  public $db_table;
-
-  /**
-   * Initialize this object, setting values from schema defaults.
-   *
-   * @param $init
-   *   If an array, this is a set of values from db_fetch_object to
-   *   load. Otherwse, if TRUE values will be filled in from schema
-   *   defaults.
-   */
-  function init($init = TRUE) {
-    if (is_array($init)) {
-      return $this->load_row($init);
-    }
-
-    if (!$init) {
-      return;
-    }
-
-    $schema = drupal_get_schema($this->db_table);
-
-    if (!$schema) {
-      return;
-    }
-
-    // Go through our schema and build correlations.
-    foreach ($schema['fields'] as $field => $info) {
-      if ($info['type'] == 'serial') {
-        $this->$field = NULL;
-      }
-      if (!isset($this->$field)) {
-        if (!empty($info['serialize']) && isset($info['serialized default'])) {
-          $this->$field = unserialize($info['serialized default']);
-        }
-        elseif (isset($info['default'])) {
-          $this->$field = $info['default'];
-        }
-        else {
-          $this->$field = '';
-        }
-      }
-    }
-  }
-
-  /**
-   * Write the row to the database.
-   *
-   * @param $update
-   *   If true this will be an UPDATE query. Otherwise it will be an INSERT.
-   */
-  function save_row($update = NULL) {
-    $fields = $defs = $values = $serials = array();
-    $schema = drupal_get_schema($this->db_table);
-
-    // Go through our schema and build correlations.
-    foreach ($schema['fields'] as $field => $info) {
-      // special case -- skip serial types if we are updating.
-      if ($info['type'] == 'serial') {
-        $serials[] = $field;
-        continue;
-      }
-      elseif ($info['type'] == 'int') {
-        $this->$field = (int) $this->$field;
-      }
-      $fields[$field] = empty($info['serialize']) ? $this->$field : serialize($this->$field);
-    }
-    if (!$update) {
-      $query = db_insert($this->db_table);
-    }
-    else {
-      $query = db_update($this->db_table)
-        ->condition($update, $this->$update);
-    }
-    $return = $query
-      ->fields($fields)
-      ->execute();
-
-    if ($serials && !$update) {
-      // get last insert ids and fill them in.
-      // Well, one ID.
-      foreach ($serials as $field) {
-        $this->$field = $return;
-      }
-    }
-  }
-
-  /**
-   * Load the object with a row from the database.
-   *
-   * This method is separate from the constructor in order to give us
-   * more flexibility in terms of how the view object is built in different
-   * contexts.
-   *
-   * @param $data
-   *   An object from db_fetch_object. It should contain all of the fields
-   *   that are in the schema.
-   */
-  function load_row($data) {
-    $schema = drupal_get_schema($this->db_table);
-
-    // Go through our schema and build correlations.
-    foreach ($schema['fields'] as $field => $info) {
-      $this->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);
-    }
-  }
-
   /**
-   * Export a loaded row, such as an argument, field or the view itself to PHP code.
-   *
-   * @param $identifier
-   *   The variable to assign the PHP code for this object to.
-   * @param $indent
-   *   An optional indentation for prettifying nested code.
-   */
-  function export_row($identifier = NULL, $indent = '') {
-    ctools_include('export');
-
-    if (!$identifier) {
-      $identifier = $this->db_table;
-    }
-    $schema = drupal_get_schema($this->db_table);
-
-    $output = $indent . '$' . $identifier . ' = new ' . get_class($this) . "();\n";
-    // Go through our schema and build correlations.
-    foreach ($schema['fields'] as $field => $info) {
-      if (!empty($info['no export'])) {
-        continue;
-      }
-      if (!isset($this->$field)) {
-        if (isset($info['default'])) {
-          $this->$field = $info['default'];
-        }
-        else {
-          $this->$field = '';
-        }
-
-        // serialized defaults must be set as serialized.
-        if (isset($info['serialize'])) {
-          $this->$field = unserialize($this->$field);
-        }
-      }
-      $value = $this->$field;
-      if ($info['type'] == 'int') {
-        if (isset($info['size']) && $info['size'] == 'tiny') {
-          $value = (bool) $value;
-        }
-        else {
-          $value = (int) $value;
-        }
-      }
-
-      $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . ";\n";
-    }
-    return $output;
+   * Providea a list of views object types used in a view, with some information
+   * about them.
+   */
+  public static function views_object_types() {
+    static $retval = NULL;
+
+    // Statically cache this so t() doesn't run a bajillion times.
+    if (!isset($retval)) {
+      $retval = array(
+        'field' => array(
+          'title' => t('Fields'), // title
+          'ltitle' => t('fields'), // lowercase title for mid-sentence
+          'stitle' => t('Field'), // singular title
+          'lstitle' => t('field'), // singular lowercase title for mid sentence
+          'plural' => 'fields',
+        ),
+        'argument' => array(
+          'title' => t('Contextual filters'),
+          'ltitle' => t('contextual filters'),
+          'stitle' => t('Contextual filter'),
+          'lstitle' => t('contextual filter'),
+          'plural' => 'arguments',
+        ),
+        'sort' => array(
+          'title' => t('Sort criteria'),
+          'ltitle' => t('sort criteria'),
+          'stitle' => t('Sort criterion'),
+          'lstitle' => t('sort criterion'),
+          'plural' => 'sorts',
+        ),
+        'filter' => array(
+          'title' => t('Filter criteria'),
+          'ltitle' => t('filter criteria'),
+          'stitle' => t('Filter criterion'),
+          'lstitle' => t('filter criterion'),
+          'plural' => 'filters',
+        ),
+        'relationship' => array(
+          'title' => t('Relationships'),
+          'ltitle' => t('relationships'),
+          'stitle' => t('Relationship'),
+          'lstitle' => t('Relationship'),
+          'plural' => 'relationships',
+        ),
+        'header' => array(
+          'title' => t('Header'),
+          'ltitle' => t('header'),
+          'stitle' => t('Header'),
+          'lstitle' => t('Header'),
+          'plural' => 'header',
+          'type' => 'area',
+        ),
+        'footer' => array(
+          'title' => t('Footer'),
+          'ltitle' => t('footer'),
+          'stitle' => t('Footer'),
+          'lstitle' => t('Footer'),
+          'plural' => 'footer',
+          'type' => 'area',
+        ),
+        'empty' => array(
+          'title' => t('No results behavior'),
+          'ltitle' => t('no results behavior'),
+          'stitle' => t('No results behavior'),
+          'lstitle' => t('No results behavior'),
+          'plural' => 'empty',
+          'type' => 'area',
+        ),
+      );
+    }
+
+    return $retval;
   }
-
-  /**
-   * Add a new display handler to the view, automatically creating an id.
-   *
-   * @param $type
-   *   The plugin type from the views plugin data. Defaults to 'page'.
-   * @param $title
-   *   The title of the display; optional, may be filled in from default.
-   * @param $id
-   *   The id to use.
-   * @return
-   *   The key to the display in $view->display, so that the new display
-   *   can be easily located.
-   */
-  function add_display($type = 'page', $title = NULL, $id = NULL) {
-    if (empty($type)) {
-      return FALSE;
-    }
-
-    $plugin = views_fetch_plugin_data('display', $type);
-    if (empty($plugin)) {
-      $plugin['title'] = t('Broken');
-    }
-
-
-    if (empty($id)) {
-      $id = $this->generate_display_id($type);
-      if ($id !== 'default') {
-        preg_match("/[0-9]+/", $id, $count);
-        $count = $count[0];
-      }
-      else {
-        $count = '';
-      }
-
-      if (empty($title)) {
-        if ($count > 1) {
-          $title = $plugin['title'] . ' ' . $count;
-        }
-        else {
-          $title = $plugin['title'];
-        }
-      }
-    }
-
-    // Create the new display object
-    $display = new views_display;
-    $display->options($type, $id, $title);
-
-    // Add the new display object to the view.
-    $this->display[$id] = $display;
-    return $id;
-  }
-
-  /**
-   * Generate a display id of a certain plugin type.
-   *
-   * @param $type
-   *   Which plugin should be used for the new display id.
-   */
-  function generate_display_id($type) {
-    // 'default' is singular and is unique, so just go with 'default'
-    // for it. For all others, start counting.
-    if ($type == 'default') {
-      return 'default';
-    }
-    // Initial id.
-    $id = $type . '_1';
-    $count = 1;
-
-    // Loop through IDs based upon our style plugin name until
-    // we find one that is unused.
-    while (!empty($this->display[$id])) {
-      $id = $type . '_' . ++$count;
-    }
-
-    return $id;
-  }
-
-  /**
-   * Generates a unique ID for an item.
-   *
-   * These items are typically fields, filters, sort criteria, or arguments.
-   *
-   * @param $requested_id
-   *   The requested ID for the item.
-   * @param $existing_items
-   *   An array of existing items, keyed by their IDs.
-   *
-   * @return
-   *   A unique ID. This will be equal to $requested_id if no item with that ID
-   *   already exists. Otherwise, it will be appended with an integer to make
-   *   it unique, e.g. "{$requested_id}_1", "{$requested_id}_2", etc.
-   */
-  public static function generate_item_id($requested_id, $existing_items) {
-    $count = 0;
-    $id = $requested_id;
-    while (!empty($existing_items[$id])) {
-      $id = $requested_id . '_' . ++$count;
-    }
-    return $id;
-  }
-
-  /**
-   * Create a new display and a display handler for it.
-   * @param $type
-   *   The plugin type from the views plugin data. Defaults to 'page'.
-   * @param $title
-   *   The title of the display; optional, may be filled in from default.
-   * @param $id
-   *   The id to use.
-   * @return views_plugin_display
-   *   A reference to the new handler object.
-   */
-  function &new_display($type = 'page', $title = NULL, $id = NULL) {
-    $id = $this->add_display($type, $title, $id);
-
-    // Create a handler
-    $this->display[$id]->handler = views_get_plugin('display', $this->display[$id]->display_plugin);
-    if (empty($this->display[$id]->handler)) {
-      // provide a 'default' handler as an emergency. This won't work well but
-      // it will keep things from crashing.
-      $this->display[$id]->handler = views_get_plugin('display', 'default');
-    }
-
-    if (!empty($this->display[$id]->handler)) {
-      // Initialize the new display handler with data.
-      $this->display[$id]->handler->init($this, $this->display[$id]);
-      // If this is NOT the default display handler, let it know which is
-      if ($id != 'default') {
-        $this->display[$id]->handler->default_display = &$this->display['default']->handler;
-      }
-    }
-
-    return $this->display[$id]->handler;
-  }
-
-  /**
-   * Add an item with a handler to the view.
-   *
-   * These items may be fields, filters, sort criteria, or arguments.
-   */
-  function add_item($display_id, $type, $table, $field, $options = array(), $id = NULL) {
-    $types = views_object_types();
-    $this->set_display($display_id);
-
-    $fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
-
-    if (empty($id)) {
-      $id = $this->generate_item_id($field, $fields);
-    }
-
-    $new_item = array(
-      'id' => $id,
-      'table' => $table,
-      'field' => $field,
-    ) + $options;
-
-    if (!empty($types[$type]['type'])) {
-      $handler_type = $types[$type]['type'];
-    }
-    else {
-      $handler_type = $type;
-    }
-
-    $handler = views_get_handler($table, $field, $handler_type);
-
-    $fields[$id] = $new_item;
-    $this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields);
-
-    return $id;
-  }
-
-  /**
-   * Get an array of items for the current display.
-   */
-  function get_items($type, $display_id = NULL) {
-    $this->set_display($display_id);
-
-    if (!isset($display_id)) {
-      $display_id = $this->current_display;
-    }
-
-    // Get info about the types so we can get the right data.
-    $types = views_object_types();
-    return $this->display[$display_id]->handler->get_option($types[$type]['plural']);
-  }
-
-  /**
-   * Get the configuration of an item (field/sort/filter/etc) on a given
-   * display.
-   */
-  function get_item($display_id, $type, $id) {
-    // Get info about the types so we can get the right data.
-    $types = views_object_types();
-    // Initialize the display
-    $this->set_display($display_id);
-
-    // Get the existing configuration
-    $fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
-
-    return isset($fields[$id]) ? $fields[$id] : NULL;
-  }
-
-  /**
-   * Set the configuration of an item (field/sort/filter/etc) on a given
-   * display.
-   *
-   * Pass in NULL for the $item to remove an item.
-   */
-  function set_item($display_id, $type, $id, $item) {
-    // Get info about the types so we can get the right data.
-    $types = views_object_types();
-    // Initialize the display
-    $this->set_display($display_id);
-
-    // Get the existing configuration
-    $fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
-    if (isset($item)) {
-      $fields[$id] = $item;
-    }
-    else {
-      unset($fields[$id]);
-    }
-
-    // Store.
-    $this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields);
-  }
-
-  /**
-   * Set an option on an item.
-   *
-   * Use this only if you have just 1 or 2 options to set; if you have
-   * many, consider getting the item, adding the options and doing
-   * set_item yourself.
-   */
-  function set_item_option($display_id, $type, $id, $option, $value) {
-    $item = $this->get_item($display_id, $type, $id);
-    $item[$option] = $value;
-    $this->set_item($display_id, $type, $id, $item);
-  }
-}
-
-/**
- * A display type in a view.
- *
- * This is just the database storage mechanism, and isn't terribly important
- * to the behavior of the display at all.
- */
-class views_display extends views_db_object {
-  /**
-   * The display handler itself, which has all the methods.
-   *
-   * @var views_plugin_display
-   */
-  var $handler;
-
-  /**
-   * Stores all options of the display, like fields, filters etc.
-   *
-   * @var array
-   */
-  var $display_options;
-
-  var $db_table = 'views_display';
-  function views_display($init = TRUE) {
-    parent::init($init);
-  }
-
-  function options($type, $id, $title) {
-    $this->display_plugin = $type;
-    $this->id = $id;
-    $this->display_title = $title;
-  }
-}
-
-/**
- * Provide a list of views object types used in a view, with some information
- * about them.
- */
-function views_object_types() {
-  static $retval = NULL;
-
-  // statically cache this so t() doesn't run a bajillion times.
-  if (!isset($retval)) {
-    $retval = array(
-      'field' => array(
-        'title' => t('Fields'), // title
-        'ltitle' => t('fields'), // lowercase title for mid-sentence
-        'stitle' => t('Field'), // singular title
-        'lstitle' => t('field'), // singular lowercase title for mid sentence
-        'plural' => 'fields',
-      ),
-      'argument' => array(
-        'title' => t('Contextual filters'),
-        'ltitle' => t('contextual filters'),
-        'stitle' => t('Contextual filter'),
-        'lstitle' => t('contextual filter'),
-        'plural' => 'arguments',
-      ),
-      'sort' => array(
-        'title' => t('Sort criteria'),
-        'ltitle' => t('sort criteria'),
-        'stitle' => t('Sort criterion'),
-        'lstitle' => t('sort criterion'),
-        'plural' => 'sorts',
-      ),
-      'filter' => array(
-        'title' => t('Filter criteria'),
-        'ltitle' => t('filter criteria'),
-        'stitle' => t('Filter criterion'),
-        'lstitle' => t('filter criterion'),
-        'plural' => 'filters',
-      ),
-      'relationship' => array(
-        'title' => t('Relationships'),
-        'ltitle' => t('relationships'),
-        'stitle' => t('Relationship'),
-        'lstitle' => t('Relationship'),
-        'plural' => 'relationships',
-      ),
-      'header' => array(
-        'title' => t('Header'),
-        'ltitle' => t('header'),
-        'stitle' => t('Header'),
-        'lstitle' => t('Header'),
-        'plural' => 'header',
-        'type' => 'area',
-      ),
-      'footer' => array(
-        'title' => t('Footer'),
-        'ltitle' => t('footer'),
-        'stitle' => t('Footer'),
-        'lstitle' => t('Footer'),
-        'plural' => 'footer',
-        'type' => 'area',
-      ),
-      'empty' => array(
-        'title' => t('No results behavior'),
-        'ltitle' => t('no results behavior'),
-        'stitle' => t('No results behavior'),
-        'lstitle' => t('No results behavior'),
-        'plural' => 'empty',
-        'type' => 'area',
-      ),
-    );
-  }
-
-  return $retval;
 }
-
-/**
- * @}
- */
diff --git a/lib/Drupal/views/ViewsDbObject.php b/lib/Drupal/views/ViewsDbObject.php
new file mode 100644
index 0000000..9372e14
--- /dev/null
+++ b/lib/Drupal/views/ViewsDbObject.php
@@ -0,0 +1,410 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\views\views_db_object.
+ */
+
+namespace Drupal\views;
+
+/**
+ * Base class for views' database objects.
+ */
+class ViewsDbObject {
+  public $db_table;
+
+  /**
+   * Initialize this object, setting values from schema defaults.
+   *
+   * @param $init
+   *   If an array, this is a set of values from db_fetch_object to
+   *   load. Otherwse, if TRUE values will be filled in from schema
+   *   defaults.
+   */
+  function init($init = TRUE) {
+    if (is_array($init)) {
+      return $this->load_row($init);
+    }
+
+    if (!$init) {
+      return;
+    }
+
+    $schema = drupal_get_schema($this->db_table);
+
+    if (!$schema) {
+      return;
+    }
+
+    // Go through our schema and build correlations.
+    foreach ($schema['fields'] as $field => $info) {
+      if ($info['type'] == 'serial') {
+        $this->$field = NULL;
+      }
+      if (!isset($this->$field)) {
+        if (!empty($info['serialize']) && isset($info['serialized default'])) {
+          $this->$field = unserialize($info['serialized default']);
+        }
+        elseif (isset($info['default'])) {
+          $this->$field = $info['default'];
+        }
+        else {
+          $this->$field = '';
+        }
+      }
+    }
+  }
+
+  /**
+   * Write the row to the database.
+   *
+   * @param $update
+   *   If true this will be an UPDATE query. Otherwise it will be an INSERT.
+   */
+  function save_row($update = NULL) {
+    $fields = $defs = $values = $serials = array();
+    $schema = drupal_get_schema($this->db_table);
+
+    // Go through our schema and build correlations.
+    foreach ($schema['fields'] as $field => $info) {
+      // special case -- skip serial types if we are updating.
+      if ($info['type'] == 'serial') {
+        $serials[] = $field;
+        continue;
+      }
+      elseif ($info['type'] == 'int') {
+        $this->$field = (int) $this->$field;
+      }
+      $fields[$field] = empty($info['serialize']) ? $this->$field : serialize($this->$field);
+    }
+    if (!$update) {
+      $query = db_insert($this->db_table);
+    }
+    else {
+      $query = db_update($this->db_table)
+        ->condition($update, $this->$update);
+    }
+    $return = $query
+      ->fields($fields)
+      ->execute();
+
+    if ($serials && !$update) {
+      // get last insert ids and fill them in.
+      // Well, one ID.
+      foreach ($serials as $field) {
+        $this->$field = $return;
+      }
+    }
+  }
+
+  /**
+   * Load the object with a row from the database.
+   *
+   * This method is separate from the constructor in order to give us
+   * more flexibility in terms of how the view object is built in different
+   * contexts.
+   *
+   * @param $data
+   *   An object from db_fetch_object. It should contain all of the fields
+   *   that are in the schema.
+   */
+  function load_row($data) {
+    $schema = drupal_get_schema($this->db_table);
+
+    // Go through our schema and build correlations.
+    foreach ($schema['fields'] as $field => $info) {
+      $this->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);
+    }
+  }
+
+  /**
+   * Export a loaded row, such as an argument, field or the view itself to PHP code.
+   *
+   * @param $identifier
+   *   The variable to assign the PHP code for this object to.
+   * @param $indent
+   *   An optional indentation for prettifying nested code.
+   */
+  function export_row($identifier = NULL, $indent = '') {
+    ctools_include('export');
+
+    if (!$identifier) {
+      $identifier = $this->db_table;
+    }
+    $schema = drupal_get_schema($this->db_table);
+
+    $output = $indent . '$' . $identifier . ' = new ' . get_class($this) . "();\n";
+    // Go through our schema and build correlations.
+    foreach ($schema['fields'] as $field => $info) {
+      if (!empty($info['no export'])) {
+        continue;
+      }
+      if (!isset($this->$field)) {
+        if (isset($info['default'])) {
+          $this->$field = $info['default'];
+        }
+        else {
+          $this->$field = '';
+        }
+
+        // serialized defaults must be set as serialized.
+        if (isset($info['serialize'])) {
+          $this->$field = unserialize($this->$field);
+        }
+      }
+      $value = $this->$field;
+      if ($info['type'] == 'int') {
+        if (isset($info['size']) && $info['size'] == 'tiny') {
+          $value = (bool) $value;
+        }
+        else {
+          $value = (int) $value;
+        }
+      }
+
+      $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . ";\n";
+    }
+    return $output;
+  }
+
+  /**
+   * Add a new display handler to the view, automatically creating an id.
+   *
+   * @param $type
+   *   The plugin type from the views plugin data. Defaults to 'page'.
+   * @param $title
+   *   The title of the display; optional, may be filled in from default.
+   * @param $id
+   *   The id to use.
+   * @return
+   *   The key to the display in $view->display, so that the new display
+   *   can be easily located.
+   */
+  function add_display($type = 'page', $title = NULL, $id = NULL) {
+    if (empty($type)) {
+      return FALSE;
+    }
+
+    $plugin = views_fetch_plugin_data('display', $type);
+    if (empty($plugin)) {
+      $plugin['title'] = t('Broken');
+    }
+
+
+    if (empty($id)) {
+      $id = $this->generate_display_id($type);
+      if ($id !== 'default') {
+        preg_match("/[0-9]+/", $id, $count);
+        $count = $count[0];
+      }
+      else {
+        $count = '';
+      }
+
+      if (empty($title)) {
+        if ($count > 1) {
+          $title = $plugin['title'] . ' ' . $count;
+        }
+        else {
+          $title = $plugin['title'];
+        }
+      }
+    }
+
+    // Create the new display object
+    $display = new ViewsDisplay();
+    $display->options($type, $id, $title);
+
+    // Add the new display object to the view.
+    $this->display[$id] = $display;
+    return $id;
+  }
+
+  /**
+   * Generate a display id of a certain plugin type.
+   *
+   * @param $type
+   *   Which plugin should be used for the new display id.
+   */
+  function generate_display_id($type) {
+    // 'default' is singular and is unique, so just go with 'default'
+    // for it. For all others, start counting.
+    if ($type == 'default') {
+      return 'default';
+    }
+    // Initial id.
+    $id = $type . '_1';
+    $count = 1;
+
+    // Loop through IDs based upon our style plugin name until
+    // we find one that is unused.
+    while (!empty($this->display[$id])) {
+      $id = $type . '_' . ++$count;
+    }
+
+    return $id;
+  }
+
+  /**
+   * Generates a unique ID for an item.
+   *
+   * These items are typically fields, filters, sort criteria, or arguments.
+   *
+   * @param $requested_id
+   *   The requested ID for the item.
+   * @param $existing_items
+   *   An array of existing items, keyed by their IDs.
+   *
+   * @return
+   *   A unique ID. This will be equal to $requested_id if no item with that ID
+   *   already exists. Otherwise, it will be appended with an integer to make
+   *   it unique, e.g. "{$requested_id}_1", "{$requested_id}_2", etc.
+   */
+  public static function generate_item_id($requested_id, $existing_items) {
+    $count = 0;
+    $id = $requested_id;
+    while (!empty($existing_items[$id])) {
+      $id = $requested_id . '_' . ++$count;
+    }
+    return $id;
+  }
+
+  /**
+   * Create a new display and a display handler for it.
+   * @param $type
+   *   The plugin type from the views plugin data. Defaults to 'page'.
+   * @param $title
+   *   The title of the display; optional, may be filled in from default.
+   * @param $id
+   *   The id to use.
+   * @return views_plugin_display
+   *   A reference to the new handler object.
+   */
+  function &new_display($type = 'page', $title = NULL, $id = NULL) {
+    $id = $this->add_display($type, $title, $id);
+
+    // Create a handler
+    $this->display[$id]->handler = views_get_plugin('display', $this->display[$id]->display_plugin);
+    if (empty($this->display[$id]->handler)) {
+      // provide a 'default' handler as an emergency. This won't work well but
+      // it will keep things from crashing.
+      $this->display[$id]->handler = views_get_plugin('display', 'default');
+    }
+
+    if (!empty($this->display[$id]->handler)) {
+      // Initialize the new display handler with data.
+      $this->display[$id]->handler->init($this, $this->display[$id]);
+      // If this is NOT the default display handler, let it know which is
+      if ($id != 'default') {
+        $this->display[$id]->handler->default_display = &$this->display['default']->handler;
+      }
+    }
+
+    return $this->display[$id]->handler;
+  }
+
+  /**
+   * Add an item with a handler to the view.
+   *
+   * These items may be fields, filters, sort criteria, or arguments.
+   */
+  function add_item($display_id, $type, $table, $field, $options = array(), $id = NULL) {
+    $types = View::views_object_types();
+    $this->set_display($display_id);
+
+    $fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
+
+    if (empty($id)) {
+      $id = $this->generate_item_id($field, $fields);
+    }
+
+    $new_item = array(
+      'id' => $id,
+      'table' => $table,
+      'field' => $field,
+    ) + $options;
+
+    if (!empty($types[$type]['type'])) {
+      $handler_type = $types[$type]['type'];
+    }
+    else {
+      $handler_type = $type;
+    }
+
+    $handler = views_get_handler($table, $field, $handler_type);
+
+    $fields[$id] = $new_item;
+    $this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields);
+
+    return $id;
+  }
+
+  /**
+   * Get an array of items for the current display.
+   */
+  function get_items($type, $display_id = NULL) {
+    $this->set_display($display_id);
+
+    if (!isset($display_id)) {
+      $display_id = $this->current_display;
+    }
+
+    // Get info about the types so we can get the right data.
+    $types = View::views_object_types();
+    return $this->display[$display_id]->handler->get_option($types[$type]['plural']);
+  }
+
+  /**
+   * Get the configuration of an item (field/sort/filter/etc) on a given
+   * display.
+   */
+  function get_item($display_id, $type, $id) {
+    // Get info about the types so we can get the right data.
+    $types = View::views_object_types();
+    // Initialize the display
+    $this->set_display($display_id);
+
+    // Get the existing configuration
+    $fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
+
+    return isset($fields[$id]) ? $fields[$id] : NULL;
+  }
+
+  /**
+   * Set the configuration of an item (field/sort/filter/etc) on a given
+   * display.
+   *
+   * Pass in NULL for the $item to remove an item.
+   */
+  function set_item($display_id, $type, $id, $item) {
+    // Get info about the types so we can get the right data.
+    $types = View::views_object_types();
+    // Initialize the display
+    $this->set_display($display_id);
+
+    // Get the existing configuration
+    $fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
+    if (isset($item)) {
+      $fields[$id] = $item;
+    }
+    else {
+      unset($fields[$id]);
+    }
+
+    // Store.
+    $this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields);
+  }
+
+  /**
+   * Set an option on an item.
+   *
+   * Use this only if you have just 1 or 2 options to set; if you have
+   * many, consider getting the item, adding the options and doing
+   * set_item yourself.
+   */
+  function set_item_option($display_id, $type, $id, $option, $value) {
+    $item = $this->get_item($display_id, $type, $id);
+    $item[$option] = $value;
+    $this->set_item($display_id, $type, $id, $item);
+  }
+}
diff --git a/lib/Drupal/views/ViewsDisplay.php b/lib/Drupal/views/ViewsDisplay.php
new file mode 100644
index 0000000..9c481e8
--- /dev/null
+++ b/lib/Drupal/views/ViewsDisplay.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\views\views_display.
+ */
+
+namespace Drupal\views;
+
+/**
+ * A display type in a view.
+ *
+ * This is just the database storage mechanism, and isn't terribly important
+ * to the behavior of the display at all.
+ */
+class ViewsDisplay extends ViewsDbObject {
+  /**
+   * The display handler itself, which has all the methods.
+   *
+   * @var views_plugin_display
+   */
+  var $handler;
+
+  /**
+   * Stores all options of the display, like fields, filters etc.
+   *
+   * @var array
+   */
+  var $display_options;
+
+  var $db_table = 'views_display';
+
+  function __construct($init = TRUE) {
+    parent::init($init);
+  }
+
+  function options($type, $id, $title) {
+    $this->display_plugin = $type;
+    $this->id = $id;
+    $this->display_title = $title;
+  }
+}
diff --git a/modules/comment.views_default.inc b/modules/comment.views_default.inc
index 44ebac9..a8a6bd3 100644
--- a/modules/comment.views_default.inc
+++ b/modules/comment.views_default.inc
@@ -5,13 +5,15 @@
  * Bulk export of views_default objects generated by Bulk export module.
  */
 
+use Drupal\views\View;
+
 /**
  * Implementation of hook_views_default_views()
  */
 function comment_views_default_views() {
   $views = array();
 
-  $view = new view;
+  $view = new View();
   $view->name = 'comments_recent';
   $view->description = 'Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.';
   $view->tag = 'default';
@@ -121,7 +123,7 @@ function comment_views_default_views() {
 
   $views['comments_recent'] = $view;
 
-  $view = new view;
+  $view = new View();
   $view->name = 'tracker';
   $view->description = 'Shows all new activity on system.';
   $view->tag = 'default';
diff --git a/modules/node.views_default.inc b/modules/node.views_default.inc
index 93886a7..bfc5f39 100644
--- a/modules/node.views_default.inc
+++ b/modules/node.views_default.inc
@@ -5,13 +5,15 @@
  * Bulk export of views_default objects generated by Bulk export module.
  */
 
+use Drupal\views\View;
+
 /**
  * Implementation of hook_views_default_views()
  */
 function node_views_default_views() {
   $views = array();
 
-  $view = new view;
+  $view = new View();
   $view->name = 'archive';
   $view->description = 'Display a list of months that link to content for that month.';
   $view->tag = 'default';
@@ -98,7 +100,7 @@ function node_views_default_views() {
 
   $views['archive'] = $view;
 
-  $view = new view;
+  $view = new View();
   $view->name = 'frontpage';
   $view->description = 'Emulates the default Drupal front page; you may set the default home page path to this view to make it your front page.';
   $view->tag = 'default';
@@ -179,7 +181,7 @@ function node_views_default_views() {
 
   $views['frontpage'] = $view;
 
-  $view = new view;
+  $view = new View();
   $view->name = 'glossary';
   $view->description = 'A list of all content, by letter.';
   $view->tag = 'default';
diff --git a/modules/node.views_template.inc b/modules/node.views_template.inc
index b2b184d..511dedb 100644
--- a/modules/node.views_template.inc
+++ b/modules/node.views_template.inc
@@ -5,12 +5,14 @@
  * Contains views templates on behalf of the node module.
  */
 
+use Drupal\views\View;
+
 function node_views_templates() {
   // Only the standard install profile has the image field provided so only show it for it.
   if (variable_get('install_profile', 'standard') != 'standard') {
     return array();
   }
-  $view = new view;
+  $view = new View();
   $view->name = 'image_gallery';
   $view->description = 'Shows all images which was uploaded on the "field_image" field';
   $view->tag = '';
diff --git a/modules/search.views_default.inc b/modules/search.views_default.inc
index 449dfb3..71d71b7 100644
--- a/modules/search.views_default.inc
+++ b/modules/search.views_default.inc
@@ -5,13 +5,15 @@
  * Bulk export of views_default objects generated by Bulk export module.
  */
 
+use Drupal\views\View;
+
 /**
  * Implementation of hook_views_default_views()
  */
 function search_views_default_views() {
   $views = array();
 
-  $view = new view;
+  $view = new View();
   $view->name = 'backlinks';
   $view->description = 'Displays a list of nodes that link to the node, using the search backlinks table.';
   $view->tag = 'default';
diff --git a/modules/statistics.views_default.inc b/modules/statistics.views_default.inc
index 84a9427..dd97b8b 100644
--- a/modules/statistics.views_default.inc
+++ b/modules/statistics.views_default.inc
@@ -5,13 +5,15 @@
  * Bulk export of views_default objects generated by Bulk export module.
  */
 
+use Drupal\views\View;
+
 /**
  * Implementation of hook_views_default_views()
  */
 function statistics_views_default_views() {
   $views = array();
 
-  $view = new view;
+  $view = new View();
   $view->name = 'popular';
   $view->description = 'Shows the most-viewed nodes on the site. This requires the statistics to be enabled at administer >> reports >> access log settings.';
   $view->tag = 'default';
diff --git a/modules/taxonomy.views_default.inc b/modules/taxonomy.views_default.inc
index db53fc2..f6936b2 100644
--- a/modules/taxonomy.views_default.inc
+++ b/modules/taxonomy.views_default.inc
@@ -5,13 +5,15 @@
  * Bulk export of views_default objects generated by Bulk export module.
  */
 
+use Drupal\views\View;
+
 /**
  * Implementation of hook_views_default_views()
  */
 function taxonomy_views_default_views() {
   $views = array();
 
-  $view = new view;
+  $view = new View();
   $view->name = 'taxonomy_term';
   $view->description = 'A view to emulate Drupal core\'s handling of taxonomy/term.';
   $view->tag = 'default';
diff --git a/plugins/views_plugin_display.inc b/plugins/views_plugin_display.inc
index cbfb60c..46b8007 100644
--- a/plugins/views_plugin_display.inc
+++ b/plugins/views_plugin_display.inc
@@ -5,6 +5,8 @@
  * Contains the base display plugin.
  */
 
+use Drupal\views\View;
+
 /**
  * @defgroup views_display_plugins Views display plugins
  * @{
@@ -40,7 +42,7 @@ class views_plugin_display extends views_plugin {
   /**
    * Stores the rendered output of the display.
    *
-   * @see view::render
+   * @see View::render
    * @var string
    */
   public $output = NULL;
@@ -916,7 +918,7 @@ class views_plugin_display extends views_plugin {
   function get_handlers($type) {
     if (!isset($this->handlers[$type])) {
       $this->handlers[$type] = array();
-      $types = views_object_types();
+      $types = View::views_object_types();
       $plural = $types[$type]['plural'];
 
       foreach ($this->get_option($plural) as $id => $info) {
@@ -2696,7 +2698,7 @@ class views_plugin_display extends views_plugin {
     }
 
     // Validate handlers
-    foreach (views_object_types() as $type => $info) {
+    foreach (View::views_object_types() as $type => $info) {
       foreach ($this->get_handlers($type) as $handler) {
         $result = $handler->validate();
         if (!empty($result) && is_array($result)) {
@@ -2721,7 +2723,7 @@ class views_plugin_display extends views_plugin {
    *
    */
   function is_identifier_unique($id, $identifier) {
-    foreach (views_object_types() as $type => $info) {
+    foreach (View::views_object_types() as $type => $info) {
       foreach ($this->get_handlers($type) as $key => $handler) {
         if ($handler->can_expose() && $handler->is_exposed()) {
           if ($id != $key && $identifier == $handler->options['expose']['identifier']) {
@@ -2818,7 +2820,7 @@ class views_plugin_display extends views_plugin {
     else {
       $type = $option;
     }
-    $types = views_object_types();
+    $types = View::views_object_types();
     foreach ($storage[$option] as $id => $info) {
       if (!empty($types[$type]['type'])) {
         $handler_type = $types[$type]['type'];
@@ -2976,7 +2978,7 @@ class views_plugin_display extends views_plugin {
     else {
       $type = $option;
     }
-    $types = views_object_types();
+    $types = View::views_object_types();
     foreach ($storage[$option] as $id => $info) {
       if (!empty($types[$type]['type'])) {
         $handler_type = $types[$type]['type'];
diff --git a/plugins/views_wizard/views_ui_base_views_wizard.class.php b/plugins/views_wizard/views_ui_base_views_wizard.class.php
index cf402b2..32c8ccd 100644
--- a/plugins/views_wizard/views_ui_base_views_wizard.class.php
+++ b/plugins/views_wizard/views_ui_base_views_wizard.class.php
@@ -552,7 +552,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface {
             // Generate a unique ID for each field so we don't overwrite
             // existing ones.
             foreach ($path_fields as &$field) {
-              $field['id'] = view::generate_item_id($field['id'], $display_options['default']['fields']);
+              $field['id'] = View::generate_item_id($field['id'], $display_options['default']['fields']);
               $display_options['default']['fields'][$field['id']] = $field;
             }
 
diff --git a/tests/comment/views_handler_argument_comment_user_uid.test b/tests/comment/views_handler_argument_comment_user_uid.test
index b228b75..3361027 100644
--- a/tests/comment/views_handler_argument_comment_user_uid.test
+++ b/tests/comment/views_handler_argument_comment_user_uid.test
@@ -5,6 +5,8 @@
  * Definition of viewsHandlerArgumentCommentUserUidTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests the argument_comment_user_uid handler.
  */
@@ -69,7 +71,7 @@ class viewsHandlerArgumentCommentUserUidTest extends ViewsSqlTest {
   }
 
   function view_comment_user_uid() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_comment_user_uid';
     $view->description = '';
     $view->tag = 'default';
diff --git a/tests/field/views_fieldapi.test b/tests/field/views_fieldapi.test
index aa57988..0f82987 100644
--- a/tests/field/views_fieldapi.test
+++ b/tests/field/views_fieldapi.test
@@ -5,6 +5,8 @@
  * Tests the fieldapi integration of viewsdata.
  */
 
+use Drupal\views\View;
+
 /**
  * @TODO
  *   - Test on a generic entity not on a node.
@@ -438,7 +440,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
   }
 
   protected function getFieldView() {
-    $view = new view;
+    $view = new View();
     $view->name = 'view_fieldapi';
     $view->description = '';
     $view->tag = 'default';
diff --git a/tests/handlers/views_handler_argument_string.test b/tests/handlers/views_handler_argument_string.test
index d078abf..64dad82 100644
--- a/tests/handlers/views_handler_argument_string.test
+++ b/tests/handlers/views_handler_argument_string.test
@@ -4,6 +4,8 @@
  * Definition of ViewsHandlerArgumentNullTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests the core views_handler_argument_string handler.
  */
@@ -56,7 +58,7 @@ class ViewsHandlerArgumentStringTest extends ViewsSqlTest {
    * @return view
    */
   function viewGlossary() {
-    $view = new view();
+    $view = new View();
     $view->name = 'test_glossary';
     $view->description = '';
     $view->tag = 'default';
diff --git a/tests/handlers/views_handler_filter_date.test b/tests/handlers/views_handler_filter_date.test
index cc1eced..002e8a0 100644
--- a/tests/handlers/views_handler_filter_date.test
+++ b/tests/handlers/views_handler_filter_date.test
@@ -5,6 +5,8 @@
  * Definition of ViewsHandlerFilterDateTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests the core views_handler_filter_date handler.
  */
@@ -151,7 +153,7 @@ class ViewsHandlerFilterDateTest extends ViewsSqlTest {
   }
 
   function views_test_between() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_filter_date_between';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/plugins/views_plugin_display.test b/tests/plugins/views_plugin_display.test
index df33a34..ca6718e 100644
--- a/tests/plugins/views_plugin_display.test
+++ b/tests/plugins/views_plugin_display.test
@@ -5,6 +5,8 @@
  * Definition of ViewsPluginDisplayTestCase.
  */
 
+use Drupal\views\View;
+
 /**
  *
  */
@@ -38,7 +40,7 @@ class ViewsPluginDisplayTestCase extends ViewsSqlTest {
    * @return view
    */
   function viewFilterGroupsOverriding() {
-    $view = new view();
+    $view = new View();
     $view->name = 'test_filter_group_override';
     $view->description = '';
     $view->tag = 'default';
@@ -103,7 +105,7 @@ class ViewsPluginDisplayTestCase extends ViewsSqlTest {
    * @return view
    */
   function viewFilterGroupsUpdating() {
-    $view = new view();
+    $view = new View();
     $view->name = 'test_filter_groups';
     $view->description = '';
     $view->tag = 'default';
diff --git a/tests/styles/views_plugin_style_jump_menu.test b/tests/styles/views_plugin_style_jump_menu.test
index 9a53bfc..98c4b0f 100644
--- a/tests/styles/views_plugin_style_jump_menu.test
+++ b/tests/styles/views_plugin_style_jump_menu.test
@@ -5,6 +5,8 @@
  * Definition of viewsPluginStyleJumpMenuTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests jump menu style functionality.
  */
@@ -58,7 +60,7 @@ class viewsPluginStyleJumpMenuTest extends ViewsSqlTest {
   }
 
   function getJumpMenuView() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_jump_menu';
     $view->description = '';
     $view->tag = 'default';
diff --git a/tests/user/views_handler_field_user_name.test b/tests/user/views_handler_field_user_name.test
index 6ace471..fa5fa6e 100644
--- a/tests/user/views_handler_field_user_name.test
+++ b/tests/user/views_handler_field_user_name.test
@@ -5,6 +5,8 @@
  * Definition of viewsHandlerFieldUserNameTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests the field username handler.
  *
@@ -53,7 +55,7 @@ class viewsHandlerFieldUserNameTest extends ViewsSqlTest {
 
   }
   function view_user_name() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_views_handler_field_user_name';
     $view->description = '';
     $view->tag = 'default';
diff --git a/tests/user/views_user.test b/tests/user/views_user.test
index 52c5026..e92735e 100644
--- a/tests/user/views_user.test
+++ b/tests/user/views_user.test
@@ -5,6 +5,8 @@
  * Definition of ViewsUserTestCase.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests basic user module integration into views.
  */
@@ -52,7 +54,7 @@ class ViewsUserTestCase extends ViewsSqlTest {
   }
 
   function test_view_user_relationship() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_user_relationship';
     $view->description = '';
     $view->tag = 'default';
diff --git a/tests/user/views_user_argument_default.test b/tests/user/views_user_argument_default.test
index afb24d1..61caced 100644
--- a/tests/user/views_user_argument_default.test
+++ b/tests/user/views_user_argument_default.test
@@ -5,6 +5,8 @@
  * Definition of ViewsUserArgumentDefault.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests views user argument default plugin.
  */
@@ -41,7 +43,7 @@ class ViewsUserArgumentDefault extends ViewsSqlTest {
   }
 
   function view_plugin_argument_default_current_user() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_plugin_argument_default_current_user';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/user/views_user_argument_validate.test b/tests/user/views_user_argument_validate.test
index 6e157bf..37be192 100644
--- a/tests/user/views_user_argument_validate.test
+++ b/tests/user/views_user_argument_validate.test
@@ -5,6 +5,8 @@
  * Definition of ViewsUserArgumentValidate.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests views user argument argument handler.
  */
@@ -81,7 +83,7 @@ class ViewsUserArgumentValidate extends ViewsSqlTest {
   }
 
   function view_argument_validate_user($argtype) {
-    $view = new view;
+    $view = new View();
     $view->name = 'view_argument_validate_user';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/views_access.test b/tests/views_access.test
index f02eca9..771be1a 100644
--- a/tests/views_access.test
+++ b/tests/views_access.test
@@ -5,6 +5,8 @@
  * Definition of ViewsAccessTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Basic test for pluggable access.
  */
@@ -159,7 +161,7 @@ class ViewsAccessTest extends ViewsSqlTest {
   }
 
   function view_access_none() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_access_none';
     $view->description = '';
     $view->tag = '';
@@ -182,7 +184,7 @@ class ViewsAccessTest extends ViewsSqlTest {
   }
 
   function view_access_perm() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_access_perm';
     $view->description = '';
     $view->tag = '';
@@ -206,7 +208,7 @@ class ViewsAccessTest extends ViewsSqlTest {
   }
 
   function view_access_role() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_access_role';
     $view->description = '';
     $view->tag = '';
@@ -232,7 +234,7 @@ class ViewsAccessTest extends ViewsSqlTest {
   }
 
   function view_access_dynamic() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_access_dynamic';
     $view->description = '';
     $view->tag = '';
@@ -258,7 +260,7 @@ class ViewsAccessTest extends ViewsSqlTest {
   }
 
   function view_access_static() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_access_static';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/views_argument_default.test b/tests/views_argument_default.test
index 9c0a7eb..7973a12 100644
--- a/tests/views_argument_default.test
+++ b/tests/views_argument_default.test
@@ -5,6 +5,8 @@
  * Definition of ViewsArgumentDefaultTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Basic test for pluggable argument default.
  */
@@ -87,7 +89,7 @@ class ViewsArgumentDefaultTest extends ViewsSqlTest {
   }
 
   function view_argument_default_fixed() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_argument_default_fixed';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/views_argument_validator.test b/tests/views_argument_validator.test
index fb2e4f2..8b5e09b 100644
--- a/tests/views_argument_validator.test
+++ b/tests/views_argument_validator.test
@@ -5,6 +5,8 @@
  * Definition of ViewsArgumentValidatorTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests Views argument validators.
  */
@@ -42,7 +44,7 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest {
 
   function view_test_argument_validate_php($string) {
     $code = 'return $argument == \''. $string .'\';';
-    $view = new view;
+    $view = new View();
     $view->name = 'view_argument_validate_numeric';
     $view->description = '';
     $view->tag = '';
@@ -74,7 +76,7 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest {
   }
 
   function view_argument_validate_numeric() {
-    $view = new view;
+    $view = new View();
     $view->name = 'view_argument_validate_numeric';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/views_cache.test b/tests/views_cache.test
index 5f3076e..a230798 100644
--- a/tests/views_cache.test
+++ b/tests/views_cache.test
@@ -5,6 +5,8 @@
  * Definition of ViewsCacheTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Basic test for pluggable caching.
  *
@@ -25,10 +27,8 @@ class ViewsCacheTest extends ViewsSqlTest {
    * @return view
    */
   protected function getBasicView() {
-    views_include('view');
-
     // Create the basic view.
-    $view = new view();
+    $view = new View();
     $view->name = 'test_view';
     $view->add_display('default');
     $view->base_table = 'views_test';
diff --git a/tests/views_groupby.test b/tests/views_groupby.test
index c59fb6b..af6bb88 100644
--- a/tests/views_groupby.test
+++ b/tests/views_groupby.test
@@ -6,6 +6,7 @@
  */
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\views\View;
 
 /**
  * Tests aggregate functionality of views, for example count.
@@ -62,7 +63,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest {
   //}
 
   public function viewsAggregateCountView() {
-    $view = new view;
+    $view = new View();
     $view->name = 'aggregate_count';
     $view->description = '';
     $view->tag = '';
@@ -147,7 +148,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest {
   }
 
   function viewsGroupByViewHelper($group_by) {
-    $view = new view;
+    $view = new View();
     $view->name = 'group_by_count';
     $view->description = '';
     $view->tag = '';
@@ -241,7 +242,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest {
   }
 
   function viewsGroupByCountViewOnlyFilters() {
-    $view = new view;
+    $view = new View();
     $view->name = 'group_by_in_filters';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/views_pager.test b/tests/views_pager.test
index fef4915..45848bc 100644
--- a/tests/views_pager.test
+++ b/tests/views_pager.test
@@ -5,6 +5,8 @@
  * Definition of ViewsPagerTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests the pluggable pager system.
  */
@@ -95,7 +97,7 @@ class ViewsPagerTest extends ViewsSqlTest {
   }
 
   public function viewsStorePagerSettings() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_store_pager_settings';
     $view->description = '';
     $view->tag = '';
@@ -154,7 +156,7 @@ class ViewsPagerTest extends ViewsSqlTest {
   }
 
   public function viewsPagerNoLimit() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_pager_none';
     $view->description = '';
     $view->tag = '';
@@ -230,7 +232,7 @@ class ViewsPagerTest extends ViewsSqlTest {
   }
 
   public function viewsPagerLimit() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_pager_some';
     $view->description = '';
     $view->tag = '';
@@ -314,7 +316,7 @@ class ViewsPagerTest extends ViewsSqlTest {
   }
 
   function viewPagerFullZeroItemsPerPage() {
-    $view = new view;
+    $view = new View();
     $view->name = 'view_pager_full_zero_items_per_page';
     $view->description = '';
     $view->tag = '';
@@ -354,7 +356,7 @@ class ViewsPagerTest extends ViewsSqlTest {
   }
 
   function viewsPagerFull() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_pager_full';
     $view->description = '';
     $view->tag = '';
@@ -380,7 +382,7 @@ class ViewsPagerTest extends ViewsSqlTest {
   }
 
   function viewsPagerFullFields() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_pager_full';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/views_query.test b/tests/views_query.test
index 30f6983..f6fee36 100644
--- a/tests/views_query.test
+++ b/tests/views_query.test
@@ -6,6 +6,7 @@
  */
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\views\View;
 
 /**
  * Abstract class for views testing.
@@ -365,10 +366,8 @@ abstract class ViewsSqlTest extends ViewsTestCase {
    * @return view
    */
   protected function getBasicView() {
-    views_include('view');
-
     // Create the basic view.
-    $view = new view();
+    $view = new View();
     $view->name = 'test_view';
     $view->add_display('default');
     $view->base_table = 'views_test';
diff --git a/tests/views_test.views_default.inc b/tests/views_test.views_default.inc
index 55156d7..77fadb0 100644
--- a/tests/views_test.views_default.inc
+++ b/tests/views_test.views_default.inc
@@ -5,11 +5,13 @@
  * Tests views.
  */
 
+use Drupal\views\View;
+
 /**
  * Implements hook_views_default_views().
  */
 function views_test_views_default_views() {
-  $view = new view;
+  $view = new View();
   $view->name = 'test_views_groupby_save';
   $view->description = '';
   $view->tag = '';
@@ -31,7 +33,7 @@ function views_test_views_default_views() {
 
   $views[$view->name] = $view;
 
-  $view = new view;
+  $view = new View();
   $view->name = 'test_rename_reset_button';
   $view->description = '';
   $view->tag = '';
@@ -70,7 +72,7 @@ function views_test_views_default_views() {
 
   $views[$view->name] = $view;
 
-  $view = new view;
+  $view = new View();
   $view->name = 'test_exposed_admin_ui';
   $view->description = '';
   $view->tag = '';
@@ -110,7 +112,7 @@ function views_test_views_default_views() {
 
   $views[$view->name] = $view;
 
-  $view = new view;
+  $view = new View();
   $view->name = 'test_filter_in_operator_ui';
   $view->description = '';
   $view->tag = '';
@@ -142,7 +144,7 @@ function views_test_views_default_views() {
 
   $views[$view->name] = $view;
 
-  $view = new view;
+  $view = new View();
   $view->name = 'test_argument_default_current_user';
   $view->description = '';
   $view->tag = '';
diff --git a/tests/views_translatable.test b/tests/views_translatable.test
index f3454cf..d9f61ea 100644
--- a/tests/views_translatable.test
+++ b/tests/views_translatable.test
@@ -5,6 +5,8 @@
  * Definition of ViewsTranslatableTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Tests Views pluggable translations.
  */
@@ -132,7 +134,7 @@ class ViewsTranslatableTest extends ViewsSqlTest {
   }
 
   public function view_unpack_translatable() {
-    $view = new view;
+    $view = new View();
     $view->name = 'view_unpack_translatable';
     $view->description = '';
     $view->tag = '';
diff --git a/tests/views_ui.test b/tests/views_ui.test
index 23046dd..b2e7432 100644
--- a/tests/views_ui.test
+++ b/tests/views_ui.test
@@ -143,7 +143,7 @@ class ViewsUIWizardBasicTestCase extends ViewsUIWizardHelper {
 
     // Check if the export screen works.
     $this->drupalGet('admin/structure/views/view/' . $view3['name'] . '/export');
-    $this->assertRaw('$view = new view();');
+    $this->assertRaw('$view = new View();');
     $this->assertRaw($view3['human_name']);
     $this->assertRaw($view3['description']);
 
diff --git a/tests/views_upgrade.test b/tests/views_upgrade.test
index 3f453db..ac402a4 100644
--- a/tests/views_upgrade.test
+++ b/tests/views_upgrade.test
@@ -5,6 +5,8 @@
  * Definition of ViewsUpgradeTestCase.
  */
 
+use Drupal\views\View;
+
 /**
  * Try to test the upgrade path of all conversions.
  *
@@ -107,7 +109,7 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
   }
 
   public function viewsMovedToField() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_views_move_to_field';
     $view->description = '';
     $view->tag = '';
@@ -128,7 +130,7 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
   }
 
   public function viewsMovedToHandler() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_views_move_to_handler';
     $view->description = '';
     $view->tag = '';
@@ -153,7 +155,7 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
   }
 
   public function viewsMovedToTable() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_views_move_to_table';
     $view->description = '';
     $view->tag = '';
@@ -175,7 +177,7 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
 
   protected function viewUpgradeImport() {
     $import = '
-      $view = new view;
+      $view = new View();
       $view->name = "comments_recent";
       $view->description = "Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.";
       $view->tag = "default";
diff --git a/tests/views_view.test b/tests/views_view.test
index d268a0c..74aba9e 100644
--- a/tests/views_view.test
+++ b/tests/views_view.test
@@ -5,6 +5,8 @@
  * Definition of ViewsViewTest.
  */
 
+use Drupal\views\View;
+
 /**
  * Views class tests.
  */
@@ -93,7 +95,7 @@ class ViewsViewTest extends ViewsSqlTest {
    * This view provides some filters, fields, arguments, relationships, sorts, areas and attachments.
    */
   function view_test_destroy() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_destroy';
     $view->description = '';
     $view->tag = '';
@@ -253,7 +255,7 @@ class ViewsViewTest extends ViewsSqlTest {
     return $view;
   }
   function view_test_delete() {
-    $view = new view;
+    $view = new View();
     $view->name = 'test_view_delete';
     $view->description = '';
     $view->tag = '';
diff --git a/views.api.php b/views.api.php
index 3f83cae..b3a22d7 100644
--- a/views.api.php
+++ b/views.api.php
@@ -660,7 +660,7 @@ function hook_views_api() {
  */
 function hook_views_default_views() {
   // Begin copy and paste of output from the Export tab of a view.
-  $view = new view;
+  $view = new View();
   $view->name = 'frontpage';
   $view->description = 'Emulates the default Drupal front page; you may set the default home page path to this view to make it your front page.';
   $view->tag = 'default';
diff --git a/views.info b/views.info
index 70f1bf5..433e6f1 100644
--- a/views.info
+++ b/views.info
@@ -59,7 +59,6 @@ files[] = handlers/views_handler_sort_random.inc
 files[] = includes/base.inc
 files[] = includes/handlers.inc
 files[] = includes/plugins.inc
-files[] = includes/view.inc
 ; Modules
 files[] = modules/aggregator/views_handler_argument_aggregator_fid.inc
 files[] = modules/aggregator/views_handler_argument_aggregator_iid.inc
diff --git a/views.install b/views.install
index b04b285..90c0b64 100644
--- a/views.install
+++ b/views.install
@@ -104,7 +104,7 @@ function views_schema_6000() {
         'minimum_version' => '2',
         'current_version' => '3.0',
       ),
-      'object' => 'view',
+      'object' => 'Drupal\views\View',
       // the callback to load the displays
       'subrecords callback' => 'views_load_display_records',
       // the variable that holds enabled/disabled status
diff --git a/views.module b/views.module
index b039ccc..4ec5c3c 100644
--- a/views.module
+++ b/views.module
@@ -10,6 +10,7 @@
  */
 
 use Drupal\Core\Database\Query\AlterableInterface;
+use Drupal\views\View;
 
 /**
  * Advertise the current views api version
@@ -1303,8 +1304,7 @@ function views_get_all_templates() {
  *   it can be successfully saved.
  */
 function views_new_view() {
-  views_include('view');
-  $view = new view();
+  $view = new View();
   $view->vid = 'new';
   $view->add_display('default');
 
@@ -1538,9 +1538,10 @@ function views_load_display_records(&$views) {
     return;
   }
 
-  foreach (view::db_objects() as $key) {
-    $object_name = "views_$key";
-    $result = db_query("SELECT * FROM {{$object_name}} WHERE vid IN (:vids) ORDER BY vid, position",
+  foreach (View::db_objects() as $key) {
+    $table_name = "views_" . strtolower($key);
+    $object_name = "Views$key";
+    $result = db_query("SELECT * FROM {{$table_name}} WHERE vid IN (:vids) ORDER BY vid, position",
       array(':vids' => array_keys($names)));
 
     foreach ($result as $data) {
diff --git a/views_ui.module b/views_ui.module
index d96b292..4306ea0 100644
--- a/views_ui.module
+++ b/views_ui.module
@@ -5,6 +5,8 @@
  * Provide structure for the administrative interface to Views.
  */
 
+use Drupal\views\View;
+
 /**
  * Implements hook_menu().
  */
@@ -268,7 +270,6 @@ function views_ui_edit_page_title($view) {
  */
 function views_ui_cache_load($name) {
   ctools_include('object-cache');
-  views_include('view');
   $view = ctools_object_cache_get('view', $name);
   $original_view = views_get_view($name);
 
@@ -457,7 +458,7 @@ function views_ui_view_preview_section_handler_links($view, $type, $title = FALS
   $handlers = $view->display_handler->get_handlers($type);
   $links = array();
 
-  $types = views_object_types();
+  $types = View::views_object_types();
   if ($title) {
     $links[$type . '-title'] = array(
       'title' => $types[$type]['title'],
