diff --git a/core/modules/comment/comment.api.php b/core/modules/comment/comment.api.php
index 375f6da..893a368 100644
--- a/core/modules/comment/comment.api.php
+++ b/core/modules/comment/comment.api.php
@@ -24,7 +24,7 @@
  */
 function hook_comment_presave(Drupal\comment\Comment $comment) {
   // Remove leading & trailing spaces from the comment subject.
-  $comment->subject->value = trim($comment->subject->value);
+  $comment->setSubject(trim($comment->getSubject()));
 }
 
 /**
@@ -35,8 +35,8 @@ function hook_comment_presave(Drupal\comment\Comment $comment) {
  */
 function hook_comment_insert(Drupal\comment\Comment $comment) {
   // Reindex the node when comments are added.
-  if ($comment->entity_type->value == 'node') {
-    node_reindex_node_search($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    node_reindex_node_search($comment->getCommentedEntityId());
   }
 }
 
@@ -48,8 +48,8 @@ function hook_comment_insert(Drupal\comment\Comment $comment) {
  */
 function hook_comment_update(Drupal\comment\Comment $comment) {
   // Reindex the node when comments are updated.
-  if ($comment->entity_type->value == 'node') {
-    node_reindex_node_search($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    node_reindex_node_search($comment->getCommentedEntityId());
   }
 }
 
@@ -149,7 +149,7 @@ function hook_comment_view_alter(&$build, \Drupal\comment\Entity\Comment $commen
  *   The comment the action is being performed on.
  */
 function hook_comment_publish(Drupal\comment\Comment $comment) {
-  drupal_set_message(t('Comment: @subject has been published', array('@subject' => $comment->subject->value)));
+  drupal_set_message(t('Comment: @subject has been published', array('@subject' => $comment->getSubject())));
 }
 
 /**
@@ -159,7 +159,7 @@ function hook_comment_publish(Drupal\comment\Comment $comment) {
  *   The comment the action is being performed on.
  */
 function hook_comment_unpublish(Drupal\comment\Comment $comment) {
-  drupal_set_message(t('Comment: @subject has been unpublished', array('@subject' => $comment->subject->value)));
+  drupal_set_message(t('Comment: @subject has been unpublished', array('@subject' => $comment->getSubject())));
 }
 
 /**
@@ -194,7 +194,7 @@ function hook_comment_predelete(Drupal\comment\Comment $comment) {
  * @see entity_delete_multiple()
  */
 function hook_comment_delete(Drupal\comment\Comment $comment) {
-  drupal_set_message(t('Comment: @subject has been deleted', array('@subject' => $comment->subject->value)));
+  drupal_set_message(t('Comment: @subject has been deleted', array('@subject' => $comment->getSubject())));
 }
 
 /**
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index ec6a2cc..2faf4a2 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -745,7 +745,7 @@ function comment_prepare_thread(&$comments) {
   foreach ($comments as $key => &$comment) {
     // The $divs element instructs #prefix whether to add an indent div or
     // close existing divs (a negative value).
-    $comment->depth = count(explode('.', $comment->thread->value)) - 1;
+    $comment->depth = count(explode('.', $comment->getThread())) - 1;
     if ($comment->depth > $divs) {
       $comment->divs = 1;
       $divs++;
@@ -931,7 +931,7 @@ function comment_entity_insert(EntityInterface $entity) {
       'last_comment_timestamp',
       'last_comment_name',
       'last_comment_uid',
-      'comment_count'
+      'comment_count',
     ));
     foreach ($fields as $field_name => $detail) {
       // Skip fields that entity does not have.
@@ -1083,7 +1083,7 @@ function comment_user_cancel($edit, $account, $method) {
     case 'user_cancel_block_unpublish':
       $comments = entity_load_multiple_by_properties('comment', array('uid' => $account->id()));
       foreach ($comments as $comment) {
-        $comment->status->value = 0;
+        $comment->setPublished(COMMENT_NOT_PUBLISHED);
         $comment->save();
       }
       break;
@@ -1091,7 +1091,7 @@ function comment_user_cancel($edit, $account, $method) {
     case 'user_cancel_reassign':
       $comments = entity_load_multiple_by_properties('comment', array('uid' => $account->id()));
       foreach ($comments as $comment) {
-        $comment->uid->target_id = 0;
+        $comment->setAuthorId(0);
         $comment->save();
       }
       break;
@@ -1273,26 +1273,28 @@ function comment_get_display_page($cid, $instance) {
  */
 function comment_preview(CommentInterface $comment, array &$form_state) {
   $preview_build = array();
-  $entity = entity_load($comment->entity_type->value, $comment->entity_id->value);
+  $entity = entity_load($comment->getCommentedEntityType(), $comment->getCommentedEntityId());
 
   if (!form_get_errors($form_state)) {
     // Attach the user and time information.
-    if (!empty($comment->name->value)) {
-      $account = user_load_by_name($comment->name->value);
+    $author_name = $comment->getAuthorName();
+    if (!empty($author_name)) {
+      $account = user_load_by_name($author_name);
     }
     elseif (\Drupal::currentUser()->isAuthenticated() && empty($comment->is_anonymous)) {
       $account = \Drupal::currentUser();
     }
 
     if (!empty($account) && $account->isAuthenticated()) {
-      $comment->uid->target_id = $account->id();
-      $comment->name->value = check_plain($account->getUsername());
+      $comment->setAuthorId($account->id());
+      $comment->setAuthorName(check_plain($account->getUsername()));
     }
-    else {
-      $comment->name->value = \Drupal::config('user.settings')->get('anonymous');
+    elseif (empty($author_name)) {
+      $comment->setAuthorName(\Drupal::config('user.settings')->get('anonymous'));
     }
 
-    $comment->created->value = !empty($comment->created->value) ? $comment->created->value : REQUEST_TIME;
+    $created_time = !is_null($comment->getCreatedTime()) ? $comment->getCreatedTime() : REQUEST_TIME;
+    $comment->setCreatedTime($created_time);
     $comment->changed->value = REQUEST_TIME;
     $comment->in_preview = TRUE;
     $comment_build = comment_view($comment);
@@ -1301,10 +1303,10 @@ function comment_preview(CommentInterface $comment, array &$form_state) {
     $preview_build['comment_preview'] = $comment_build;
   }
 
-  if ($comment->pid->target_id) {
+  if ($comment->hasParentComment()) {
     $build = array();
-    $parent = $comment->pid->entity;
-    if ($parent && $parent->status->value == CommentInterface::PUBLISHED) {
+    $parent = $comment->getParentComment();
+    if ($parent && $parent->isPublished()) {
       $build = comment_view($parent);
     }
   }
@@ -1320,7 +1322,7 @@ function comment_preview(CommentInterface $comment, array &$form_state) {
     // entity is rendered, it excludes the comment field output. As objects are
     // always addressed by reference we ensure changes are not lost by setting
     // the value back to its original state after the call to entity_view().
-    $field_name = $comment->field_name->value;
+    $field_name = $comment->getFieldName();
     $original_value = $entity->get($field_name);
     $entity->set($field_name, COMMENT_HIDDEN);
     $build = entity_view($entity, 'full');
@@ -1358,7 +1360,7 @@ function comment_prepare_author(CommentInterface $comment) {
   // The account has been pre-loaded by CommentViewBuilder::buildContent().
   $account = $comment->uid->entity;
   if (empty($account->uid->value)) {
-    $account = entity_create('user', array('uid' => 0, 'name' => $comment->name->value, 'homepage' => $comment->homepage->value));
+    $account = entity_create('user', array('uid' => 0, 'name' => $comment->getAuthorName(), 'homepage' => $comment->getHomepage()));
   }
   return $account;
 }
@@ -1375,7 +1377,7 @@ function comment_prepare_author(CommentInterface $comment) {
  */
 function template_preprocess_comment(&$variables) {
   $comment = $variables['elements']['#comment'];
-  $commented_entity = entity_load($comment->entity_type->value, $comment->entity_id->value);
+  $commented_entity = $comment->getCommentedEntity();
   $variables['comment'] = $comment;
   $variables['commented_entity'] = $commented_entity;
 
@@ -1386,14 +1388,14 @@ function template_preprocess_comment(&$variables) {
     '#account' => $account,
   );
   $variables['author'] = drupal_render($username);
-  $variables['new_indicator_timestamp'] = $comment->changed->value;
-  $variables['created'] = format_date($comment->created->value);
+  $variables['new_indicator_timestamp'] = $comment->getChangedTime();
+  $variables['created'] = format_date($comment->getCreatedTime());
   // Avoid calling format_date() twice on the same timestamp.
-  if ($comment->changed->value == $comment->created->value) {
+  if ($comment->getChangedTime() == $comment->getCreatedTime()) {
     $variables['changed'] = $variables['created'];
   }
   else {
-    $variables['changed'] = format_date($comment->changed->value);
+    $variables['changed'] = format_date($comment->getChangedTime());
   }
 
   if (theme_get_setting('features.comment_user_picture')) {
@@ -1416,13 +1418,13 @@ function template_preprocess_comment(&$variables) {
   $permalink_uri = $comment->permalink();
   $uri['options'] += array('attributes' => array('class' => 'permalink', 'rel' => 'bookmark'));
 
-  $variables['title'] = l($comment->subject->value, $uri['path'], $uri['options']);
+  $variables['title'] = l($comment->getSubject(), $uri['path'], $uri['options']);
   $variables['permalink'] = l(t('Permalink'), $permalink_uri['path'], $permalink_uri['options']);
   $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['author'], '!datetime' => $variables['created']));
 
-  if ($comment->pid->target_id) {
+  if ($comment->hasParentComment()) {
     // Fetch and store the parent comment information for use in templates.
-    $comment_parent = $comment->pid->entity;
+    $comment_parent = $comment->getParentComment();
     $account_parent = comment_prepare_author($comment_parent);
     $variables['parent_comment'] = $comment_parent;
     // @todo Do not call theme() here. We do this for purposes of t().
@@ -1431,17 +1433,17 @@ function template_preprocess_comment(&$variables) {
       '#account' => $account_parent,
     );
     $variables['parent_author'] = drupal_render($username);
-    $variables['parent_created'] = format_date($comment_parent->created->value);
+    $variables['parent_created'] = format_date($comment_parent->getCreatedTime());
     // Avoid calling format_date() twice on the same timestamp.
-    if ($comment_parent->changed->value == $comment_parent->created->value) {
+    if ($comment_parent->getChangedTime() == $comment_parent->getCreatedTime()) {
       $variables['parent_changed'] = $variables['parent_created'];
     }
     else {
-      $variables['parent_changed'] = format_date($comment_parent->changed->value);
+      $variables['parent_changed'] = format_date($comment_parent->getChangedTime());
     }
     $permalink_uri_parent = $comment_parent->permalink();
     $permalink_uri_parent['options'] += array('attributes' => array('class' => array('permalink'), 'rel' => 'bookmark'));
-    $variables['parent_title'] = l($comment_parent->subject->value, $permalink_uri_parent['path'], $permalink_uri_parent['options']);
+    $variables['parent_title'] = l($comment_parent->getSubject(), $permalink_uri_parent['path'], $permalink_uri_parent['options']);
     $variables['parent_permalink'] = l(t('Parent permalink'), $permalink_uri_parent['path'], $permalink_uri_parent['options']);
     $variables['parent'] = t('In reply to !parent_title by !parent_username',
         array('!parent_username' => $variables['parent_author'], '!parent_title' => $variables['parent_title']));
@@ -1469,7 +1471,7 @@ function template_preprocess_comment(&$variables) {
     $variables['status'] = 'preview';
   }
   else {
-    $variables['status'] = ($comment->status->value == CommentInterface::NOT_PUBLISHED) ? 'unpublished' : 'published';
+    $variables['status'] = $comment->isPublished() ? 'published' : 'unpublished';
   }
 
   // Gather comment classes.
@@ -1491,7 +1493,7 @@ function template_preprocess_comment(&$variables) {
   $variables['attributes']['class'][] = 'clearfix';
 
   // Add comment author user ID. Necessary for the comment-by-viewer library.
-  $variables['attributes']['data-comment-user-id'] = $comment->uid->value;
+  $variables['attributes']['data-comment-user-id'] = $comment->getAuthorId();
 
   $variables['content_attributes']['class'][] = 'content';
 }
@@ -1637,8 +1639,8 @@ function comment_ranking() {
  */
 function comment_file_download_access($field, EntityInterface $entity, FileInterface $file) {
   if ($entity->entityType() == 'comment') {
-    if (user_access('access comments') && $entity->status->value == CommentInterface::PUBLISHED || user_access('administer comments')) {
-      $commented_entity = entity_load($entity->entity_type->value, $entity->entity_id->value);
+    if (user_access('access comments') && $entity->isPublished() || user_access('administer comments')) {
+      $commented_entity = $entity->getCommentedEntity();
       // Check access to parent entity.
       return $commented_entity->access('view');
     }
diff --git a/core/modules/comment/comment.tokens.inc b/core/modules/comment/comment.tokens.inc
index eab4d3e..464e266 100644
--- a/core/modules/comment/comment.tokens.inc
+++ b/core/modules/comment/comment.tokens.inc
@@ -136,32 +136,22 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
           $replacements[$original] = $comment->id();
           break;
 
-        // Poster identity information for comments
+        // Poster identity information for comments.
         case 'hostname':
-          $replacements[$original] = $sanitize ? check_plain($comment->hostname->value) : $comment->hostname->value;
-          break;
-
-        case 'name':
-          $name = ($comment->uid->target_id == 0) ? \Drupal::config('user.settings')->get('anonymous') : $comment->name->value;
-          $replacements[$original] = $sanitize ? filter_xss($name) : $name;
+          $replacements[$original] = $sanitize ? check_plain($comment->getHostname()) : $comment->getHostname();
           break;
 
         case 'mail':
-          if ($comment->uid->target_id != 0) {
-            $mail = $comment->uid->entity->getEmail();
-          }
-          else {
-            $mail = $comment->mail->value;
-          }
+          $mail = $comment->getAuthorEmail();
           $replacements[$original] = $sanitize ? check_plain($mail) : $mail;
           break;
 
         case 'homepage':
-          $replacements[$original] = $sanitize ? check_url($comment->homepage->value) : $comment->homepage->value;
+          $replacements[$original] = $sanitize ? check_url($comment->getHomepage()) : $comment->getHomepage();
           break;
 
         case 'title':
-          $replacements[$original] = $sanitize ? filter_xss($comment->subject->value) : $comment->subject->value;
+          $replacements[$original] = $sanitize ? filter_xss($comment->getSubject()) : $comment->getSubject();
           break;
 
         case 'body':
@@ -179,28 +169,30 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
           $replacements[$original] = url('comment/' . $comment->id() . '/edit', $url_options);
           break;
 
-        // Default values for the chained tokens handled below.
+        // @todo remove 'name' token in favour of 'author'.
+        case 'name':
         case 'author':
-          $replacements[$original] = $sanitize ? filter_xss($comment->name->value) : $comment->name->value;
+          $name = $comment->getAuthorName();
+          $replacements[$original] = $sanitize ? filter_xss($name) : $name;
           break;
 
         case 'parent':
-          if (!empty($comment->pid->target_id)) {
-            $parent = entity_load('comment', $comment->pid->target_id);
-            $replacements[$original] = $sanitize ? filter_xss($parent->subject->value) : $parent->subject->value;
+          if ($comment->hasParentComment()) {
+            $parent = $comment->getParentComment();
+            $replacements[$original] = $sanitize ? filter_xss($parent->getSubject()) : $parent->getSubject();
           }
           break;
 
         case 'created':
-          $replacements[$original] = format_date($comment->created->value, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($comment->getCreatedTime(), 'medium', '', NULL, $langcode);
           break;
 
         case 'changed':
-          $replacements[$original] = format_date($comment->changed->value, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($comment->getChangedTime(), 'medium', '', NULL, $langcode);
           break;
 
         case 'entity':
-          $entity = entity_load($comment->entity_type->value, $comment->entity_id->value);
+          $entity = $comment->getCommentedEntity();
           $title = $entity->label();
           $replacements[$original] = $sanitize ? filter_xss($title) : $title;
           break;
@@ -209,8 +201,8 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
           // Support legacy comment node tokens, since tokes are embedded in
           // user data and can't be upgraded directly.
           // @todo Remove in Drupal 9, see https://drupal.org/node/2031901.
-          if ($comment->entity_type->value == 'node') {
-            $entity = entity_load($comment->entity_type->value, $comment->entity_id->value);
+          if ($comment->getCommentedEntityType() == 'node') {
+            $entity = $comment->getCommentedEntity();
             $title = $entity->label();
             $replacements[$original] = $sanitize ? filter_xss($title) : $title;
           }
@@ -223,28 +215,28 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
 
     // Chained token relationships.
     if ($entity_tokens = $token_service->findwithPrefix($tokens, 'entity')) {
-      $entity = entity_load($comment->entity_type->value, $comment->entity_id->value);
-      $replacements += $token_service->generate($comment->entity_type->value, $entity_tokens, array($comment->entity_type->value => $entity), $options);
+      $entity = $comment->getCommentedEntity();
+      $replacements += $token_service->generate($comment->getCommentedEntityType(), $entity_tokens, array($comment->getCommentedEntityType() => $entity), $options);
     }
 
-    if (($node_tokens = $token_service->findwithPrefix($tokens, 'node')) && $comment->entity_type->value == 'node') {
-      $node = entity_load($comment->entity_type->value, $comment->entity_id->value);
+    if (($node_tokens = $token_service->findwithPrefix($tokens, 'node')) && $comment->getCommentedEntityType() == 'node') {
+      $node = $comment->getCommentedEntity();
       $replacements += $token_service->generate('node', $node_tokens, array('node' => $node), $options);
     }
 
     if ($date_tokens = $token_service->findwithPrefix($tokens, 'created')) {
-      $replacements += $token_service->generate('date', $date_tokens, array('date' => $comment->created->value), $options);
+      $replacements += $token_service->generate('date', $date_tokens, array('date' => $comment->getCreatedTime()), $options);
     }
 
     if ($date_tokens = $token_service->findwithPrefix($tokens, 'changed')) {
-      $replacements += $token_service->generate('date', $date_tokens, array('date' => $comment->changed->value), $options);
+      $replacements += $token_service->generate('date', $date_tokens, array('date' => $comment->getChangedTime()), $options);
     }
 
-    if (($parent_tokens = $token_service->findwithPrefix($tokens, 'parent')) && $parent = $comment->pid->entity) {
+    if (($parent_tokens = $token_service->findwithPrefix($tokens, 'parent')) && $parent = $comment->getParentComment()) {
       $replacements += $token_service->generate('comment', $parent_tokens, array('comment' => $parent), $options);
     }
 
-    if (($author_tokens = $token_service->findwithPrefix($tokens, 'author')) && $account = $comment->uid->entity) {
+    if (($author_tokens = $token_service->findwithPrefix($tokens, 'author')) && $account = $comment->getAuthor()) {
       $replacements += $token_service->generate('user', $author_tokens, array('user' => $account), $options);
     }
   }
@@ -253,7 +245,7 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
     $entity = !empty($data['entity']) ? $data['entity'] : $data['node'];
 
     foreach ($tokens as $name => $original) {
-      switch($name) {
+      switch ($name) {
         case 'comment-count':
           $count = 0;
           $fields = array_keys(\Drupal::service('comment.manager')->getFields($entity->entityType()));
diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
index 3f88b51..5cb0db8 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
@@ -78,8 +78,8 @@ protected function init(array &$form_state) {
    */
   public function form(array $form, array &$form_state) {
     $comment = $this->entity;
-    $entity = $this->entityManager->getStorageController($comment->entity_type->value)->load($comment->entity_id->value);
-    $field_name = $comment->field_name->value;
+    $entity = $this->entityManager->getStorageController($comment->getCommentedEntityType())->load($comment->getCommentedEntityId());
+    $field_name = $comment->getFieldName();
     $instance = $this->fieldInfo->getInstance($entity->entityType(), $entity->bundle(), $field_name);
 
     // Use #comment-form as unique jump target, regardless of entity type.
@@ -96,7 +96,7 @@ public function form(array $form, array &$form_state) {
 
     // If not replying to a comment, use our dedicated page callback for new
     // Comments on entities.
-    if (!$comment->id() && empty($comment->pid->target_id)) {
+    if (!$comment->id() && !$comment->hasParentComment()) {
       $form['#action'] = url('comment/reply/' . $entity->entityType() . '/' . $entity->id() . '/' . $field_name);
     }
 
@@ -116,11 +116,11 @@ public function form(array $form, array &$form_state) {
 
     // Prepare default values for form elements.
     if ($is_admin) {
-      $author = $comment->name->value;
-      $status = (isset($comment->status->value) ? $comment->status->value : CommentInterface::NOT_PUBLISHED);
+      $author = $comment->getAuthorName();
+      $status = $comment->isPublished();
       if (empty($form_state['comment_preview'])) {
         $form['#title'] = $this->t('Edit comment %title', array(
-          '%title' => $comment->subject->value,
+          '%title' => $comment->getSubject(),
         ));
       }
     }
@@ -129,7 +129,7 @@ public function form(array $form, array &$form_state) {
         $author = $this->currentUser->getUsername();
       }
       else {
-        $author = ($comment->name->value ? $comment->name->value : '');
+        $author = ($comment->getAuthorName() ? $comment->getAuthorName() : '');
       }
       $status = ($this->currentUser->hasPermission('skip comment approval') ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED);
     }
@@ -164,7 +164,7 @@ public function form(array $form, array &$form_state) {
     $form['author']['mail'] = array(
       '#type' => 'email',
       '#title' => $this->t('E-mail'),
-      '#default_value' => $comment->mail->value,
+      '#default_value' => $comment->getAuthorEmail(),
       '#required' => ($this->currentUser->isAnonymous() && $anonymous_contact == COMMENT_ANONYMOUS_MUST_CONTACT),
       '#maxlength' => 64,
       '#size' => 30,
@@ -175,7 +175,7 @@ public function form(array $form, array &$form_state) {
     $form['author']['homepage'] = array(
       '#type' => 'url',
       '#title' => $this->t('Homepage'),
-      '#default_value' => $comment->homepage->value,
+      '#default_value' => $comment->getHomepage(),
       '#maxlength' => 255,
       '#size' => 30,
       '#access' => $is_admin || ($this->currentUser->isAnonymous() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
@@ -205,14 +205,14 @@ public function form(array $form, array &$form_state) {
       '#type' => 'textfield',
       '#title' => $this->t('Subject'),
       '#maxlength' => 64,
-      '#default_value' => $comment->subject->value,
+      '#default_value' => $comment->getSubject(),
       '#access' => $instance->getSetting('subject'),
     );
 
     // Used for conditional validation of author fields.
     $form['is_anonymous'] = array(
       '#type' => 'value',
-      '#value' => ($comment->id() ? !$comment->uid->target_id : $this->currentUser->isAnonymous()),
+      '#value' => ($comment->id() ? !$comment->getAuthorId() : $this->currentUser->isAnonymous()),
     );
 
     // Add internal comment properties.
@@ -231,8 +231,8 @@ public function form(array $form, array &$form_state) {
   protected function actions(array $form, array &$form_state) {
     $element = parent::actions($form, $form_state);
     $comment = $this->entity;
-    $entity = $this->entityManager->getStorageController($comment->entity_type->value)->load($comment->entity_id->value);
-    $instance = $this->fieldInfo->getInstance($comment->entity_type->value, $entity->bundle(), $comment->field_name->value);
+    $entity = $this->entityManager->getStorageController($comment->getCommentedEntityType())->load($comment->getCommentedEntityId());
+    $instance = $this->fieldInfo->getInstance($comment->getCommentedEntityType(), $entity->bundle(), $comment->getFieldName());
     $preview_mode = $instance->getSetting('preview');
 
     // No delete action on the comment form.
@@ -300,10 +300,10 @@ public function validate(array $form, array &$form_state) {
   public function buildEntity(array $form, array &$form_state) {
     $comment = parent::buildEntity($form, $form_state);
     if (!empty($form_state['values']['date']) && $form_state['values']['date'] instanceOf DrupalDateTime) {
-      $comment->created->value = $form_state['values']['date']->getTimestamp();
+      $comment->setCreatedTime($form_state['values']['date']->getTimestamp());
     }
     else {
-      $comment->created->value = REQUEST_TIME;
+      $comment->setCreatedTime(REQUEST_TIME);
     }
     $comment->changed->value = REQUEST_TIME;
     return $comment;
@@ -318,18 +318,19 @@ public function submit(array $form, array &$form_state) {
     // If the comment was posted by a registered user, assign the author's ID.
     // @todo Too fragile. Should be prepared and stored in comment_form()
     // already.
-    if (!$comment->is_anonymous && !empty($comment->name->value) && ($account = user_load_by_name($comment->name->value))) {
+    $author_name = $comment->getAuthorName();
+    if (!$comment->is_anonymous && !empty($author_name) && ($account = user_load_by_name($author_name))) {
       $comment->uid->target_id = $account->id();
     }
     // If the comment was posted by an anonymous user and no author name was
     // required, use "Anonymous" by default.
-    if ($comment->is_anonymous && (!isset($comment->name->value) || $comment->name->value === '')) {
-      $comment->name->value = $this->config('user.settings')->get('anonymous');
+    if ($comment->is_anonymous && (!isset($author_name) || $author_name === '')) {
+      $comment->setAuthorName($this->config('user.settings')->get('anonymous'));
     }
 
     // Validate the comment's subject. If not specified, extract from comment
     // body.
-    if (trim($comment->subject->value) == '') {
+    if (trim($comment->getSubject()) == '') {
       // The body may be in any format, so:
       // 1) Filter it into HTML
       // 2) Strip out all HTML tags
@@ -338,8 +339,8 @@ public function submit(array $form, array &$form_state) {
       $comment->subject = Unicode::truncate(trim(String::decodeEntities(strip_tags($comment_text))), 29, TRUE);
       // Edge cases where the comment body is populated only by HTML tags will
       // require a default subject.
-      if ($comment->subject->value == '') {
-        $comment->subject->value = $this->t('(No subject)');
+      if ($comment->getSubject() == '') {
+        $comment->setSubject($this->t('(No subject)'));
       }
     }
 
@@ -367,7 +368,7 @@ public function preview(array &$form, array &$form_state) {
   public function save(array $form, array &$form_state) {
     $entity = entity_load($form_state['values']['entity_type'], $form_state['values']['entity_id']);
     $comment = $this->entity;
-    $field_name = $comment->field_name->value;
+    $field_name = $comment->getFieldName();
     $uri = $entity->uri();
 
     if ($this->currentUser->hasPermission('post comments') && ($this->currentUser->hasPermission('administer comments') || $entity->{$field_name}->status == COMMENT_OPEN)) {
@@ -380,10 +381,10 @@ public function save(array $form, array &$form_state) {
       $form_state['values']['cid'] = $comment->id();
 
       // Add an entry to the watchdog log.
-      watchdog('content', 'Comment posted: %subject.', array('%subject' => $comment->subject->value), WATCHDOG_NOTICE, l(t('view'), 'comment/' . $comment->id(), array('fragment' => 'comment-' . $comment->id())));
+      watchdog('content', 'Comment posted: %subject.', array('%subject' => $comment->getSubject()), WATCHDOG_NOTICE, l(t('view'), 'comment/' . $comment->id(), array('fragment' => 'comment-' . $comment->id())));
 
       // Explain the approval queue if necessary.
-      if ($comment->status->value == CommentInterface::NOT_PUBLISHED) {
+      if (!$comment->isPublished()) {
         if (!$this->currentUser->hasPermission('administer comments')) {
           drupal_set_message($this->t('Your comment has been queued for review by site administrators and will be published after approval.'));
         }
@@ -402,8 +403,8 @@ public function save(array $form, array &$form_state) {
       $redirect = array($uri['path'], array('query' => $query, 'fragment' => 'comment-' . $comment->id()) + $uri['options']);
     }
     else {
-      watchdog('content', 'Comment: unauthorized comment submitted or comment submitted to a closed post %subject.', array('%subject' => $comment->subject->value), WATCHDOG_WARNING);
-      drupal_set_message($this->t('Comment: unauthorized comment submitted or comment submitted to a closed post %subject.', array('%subject' => $comment->subject->value)), 'error');
+      watchdog('content', 'Comment: unauthorized comment submitted or comment submitted to a closed post %subject.', array('%subject' => $comment->getSubject()), WATCHDOG_WARNING);
+      drupal_set_message($this->t('Comment: unauthorized comment submitted or comment submitted to a closed post %subject.', array('%subject' => $comment->getSubject())), 'error');
       // Redirect the user to the entity they are commenting on.
       $redirect = $uri['path'];
     }
diff --git a/core/modules/comment/lib/Drupal/comment/CommentInterface.php b/core/modules/comment/lib/Drupal/comment/CommentInterface.php
index 28ec9fb..ed0154a 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentInterface.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentInterface.php
@@ -26,6 +26,257 @@
   const PUBLISHED = 1;
 
   /**
+   * Determine if this comment is a reply to another comment.
+   *
+   * @return bool
+   *   TRUE if the comment has a parent comment otherwise FALSE.
+   */
+  public function hasParentComment();
+
+  /**
+   * Returns the parent comment entity if this is a reply to a comment.
+   *
+   * @return \Drupal\comment\CommentInterface|NULL
+   *   A Comment Entity of the parent comment or NULL if there is no parent.
+   */
+  public function getParentComment();
+
+  /**
+   * Returns the entity to which the comment is attached.
+   *
+   * @return \Drupal\Core\Entity\EntityInterface
+   *   The entity on which the comment is attached.
+   */
+  public function getCommentedEntity();
+
+  /**
+   * Returns the ID of the entity to which the comment is attached.
+   *
+   * @return int
+   *   The ID of the entity to which the comment is attached.
+   */
+  public function getCommentedEntityId();
+
+  /**
+   * Returns the type of the entity to which the comment is attached.
+   *
+   * @return string
+   *   An entity type.
+   */
+  public function getCommentedEntityType();
+
+  /**
+   * Returns the ID of the comment field the comment is attached to.
+   *
+   * @return int
+   *   The field ID of the field the comment is attached to.
+   */
+  public function getFieldId();
+
+  /**
+   * Set the field ID for which this commment is attached.
+   *
+   * @param string $field_id
+   *   The field identifier
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setFieldId($field_id);
+
+  /**
+   * Returns the name of the field the comment is attached to.
+   *
+   * @return string
+   *   The name of the field the comment is attached to.
+   */
+  public function getFieldName();
+
+  /**
+   * Returns the title of the comment.
+   *
+   * @return string
+   *   The title of the comment.
+   */
+  public function getSubject();
+
+  /**
+   * Sets the title of the comment.
+   *
+   * @param string $subject
+   *   The title of the comment.
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setSubject($subject);
+
+  /**
+   * Returns the comment author.
+   *
+   * @return \Drupal\user\UserInterface
+   *   The user entity of the author of the comment.
+   */
+  public function getAuthor();
+
+  /**
+   * Returns the comment author ID.
+   *
+   * @return int
+   *   The user ID of the author of the comment.
+   */
+  public function getAuthorId();
+
+  /**
+   * Set the comment author by their uid.
+   *
+   * @param int $uid
+   *   The author's unique id.
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setAuthorId($uid);
+
+  /**
+   * Returns the comment author's name.
+   *
+   * For anonymous authors, this is the value as typed in the comment form.
+   *
+   * @return string
+   *   The name of the comment author.
+   */
+  public function getAuthorName();
+
+  /**
+   * Sets the name of the author of the comment.
+   *
+   * @param string $name
+   *   A string containing the name of the author.
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setAuthorName($name);
+
+  /**
+   * Returns the comment author's e-mail address.
+   *
+   * For anonymous authors, this is the value as typed in the comment form.
+   *
+   * @return string
+   *   The e-mail address of the author of the comment.
+   */
+  public function getAuthorEmail();
+
+  /**
+   * Returns the comment author's home page address.
+   *
+   * For anonymous authors, this is the value as typed in the comment form.
+   *
+   * @return string
+   *   The homepage address of the author of the comment.
+   */
+  public function getHomepage();
+
+  /**
+   * Sets the comment author's home page address.
+   *
+   * For anonymous authors, this is the value as typed in the comment form.
+   *
+   * @param string $homepage
+   *   The homepage address of the author of the comment.
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setHomepage($homepage);
+
+  /**
+   * Returns the comment author's hostname.
+   *
+   * @return string
+   *   The hostname of the author of the comment.
+   */
+  public function getHostname();
+
+  /**
+   * Sets the hostname of the author of the comment.
+   *
+   * @param string $hostname
+   *   The hostname of the author of the comment.
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setHostname($hostname);
+
+  /**
+   * Returns the time that the comment was created.
+   *
+   * @return int
+   *   The timestamp of when the comment was created.
+   */
+  public function getCreatedTime();
+
+  /**
+   * Sets the creation date of the comment.
+   *
+   * @param int $created
+   *   The timestamp of when the comment was created.
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setCreatedTime($created);
+
+  /**
+   * Returns the timestamp of when the comment was updated.
+   *
+   * @return int
+   *   The timestamp of when the comment was updated.
+   */
+  public function getChangedTime();
+
+  /**
+   * Checks if the comment is published.
+   *
+   * @return bool
+   *   TRUE if the comment is published.
+   */
+  public function isPublished();
+
+  /**
+   * Sets the published status of the comment entity.
+   *
+   * @param bool $status
+   *   Set to TRUE to publish the comment, FALSE to unpublish.
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setPublished($status);
+
+  /**
+   * Returns the alphadecimal representation of the comment's place in a thread.
+   *
+   * @return string
+   *   The alphadecimal representation of the comment's place in a thread.
+   */
+  public function getThread();
+
+  /**
+   * Sets the alphadecimal representation of the comment's place in a thread.
+   *
+   * @param string $thread
+   *   The alphadecimal representation of the comment's place in a thread
+   *
+   * @return \Drupal\comment\CommentInterface
+   *   The class instance that this method is called on.
+   */
+  public function setThread($thread);
+
+  /**
    * Returns the permalink URL for this comment.
    *
    * @return array
diff --git a/core/modules/comment/lib/Drupal/comment/CommentManager.php b/core/modules/comment/lib/Drupal/comment/CommentManager.php
index 9bca3c5..3589737 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentManager.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentManager.php
@@ -48,8 +48,8 @@ public function __construct(FieldInfo $field_info, EntityManagerInterface $entit
    */
   public function getParentEntityUri(CommentInterface $comment) {
     return $this->entityManager
-      ->getStorageController($comment->entity_type->value)
-      ->load($comment->entity_id->value)
+      ->getStorageController($comment->getCommentedEntityType())
+      ->load($comment->getCommentedEntityId())
       ->uri();
   }
 
diff --git a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php b/core/modules/comment/lib/Drupal/comment/CommentStorageController.php
index 82cc6e4..b591d8c 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentStorageController.php
@@ -54,9 +54,9 @@ public function updateEntityStatistics(CommentInterface $comment) {
 
     $query = $this->database->select('comment', 'c');
     $query->addExpression('COUNT(cid)');
-    $count = $query->condition('c.entity_id', $comment->entity_id->value)
-      ->condition('c.entity_type', $comment->entity_type->value)
-      ->condition('c.field_id', $comment->field_id->value)
+    $count = $query->condition('c.entity_id', $comment->getCommentedEntityId())
+      ->condition('c.entity_type', $comment->getCommentedEntityType())
+      ->condition('c.field_id', $comment->getFieldId())
       ->condition('c.status', CommentInterface::PUBLISHED)
       ->execute()
       ->fetchField();
@@ -65,9 +65,9 @@ public function updateEntityStatistics(CommentInterface $comment) {
       // Comments exist.
       $last_reply = $this->database->select('comment', 'c')
         ->fields('c', array('cid', 'name', 'changed', 'uid'))
-        ->condition('c.entity_id', $comment->entity_id->value)
-        ->condition('c.entity_type', $comment->entity_type->value)
-        ->condition('c.field_id', $comment->field_id->value)
+        ->condition('c.entity_id', $comment->getCommentedEntityId())
+        ->condition('c.entity_type', $comment->getCommentedEntityType())
+        ->condition('c.field_id', $comment->getFieldId())
         ->condition('c.status', CommentInterface::PUBLISHED)
         ->orderBy('c.created', 'DESC')
         ->range(0, 1)
@@ -83,15 +83,15 @@ public function updateEntityStatistics(CommentInterface $comment) {
           'last_comment_uid' => $last_reply->uid,
         ))
         ->key(array(
-          'entity_id' => $comment->entity_id->value,
-          'entity_type' => $comment->entity_type->value,
-          'field_id' => $comment->field_id->value,
+          'entity_id' => $comment->getCommentedEntityId(),
+          'entity_type' => $comment->getCommentedEntityType(),
+          'field_id' => $comment->getFieldId(),
         ))
         ->execute();
     }
     else {
       // Comments do not exist.
-      $entity = entity_load($comment->entity_type->value, $comment->entity_id->value);
+      $entity = entity_load($comment->getCommentedEntityType(), $comment->getCommentedEntityId());
       $this->database->update('comment_entity_statistics')
         ->fields(array(
           'cid' => 0,
@@ -105,9 +105,9 @@ public function updateEntityStatistics(CommentInterface $comment) {
           // currently logged in user.
           'last_comment_uid' => $entity->hasField('uid') ? $entity->get('uid')->value : \Drupal::currentUser()->id(),
         ))
-        ->condition('entity_id', $comment->entity_id->value)
-        ->condition('entity_type', $comment->entity_type->value)
-        ->condition('field_id', $comment->field_id->value)
+        ->condition('entity_id', $comment->getCommentedEntityId())
+        ->condition('entity_type', $comment->getCommentedEntityType())
+        ->condition('field_id', $comment->getFieldId())
         ->execute();
     }
   }
@@ -117,9 +117,9 @@ public function updateEntityStatistics(CommentInterface $comment) {
    */
   public function getMaxThread(EntityInterface $comment) {
     $query = $this->database->select('comment', 'c')
-      ->condition('entity_id', $comment->entity_id->value)
-      ->condition('field_id', $comment->field_id->value)
-      ->condition('entity_type', $comment->entity_type->value);
+      ->condition('entity_id', $comment->getCommentedEntityId())
+      ->condition('field_id', $comment->getFieldId())
+      ->condition('entity_type', $comment->getCommentedEntityType());
     $query->addExpression('MAX(thread)', 'thread');
     return $query->execute()
       ->fetchField();
@@ -130,10 +130,10 @@ public function getMaxThread(EntityInterface $comment) {
    */
   public function getMaxThreadPerThread(EntityInterface $comment) {
     $query = $this->database->select('comment', 'c')
-      ->condition('entity_id', $comment->entity_id->value)
-      ->condition('field_id', $comment->field_id->value)
-      ->condition('entity_type', $comment->entity_type->value)
-      ->condition('thread', $comment->pid->entity->thread->value . '.%', 'LIKE');
+      ->condition('entity_id', $comment->getCommentedEntityId())
+      ->condition('field_id', $comment->getFieldId())
+      ->condition('entity_type', $comment->getCommentedEntityType())
+      ->condition('thread', $comment->getParentComment()->getThread() . '.%', 'LIKE');
     $query->addExpression('MAX(thread)', 'thread');
     return $query->execute()
       ->fetchField();
diff --git a/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php b/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php
index 7dd6517..3beb9e1 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php
@@ -273,8 +273,8 @@ protected function alterBuild(array &$build, EntityInterface $comment, EntityVie
     parent::alterBuild($build, $comment, $display, $view_mode, $langcode);
     if (empty($comment->in_preview)) {
       $prefix = '';
-      $commented_entity = $this->entityManager->getStorageController($comment->entity_type->value)->load($comment->entity_id->value);
-      $instance = $this->fieldInfo->getInstance($commented_entity->entityType(), $commented_entity->bundle(), $comment->field_name->value);
+      $commented_entity = $this->entityManager->getStorageController($comment->getCommentedEntityType())->load($comment->getCommentedEntityId());
+      $instance = $this->fieldInfo->getInstance($commented_entity->entityType(), $commented_entity->bundle(), $comment->getFieldName());
       $is_threaded = isset($comment->divs)
         && $instance->getSetting('default_mode') == COMMENT_MODE_THREADED;
 
diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
index 15f09a7..3e13ada 100644
--- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
+++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
@@ -86,7 +86,7 @@ public static function create(ContainerInterface $container) {
    *   Redirects to the permalink URL for this comment.
    */
   public function commentApprove(CommentInterface $comment) {
-    $comment->status->value = CommentInterface::PUBLISHED;
+    $comment->setPublished(TRUE);
     $comment->save();
 
     drupal_set_message($this->t('Comment approved.'));
@@ -119,12 +119,12 @@ public function commentApprove(CommentInterface $comment) {
    *   The comment listing set to the page on which the comment appears.
    */
   public function commentPermalink(Request $request, CommentInterface $comment) {
-    if ($entity = $this->entityManager()->getStorageController($comment->entity_type->value)->load($comment->entity_id->value)) {
+    if ($entity = $this->entityManager()->getStorageController($comment->getCommentedEntityType())->load($comment->getCommentedEntityId())) {
       // Check access permissions for the entity.
       if (!$entity->access('view')) {
         throw new AccessDeniedHttpException();
       }
-      $instance = $this->fieldInfo->getInstance($entity->entityType(), $entity->bundle(), $comment->field_name->value);
+      $instance = $this->fieldInfo->getInstance($entity->entityType(), $entity->bundle(), $comment->getFieldName());
 
       // Find the current display page for this comment.
       $page = comment_get_display_page($comment->id(), $instance);
@@ -236,8 +236,8 @@ public function getReplyForm(Request $request, $entity_type, $entity_id, $field_
         }
         // Load the parent comment.
         $comment = $this->entityManager()->getStorageController('comment')->load($pid);
-        // Check if the parent comment is published and belongs to the entity.
-        if (($comment->status->value == CommentInterface::NOT_PUBLISHED) || ($comment->entity_id->value != $entity->id())) {
+        // Check if the parent comment is published and belongs to the current nid.
+        if (!$comment->isPublished() || ($comment->getCommentedEntityId() != $entity->id())) {
           drupal_set_message($this->t('The comment you are replying to does not exist.'), 'error');
           return new RedirectResponse($this->urlGenerator()->generateFromPath($uri['path'], array('absolute' => TRUE)));
         }
diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
index 62c9e56..7fe5194 100644
--- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
@@ -55,161 +55,7 @@
 class Comment extends ContentEntityBase implements CommentInterface {
 
   /**
-   * The thread for which a lock was acquired.
-   */
-  protected $threadLock = '';
-
-  /**
-   * The comment ID.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $cid;
-
-  /**
-   * The comment UUID.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $uuid;
-
-  /**
-   * The parent comment ID if this is a reply to another comment.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $pid;
-
-  /**
-   * The entity ID for the entity to which this comment is attached.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $entity_id;
-
-  /**
-   * The entity type of the entity to which this comment is attached.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $entity_type;
-
-  /**
-   * The field to which this comment is attached.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $field_id;
-
-  /**
-   * The comment language code.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $langcode;
-
-  /**
-   * The comment title.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $subject;
-
-  /**
-   * The comment author ID.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $uid;
-
-  /**
-   * The comment author's name.
-   *
-   * For anonymous authors, this is the value as typed in the comment form.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $name;
-
-  /**
-   * The comment author's e-mail address.
-   *
-   * For anonymous authors, this is the value as typed in the comment form.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $mail;
-
-  /**
-   * The comment author's home page address.
-   *
-   * For anonymous authors, this is the value as typed in the comment form.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $homepage;
-
-  /**
-   * The comment author's hostname.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $hostname;
-
-  /**
-   * The time that the comment was created.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $created;
-
-  /**
-   * The time that the comment was last edited.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $changed;
-
-  /**
-   * A boolean field indicating whether the comment is published.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $status;
-
-  /**
-   * The alphadecimal representation of the comment's place in a thread.
-   *
-   * @var \Drupal\Core\Field\FieldItemListInterface
-   */
-  public $thread;
-
-  /**
-   * Initialize the object. Invoked upon construction and wake up.
-   */
-  protected function init() {
-    parent::init();
-    // We unset all defined properties, so magic getters apply.
-    unset($this->cid);
-    unset($this->uuid);
-    unset($this->pid);
-    unset($this->entity_id);
-    unset($this->field_id);
-    unset($this->subject);
-    unset($this->uid);
-    unset($this->name);
-    unset($this->mail);
-    unset($this->homepage);
-    unset($this->hostname);
-    unset($this->created);
-    unset($this->changed);
-    unset($this->status);
-    unset($this->thread);
-    unset($this->entity_type);
-  }
-
-  /**
-   * Implements Drupal\Core\Entity\EntityInterface::id().
+   * {@inheritdoc}
    */
   public function id() {
     return $this->get('cid')->value;
@@ -221,23 +67,21 @@ public function id() {
   public function preSave(EntityStorageControllerInterface $storage_controller) {
     parent::preSave($storage_controller);
 
-    if (!isset($this->status->value)) {
-      $this->status->value = \Drupal::currentUser()->hasPermission('skip comment approval') ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED;
+    if (is_null($this->get('status')->value)) {
+      $published = \Drupal::currentUser()->hasPermission('skip comment approval') ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED;
+      $this->setPublished($published);
     }
     if ($this->isNew()) {
       // Add the comment to database. This next section builds the thread field.
       // Also see the documentation for comment_view().
-      if (!empty($this->thread->value)) {
-        // Allow calling code to set thread itself.
-        $thread = $this->thread->value;
-      }
-      else {
+      $thread = $this->getThread();
+      if (empty($thread)) {
         if ($this->threadLock) {
           // As preSave() is protected, this can only happen when this class
           // is extended in a faulty manner.
           throw new \LogicException('preSave is called again without calling postSave() or releaseThreadLock()');
         }
-        if ($this->pid->target_id == 0) {
+        if (! $this->hasParentComment()) {
           // This is a comment with no parent comment (depth 0): we start
           // by retrieving the maximum thread level.
           $max = $storage_controller->getMaxThread($this);
@@ -253,10 +97,10 @@ public function preSave(EntityStorageControllerInterface $storage_controller) {
           // the thread value at the proper depth.
 
           // Get the parent comment:
-          $parent = $this->pid->entity;
+          $parent = $this->getParentComment();
           // Strip the "/" from the end of the parent thread.
-          $parent->thread->value = (string) rtrim((string) $parent->thread->value, '/');
-          $prefix = $parent->thread->value . '.';
+          $parent->setThread((string) rtrim((string) $parent->getThread(), '/'));
+          $prefix = $parent->getThread() . '.';
           // Get the max value in *this* thread.
           $max = $storage_controller->getMaxThreadPerThread($this);
 
@@ -271,7 +115,7 @@ public function preSave(EntityStorageControllerInterface $storage_controller) {
             $max = rtrim($max, '/');
             // Get the value at the correct depth.
             $parts = explode('.', $max);
-            $parent_depth = count(explode('.', $parent->thread->value));
+            $parent_depth = count(explode('.', $parent->getThread()));
             $n = comment_alphadecimal_to_int($parts[$parent_depth]);
           }
         }
@@ -280,24 +124,24 @@ public function preSave(EntityStorageControllerInterface $storage_controller) {
         // has the lock, just move to the next integer.
         do {
           $thread = $prefix . comment_int_to_alphadecimal(++$n) . '/';
-          $lock_name = "comment:{$this->entity_id->value}:$thread";
+          $lock_name = "comment:{$this->getCommentedEntityId()}:$thread";
         } while (!\Drupal::lock()->acquire($lock_name));
         $this->threadLock = $lock_name;
       }
-      if (empty($this->created->value)) {
-        $this->created->value = REQUEST_TIME;
+      if (is_null($this->getCreatedTime())) {
+        $this->setCreatedTime(REQUEST_TIME);
       }
-      if (empty($this->changed->value)) {
-        $this->changed->value = $this->created->value;
+      if (is_null($this->getChangedTime())) {
+        $this->changed->value = $this->getCreatedTime();
       }
       // We test the value with '===' because we need to modify anonymous
       // users as well.
-      if ($this->uid->target_id === \Drupal::currentUser()->id() && \Drupal::currentUser()->isAuthenticated()) {
-        $this->name->value = \Drupal::currentUser()->getUsername();
+      if ($this->getAuthorId() === \Drupal::currentUser()->id() && \Drupal::currentUser()->isAuthenticated()) {
+        $this->setAuthorName(\Drupal::currentUser()->getUsername());
       }
       // Add the values which aren't passed into the function.
-      $this->thread->value = $thread;
-      $this->hostname->value = \Drupal::request()->getClientIP();
+      $this->setThread($thread);
+      $this->setHostname(\Drupal::request()->getClientIP());
     }
   }
 
@@ -310,7 +154,7 @@ public function postSave(EntityStorageControllerInterface $storage_controller, $
     $this->releaseThreadLock();
     // Update the {comment_entity_statistics} table prior to executing the hook.
     $storage_controller->updateEntityStatistics($this);
-    if ($this->status->value == CommentInterface::PUBLISHED) {
+    if ($this->isPublished()) {
       module_invoke_all('comment_publish', $this);
     }
   }
@@ -343,7 +187,7 @@ public static function postDelete(EntityStorageControllerInterface $storage_cont
    * {@inheritdoc}
    */
   public function permalink() {
-    $entity = entity_load($this->get('entity_type')->value, $this->get('entity_id')->value);
+    $entity = $this->getCommentedEntity();
     $uri = $entity->uri();
     $url['path'] = $uri['path'];
     $url['options'] = array('fragment' => 'comment-' . $this->id());
@@ -453,8 +297,214 @@ public static function baseFieldDefinitions($entity_type) {
   /**
    * {@inheritdoc}
    */
+  public function hasParentComment() {
+    $parent = $this->get('pid')->entity;
+    return !empty($parent);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getParentComment() {
+    return $this->get('pid')->entity;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCommentedEntity() {
+    $entity_id = $this->getCommentedEntityId();
+    $entity_type = $this->getCommentedEntityType();
+    return entity_load($entity_type, $entity_id);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCommentedEntityId() {
+    return $this->get('entity_id')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCommentedEntityType() {
+    return $this->get('entity_type')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFieldId() {
+    return $this->get('field_id')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setFieldId($field_id) {
+    $this->set('field_id', $field_id);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFieldName() {
+    return $this->get('field_name')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getSubject() {
+    return $this->get('subject')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setSubject($subject) {
+    $this->set('subject', $subject);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getAuthor() {
+    return $this->get('uid')->entity;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getAuthorId() {
+    return $this->get('uid')->target_id;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setAuthorId($uid) {
+    $this->set('uid', $uid);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getAuthorName() {
+    return $this->get('name')->value ?: \Drupal::config('user.settings')->get('anonymous');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setAuthorName($name) {
+    $this->set('name', $name);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getAuthorEmail() {
+    $mail = $this->get('mail')->value;
+
+    if ($this->get('uid')->target_id != 0) {
+      $mail = $this->get('uid')->entity->getEmail();
+    }
+
+    return $mail;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getHomepage() {
+    return $this->get('homepage')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setHomepage($homepage) {
+    $this->set('homepage', $homepage);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getHostname() {
+    return $this->get('hostname')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setHostname($hostname) {
+    $this->set('hostname', $hostname);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCreatedTime() {
+    if (isset($this->get('created')->value)) {
+      return $this->get('created')->value;
+    }
+    return NULL;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setCreatedTime($created) {
+    $this->set('created', $created);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isPublished() {
+    return $this->get('status')->value == CommentInterface::PUBLISHED;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setPublished($status) {
+    $this->set('status', $status ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getThread() {
+    $thread = $this->get('thread');
+    if (!empty($thread->value)) {
+      return $thread->value;
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setThread($thread) {
+    $this->set('thread', $thread);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getChangedTime() {
-    return $this->changed->value;
+    return $this->get('changed')->value;
   }
 
   /**
diff --git a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php
index 07c6d54..d7238f9 100644
--- a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php
+++ b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php
@@ -190,7 +190,7 @@ public function buildForm(array $form, array &$form_state, $type = 'new') {
     }
 
     foreach ($comments as $comment) {
-      $commented_entity = $commented_entities[$comment->entity_type->value][$comment->entity_id->value];
+      $commented_entity = $commented_entities[$comment->getCommentedEntityType()][$comment->getCommentedEntityId()];
       $commented_entity_uri = $commented_entity->uri();
       $username = array(
         '#theme' => 'username',
@@ -202,11 +202,11 @@ public function buildForm(array $form, array &$form_state, $type = 'new') {
       }
       $comment_permalink = $comment->permalink();
       $options[$comment->id()] = array(
-        'title' => array('data' => array('#title' => $comment->subject->value ?: $comment->id())),
+        'title' => array('data' => array('#title' => $comment->getSubject() ?: $comment->id())),
         'subject' => array(
           'data' => array(
             '#type' => 'link',
-            '#title' => $comment->subject->value,
+            '#title' => $comment->getSubject(),
             '#href' => $comment_permalink['path'],
             '#options' => $comment_permalink['options'] + array(
               'attributes' => array(
@@ -225,7 +225,7 @@ public function buildForm(array $form, array &$form_state, $type = 'new') {
             '#access' => $commented_entity->access('view'),
           ),
         ),
-        'changed' => $this->date->format($comment->changed->value, 'short'),
+        'changed' => $this->date->format($comment->getChangedTime(), 'short'),
       );
       $comment_uri = $comment->uri();
       $links = array();
@@ -286,12 +286,12 @@ public function submitForm(array &$form, array &$form_state) {
       // see \Drupal\comment\Controller\AdminController::adminPage().
       if ($operation == 'unpublish') {
         $comment = $this->commentStorage->load($cid);
-        $comment->status->value = CommentInterface::NOT_PUBLISHED;
+        $comment->setPublished(FALSE);
         $comment->save();
       }
       elseif ($operation == 'publish') {
         $comment = $this->commentStorage->load($cid);
-        $comment->status->value = CommentInterface::PUBLISHED;
+        $comment->setPublished(TRUE);
         $comment->save();
       }
     }
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Action/PublishComment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Action/PublishComment.php
index cd3ab53..41ed873 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Action/PublishComment.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Action/PublishComment.php
@@ -25,7 +25,7 @@ class PublishComment extends ActionBase {
    * {@inheritdoc}
    */
   public function execute($comment = NULL) {
-    $comment->status->value = CommentInterface::PUBLISHED;
+    $comment->setPublished(TRUE);
     $comment->save();
   }
 
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php
index 876850c..92d4014 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php
@@ -29,7 +29,7 @@ public function execute($comment = NULL) {
     $text = drupal_render($build);
     foreach ($this->configuration['keywords'] as $keyword) {
       if (strpos($text, $keyword) !== FALSE) {
-        $comment->status->value = CommentInterface::NOT_PUBLISHED;
+        $comment->setPublished(FALSE);
         $comment->save();
         break;
       }
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishComment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishComment.php
index d15c324..74d565a 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishComment.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishComment.php
@@ -25,7 +25,7 @@ class UnpublishComment extends ActionBase {
    * {@inheritdoc}
    */
   public function execute($comment = NULL) {
-    $comment->status->value = CommentInterface::NOT_PUBLISHED;
+    $comment->setPublished(FALSE);
     $comment->save();
   }
 
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LinkReply.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LinkReply.php
index aefb38d..3edb9a4 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LinkReply.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LinkReply.php
@@ -43,7 +43,7 @@ protected function renderLink($data, ResultRow $values) {
     $comment = $this->getEntity($values);
 
     $this->options['alter']['make_link'] = TRUE;
-    $this->options['alter']['path'] = "comment/reply/{$comment->entity_type->value}/{$comment->entity_id->value}/{$comment->field_name->value}/{$comment->id()}";
+    $this->options['alter']['path'] = "comment/reply/{$comment->getCommentedEntityType()}/{$comment->getCommentedEntityId()}/{$comment->getFieldName()}/{$comment->id()}";
 
     return $text;
   }
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php
index 4911373..3d90f64 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php
@@ -61,7 +61,7 @@ public function preRender($result) {
 
     $this->comments = entity_load_multiple('comment', $cids);
     foreach ($this->comments as $comment) {
-      $comment->depth = count(explode('.', $comment->thread->value)) - 1;
+      $comment->depth = count(explode('.', $comment->getThread())) - 1;
     }
 
   }
@@ -111,11 +111,11 @@ public function render($row) {
     $comment->rss_elements = array(
       array(
         'key' => 'pubDate',
-        'value' => gmdate('r', $comment->created->value),
+        'value' => gmdate('r', $comment->getCreatedTime()),
       ),
       array(
         'key' => 'dc:creator',
-        'value' => $comment->name->value,
+        'value' => $comment->getAuthorName(),
       ),
       array(
         'key' => 'guid',
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
index ea892c8..667d278 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
@@ -41,12 +41,12 @@ function testCommentPublishUnpublishActions() {
     // Unpublish a comment.
     $action = entity_load('action', 'comment_unpublish_action');
     $action->execute(array($comment));
-    $this->assertEqual($comment->status->value, CommentInterface::NOT_PUBLISHED, 'Comment was unpublished');
+    $this->assertTrue($comment->isPublished() === FALSE, 'Comment was unpublished');
 
     // Publish a comment.
     $action = entity_load('action', 'comment_publish_action');
     $action->execute(array($comment));
-    $this->assertEqual($comment->status->value, CommentInterface::PUBLISHED, 'Comment was published');
+    $this->assertTrue($comment->isPublished() === TRUE, 'Comment was published');
   }
 
   /**
@@ -72,10 +72,10 @@ function testCommentUnpublishByKeyword() {
     // Load the full comment so that status is available.
     $comment = comment_load($comment->id());
 
-    $this->assertTrue($comment->status->value == CommentInterface::PUBLISHED, 'The comment status was set to published.');
+    $this->assertTrue($comment->isPublished() === TRUE, 'The comment status was set to published.');
 
     $action->execute(array($comment));
-    $this->assertTrue($comment->status->value == CommentInterface::NOT_PUBLISHED, 'The comment status was set to not published.');
+    $this->assertTrue($comment->isPublished() === FALSE, 'The comment status was set to not published.');
   }
 
 }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
index 9fa5ea8..89fb331 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
@@ -78,23 +78,23 @@ function testRecentCommentBlock() {
     $this->assertText(t('Recent comments'));
 
     // Test the only the 10 latest comments are shown and in the proper order.
-    $this->assertNoText($comments[10]->subject->value, 'Comment 11 not found in block.');
+    $this->assertNoText($comments[10]->getSubject(), 'Comment 11 not found in block.');
     for ($i = 0; $i < 10; $i++) {
-      $this->assertText($comments[$i]->subject->value, String::format('Comment @number found in block.', array('@number' => 10 - $i)));
+      $this->assertText($comments[$i]->getSubject(), String::format('Comment @number found in block.', array('@number' => 10 - $i)));
       if ($i > 1) {
         $previous_position = $position;
-        $position = strpos($this->drupalGetContent(), $comments[$i]->subject->value);
+        $position = strpos($this->drupalGetContent(), $comments[$i]->getSubject());
         $this->assertTrue($position > $previous_position, String::format('Comment @a appears after comment @b', array('@a' => 10 - $i, '@b' => 11 - $i)));
       }
-      $position = strpos($this->drupalGetContent(), $comments[$i]->subject->value);
+      $position = strpos($this->drupalGetContent(), $comments[$i]->getSubject());
     }
 
     // Test that links to comments work when comments are across pages.
     $this->setCommentsPerPage(1);
 
     for ($i = 0; $i < 10; $i++) {
-      $this->clickLink($comments[$i]->subject->value);
-      $this->assertText($comments[$i]->subject->value, 'Comment link goes to correct page.');
+      $this->clickLink($comments[$i]->getSubject());
+      $this->assertText($comments[$i]->getSubject(), 'Comment link goes to correct page.');
       $this->assertRaw('<link rel="canonical"', 'Canonical URL was found in the HTML head');
     }
   }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php
index 1e13ddb..9bfacad 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php
@@ -75,24 +75,24 @@ function testCommentInterface() {
 
     $this->drupalGet('comment/' . $comment->id() . '/edit');
     $this->assertTitle(t('Edit comment @title | Drupal', array(
-      '@title' => $comment->subject->value,
+      '@title' => $comment->getSubject(),
     )));
 
     // Test changing the comment author to "Anonymous".
-    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->subject->value, array('name' => ''));
-    $this->assertTrue(empty($comment->name->value) && $comment->uid->target_id == 0, 'Comment author successfully changed to anonymous.');
+    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('name' => ''));
+    $this->assertTrue($comment->getAuthorName() == t('Anonymous') && $comment->getAuthorId() == 0, 'Comment author successfully changed to anonymous.');
 
     // Test changing the comment author to an unverified user.
     $random_name = $this->randomName();
     $this->drupalGet('comment/' . $comment->id() . '/edit');
-    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->subject->value, array('name' => $random_name));
+    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('name' => $random_name));
     $this->drupalGet('node/' . $this->node->id());
     $this->assertText($random_name . ' (' . t('not verified') . ')', 'Comment author successfully changed to an unverified user.');
 
     // Test changing the comment author to a verified user.
     $this->drupalGet('comment/' . $comment->id() . '/edit');
-    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->subject->value, array('name' => $this->web_user->getUsername()));
-    $this->assertTrue($comment->name->value == $this->web_user->getUsername() && $comment->uid->target_id == $this->web_user->id(), 'Comment author successfully changed to a registered user.');
+    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('name' => $this->web_user->getUsername()));
+    $this->assertTrue($comment->getAuthorName() == $this->web_user->getUsername() && $comment->uid->target_id == $this->web_user->id(), 'Comment author successfully changed to a registered user.');
 
     $this->drupalLogout();
 
@@ -110,29 +110,29 @@ function testCommentInterface() {
     $reply = $this->postComment(NULL, $this->randomName(), '', TRUE);
     $reply_loaded = comment_load($reply->id());
     $this->assertTrue($this->commentExists($reply, TRUE), 'Reply found.');
-    $this->assertEqual($comment->id(), $reply_loaded->pid->target_id, 'Pid of a reply to a comment is set correctly.');
+    $this->assertEqual($comment->id(), $reply_loaded->getParentComment()->id(), 'Pid of a reply to a comment is set correctly.');
     // Check the thread of reply grows correctly.
-    $this->assertEqual(rtrim($comment->thread->value, '/') . '.00/', $reply_loaded->thread->value);
+    $this->assertEqual(rtrim($comment->getThread(), '/') . '.00/', $reply_loaded->getThread());
 
     // Second reply to comment #2 creating comment #4.
     $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment/' . $comment->id());
-    $this->assertText($comment->subject->value, 'Individual comment-reply subject found.');
+    $this->assertText($comment->getSubject(), 'Individual comment-reply subject found.');
     $this->assertText($comment->comment_body->value, 'Individual comment-reply body found.');
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     $reply_loaded = comment_load($reply->id());
     $this->assertTrue($this->commentExists($reply, TRUE), 'Second reply found.');
     // Check the thread of second reply grows correctly.
-    $this->assertEqual(rtrim($comment->thread->value, '/') . '.01/', $reply_loaded->thread->value);
+    $this->assertEqual(rtrim($comment->getThread(), '/') . '.01/', $reply_loaded->getThread());
 
     // Reply to comment #4 creating comment #5.
     $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment/' . $reply_loaded->id());
-    $this->assertText($reply_loaded->subject->value, 'Individual comment-reply subject found.');
+    $this->assertText($reply_loaded->getSubject(), 'Individual comment-reply subject found.');
     $this->assertText($reply_loaded->comment_body->value, 'Individual comment-reply body found.');
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     $reply_loaded = comment_load($reply->id());
     $this->assertTrue($this->commentExists($reply, TRUE), 'Second reply found.');
     // Check the thread of reply to second reply grows correctly.
-    $this->assertEqual(rtrim($comment->thread->value, '/') . '.01.00/', $reply_loaded->thread->value);
+    $this->assertEqual(rtrim($comment->getThread(), '/') . '.01.00/', $reply_loaded->getThread());
 
     // Edit reply.
     $this->drupalGet('comment/' . $reply->id() . '/edit');
@@ -148,7 +148,7 @@ function testCommentInterface() {
     $this->setCommentsPerPage(50);
 
     // Attempt to reply to an unpublished comment.
-    $reply_loaded->status->value = CommentInterface::NOT_PUBLISHED;
+    $reply_loaded->setPublished(FALSE);
     $reply_loaded->save();
     $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment/' . $reply_loaded->id());
     $this->assertText(t('The comment you are replying to does not exist.'), 'Replying to an unpublished comment');
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php
index bda6e04..e8057bb 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php
@@ -157,12 +157,12 @@ function postComment(EntityInterface $entity, $comment, $subject = '', $contact
   function commentExists(CommentInterface $comment = NULL, $reply = FALSE) {
     if ($comment) {
       $regex = '/' . ($reply ? '<div class="indented">(.*?)' : '');
-      $regex .= '<a id="comment-' . $comment->id() . '"(.*?)'; // Comment anchor.
-      $regex .= $comment->subject->value . '(.*?)'; // Match subject.
-      $regex .= $comment->comment_body->value . '(.*?)'; // Match comment.
+      $regex .= '<a id="comment-' . $comment->id() . '"(.*?)';
+      $regex .= $comment->getSubject() . '(.*?)';
+      $regex .= $comment->comment_body->value . '(.*?)';
       $regex .= '/s';
 
-      return (boolean)preg_match($regex, $this->drupalGetContent());
+      return (boolean) preg_match($regex, $this->drupalGetContent());
     }
     else {
       return FALSE;
@@ -334,7 +334,7 @@ function testCommentFunctionality() {
 
     $this->drupalGet('comment/reply/entity_test/' . $this->entity->id() . '/comment/' . $comment1->id());
     $this->assertText('You are not authorized to view comments');
-    $this->assertNoText($comment1->subject->value, 'Comment not displayed.');
+    $this->assertNoText($comment1->getSubject(), 'Comment not displayed.');
 
     // Test comment field widget changes.
     $limited_user = $this->drupalCreateUser(array(
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
index 260da45..ccbd092 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
@@ -158,20 +158,20 @@ function testCommentEditPreviewSave() {
 
     // Check that the saved comment is still correct.
     $comment_loaded = comment_load($comment->id(), TRUE);
-    $this->assertEqual($comment_loaded->subject->value, $edit['subject'], 'Subject loaded.');
+    $this->assertEqual($comment_loaded->getSubject(), $edit['subject'], 'Subject loaded.');
     $this->assertEqual($comment_loaded->comment_body->value, $edit['comment_body[0][value]'], 'Comment body loaded.');
-    $this->assertEqual($comment_loaded->name->value, $edit['name'], 'Name loaded.');
-    $this->assertEqual($comment_loaded->created->value, $raw_date, 'Date loaded.');
+    $this->assertEqual($comment_loaded->getAuthorName(), $edit['name'], 'Name loaded.');
+    $this->assertEqual($comment_loaded->getCreatedTime(), $raw_date, 'Date loaded.');
     $this->drupalLogout();
 
     // Check that the date and time of the comment are correct when edited by
     // non-admin users.
     $user_edit = array();
-    $expected_created_time = $comment_loaded->created->value;
+    $expected_created_time = $comment_loaded->getCreatedTime();
     $this->drupalLogin($web_user);
     $this->drupalPostForm('comment/' . $comment->id() . '/edit', $user_edit, t('Save'));
     $comment_loaded = comment_load($comment->id(), TRUE);
-    $this->assertEqual($comment_loaded->created->value, $expected_created_time, 'Expected date and time for comment edited.');
+    $this->assertEqual($comment_loaded->getCreatedTime(), $expected_created_time, 'Expected date and time for comment edited.');
     $this->drupalLogout();
   }
 
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentStatisticsTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentStatisticsTest.php
index 07ca1bd..6906b55 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentStatisticsTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentStatisticsTest.php
@@ -106,7 +106,7 @@ function testCommentNodeCommentStatistics() {
     // Checks the new values of node comment statistics with comment #3.
     // The node needs to be reloaded with a node_load_multiple cache reset.
     $node = node_load($this->node->id(), TRUE);
-    $this->assertEqual($node->get('comment')->last_comment_name, $comment_loaded->name->value, 'The value of node last_comment_name is the name of the anonymous user.');
+    $this->assertEqual($node->get('comment')->last_comment_name, $comment_loaded->getAuthorName(), 'The value of node last_comment_name is the name of the anonymous user.');
     $this->assertEqual($node->get('comment')->last_comment_uid, 0, 'The value of node last_comment_uid is zero.');
     $this->assertEqual($node->get('comment')->comment_count, 2, 'The value of node comment_count is 2.');
   }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php
index 1613bcc..c1edf13 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php
@@ -179,12 +179,12 @@ public function postComment($entity, $comment, $subject = '', $contact = NULL, $
   function commentExists(CommentInterface $comment = NULL, $reply = FALSE) {
     if ($comment) {
       $regex = '/' . ($reply ? '<div class="indented">(.*?)' : '');
-      $regex .= '<a id="comment-' . $comment->id() . '"(.*?)'; // Comment anchor.
-      $regex .= $comment->subject->value . '(.*?)'; // Match subject.
-      $regex .= $comment->comment_body->value . '(.*?)'; // Match comment.
+      $regex .= '<a id="comment-' . $comment->id() . '"(.*?)';
+      $regex .= $comment->getSubject() . '(.*?)';
+      $regex .= $comment->comment_body->value . '(.*?)';
       $regex .= '/s';
 
-      return (boolean)preg_match($regex, $this->drupalGetContent());
+      return (boolean) preg_match($regex, $this->drupalGetContent());
     }
     else {
       return FALSE;
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php
index 6874fff..f69b55f 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php
@@ -44,7 +44,7 @@ function testCommentThreading() {
     $comment1 = $this->postComment($this->node, $comment_text, $subject_text, TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment1), 'Comment #1. Comment found.');
-    $this->assertEqual($comment1->thread->value, '01/');
+    $this->assertEqual($comment1->getThread(), '01/');
     // Confirm that there is no reference to a parent comment.
     $this->assertNoParentLink($comment1->id());
 
@@ -54,7 +54,7 @@ function testCommentThreading() {
     $comment2 = $this->postComment(NULL, $this->randomName(), '', TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment2, TRUE), 'Comment #2. Reply found.');
-    $this->assertEqual($comment2->thread->value, '01.00/');
+    $this->assertEqual($comment2->getThread(), '01.00/');
     // Confirm that there is a link to the parent comment.
     $this->assertParentLink($comment2->id(), $comment1->id());
 
@@ -63,7 +63,7 @@ function testCommentThreading() {
     $comment3 = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment3, TRUE), 'Comment #3. Second reply found.');
-    $this->assertEqual($comment3->thread->value, '01.00.00/');
+    $this->assertEqual($comment3->getThread(), '01.00.00/');
     // Confirm that there is a link to the parent comment.
     $this->assertParentLink($comment3->id(), $comment2->id());
 
@@ -73,7 +73,7 @@ function testCommentThreading() {
     $comment4 = $this->postComment(NULL, $this->randomName(), '', TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment4), 'Comment #4. Third reply found.');
-    $this->assertEqual($comment4->thread->value, '01.01/');
+    $this->assertEqual($comment4->getThread(), '01.01/');
     // Confirm that there is a link to the parent comment.
     $this->assertParentLink($comment4->id(), $comment1->id());
 
@@ -84,7 +84,7 @@ function testCommentThreading() {
     $comment5 = $this->postComment($this->node, $comment_text, $subject_text, TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment5), 'Comment #5. Second comment found.');
-    $this->assertEqual($comment5->thread->value, '02/');
+    $this->assertEqual($comment5->getThread(), '02/');
     // Confirm that there is no link to a parent comment.
     $this->assertNoParentLink($comment5->id());
 
@@ -94,7 +94,7 @@ function testCommentThreading() {
     $comment6 = $this->postComment(NULL, $this->randomName(), '', TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment6, TRUE), 'Comment #6. Reply found.');
-    $this->assertEqual($comment6->thread->value, '02.00/');
+    $this->assertEqual($comment6->getThread(), '02.00/');
     // Confirm that there is a link to the parent comment.
     $this->assertParentLink($comment6->id(), $comment5->id());
 
@@ -103,7 +103,7 @@ function testCommentThreading() {
     $comment7 = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment7, TRUE), 'Comment #7. Second reply found.');
-    $this->assertEqual($comment7->thread->value, '02.00.00/');
+    $this->assertEqual($comment7->getThread(), '02.00.00/');
     // Confirm that there is a link to the parent comment.
     $this->assertParentLink($comment7->id(), $comment6->id());
 
@@ -113,7 +113,7 @@ function testCommentThreading() {
     $comment8 = $this->postComment(NULL, $this->randomName(), '', TRUE);
     // Confirm that the comment was created and has the correct threading.
     $this->assertTrue($this->commentExists($comment8), 'Comment #8. Third reply found.');
-    $this->assertEqual($comment8->thread->value, '02.01/');
+    $this->assertEqual($comment8->getThread(), '02.01/');
     // Confirm that there is a link to the parent comment.
     $this->assertParentLink($comment8->id(), $comment5->id());
   }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
index 7b9b9ff..e7a4e11 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
@@ -45,29 +45,30 @@ function testCommentTokenReplacement() {
     $this->drupalGet('comment/reply/node/' . $node->id() . '/comment/' . $parent_comment->id());
     $child_comment = $this->postComment(NULL, $this->randomName(), $this->randomName());
     $comment = comment_load($child_comment->id());
-    $comment->homepage->value = 'http://example.org/';
+    $comment->setHomepage('http://example.org/');
 
     // Add HTML to ensure that sanitation of some fields tested directly.
-    $comment->subject->value = '<blink>Blinking Comment</blink>';
+    $comment->setSubject('<blink>Blinking Comment</blink>');
 
     // Generate and test sanitized tokens.
     $tests = array();
     $tests['[comment:cid]'] = $comment->id();
-    $tests['[comment:hostname]'] = check_plain($comment->hostname->value);
-    $tests['[comment:name]'] = filter_xss($comment->name->value);
+    $tests['[comment:hostname]'] = check_plain($comment->getHostname());
+    $tests['[comment:name]'] = filter_xss($comment->getAuthorName());
+    $tests['[comment:author]'] = filter_xss($comment->getAuthorName());
     $tests['[comment:mail]'] = check_plain($this->admin_user->getEmail());
-    $tests['[comment:homepage]'] = check_url($comment->homepage->value);
-    $tests['[comment:title]'] = filter_xss($comment->subject->value);
+    $tests['[comment:homepage]'] = check_url($comment->getHomepage());
+    $tests['[comment:title]'] = filter_xss($comment->getSubject());
     $tests['[comment:body]'] = $comment->comment_body->processed;
     $tests['[comment:url]'] = url('comment/' . $comment->id(), $url_options + array('fragment' => 'comment-' . $comment->id()));
     $tests['[comment:edit-url]'] = url('comment/' . $comment->id() . '/edit', $url_options);
-    $tests['[comment:created:since]'] = format_interval(REQUEST_TIME - $comment->created->value, 2, $language_interface->id);
-    $tests['[comment:changed:since]'] = format_interval(REQUEST_TIME - $comment->changed->value, 2, $language_interface->id);
-    $tests['[comment:parent:cid]'] = $comment->pid->target_id;
-    $tests['[comment:parent:title]'] = check_plain($parent_comment->subject->value);
-    $tests['[comment:node:nid]'] = $comment->entity_id->value;
+    $tests['[comment:created:since]'] = format_interval(REQUEST_TIME - $comment->getCreatedTime(), 2, $language_interface->id);
+    $tests['[comment:changed:since]'] = format_interval(REQUEST_TIME - $comment->getChangedTime(), 2, $language_interface->id);
+    $tests['[comment:parent:cid]'] = $comment->hasParentComment() ? $comment->getParentComment()->id() : NULL;
+    $tests['[comment:parent:title]'] = check_plain($parent_comment->getSubject());
+    $tests['[comment:node:nid]'] = $comment->getCommentedEntityId();
     $tests['[comment:node:title]'] = check_plain($node->getTitle());
-    $tests['[comment:author:uid]'] = $comment->uid->target_id;
+    $tests['[comment:author:uid]'] = $comment->getAuthorId();
     $tests['[comment:author:name]'] = check_plain($this->admin_user->getUsername());
 
     // Test to make sure that we generated something for each token.
@@ -79,13 +80,14 @@ function testCommentTokenReplacement() {
     }
 
     // Generate and test unsanitized tokens.
-    $tests['[comment:hostname]'] = $comment->hostname->value;
-    $tests['[comment:name]'] = $comment->name->value;
+    $tests['[comment:hostname]'] = $comment->getHostname();
+    $tests['[comment:name]'] = $comment->getAuthorName();
+    $tests['[comment:author]'] = $comment->getAuthorName();
     $tests['[comment:mail]'] = $this->admin_user->getEmail();
-    $tests['[comment:homepage]'] = $comment->homepage->value;
-    $tests['[comment:title]'] = $comment->subject->value;
+    $tests['[comment:homepage]'] = $comment->getHomepage();
+    $tests['[comment:title]'] = $comment->getSubject();
     $tests['[comment:body]'] = $comment->comment_body->value;
-    $tests['[comment:parent:title]'] = $parent_comment->subject->value;
+    $tests['[comment:parent:title]'] = $parent_comment->getSubject();
     $tests['[comment:node:title]'] = $node->getTitle();
     $tests['[comment:author:name]'] = $this->admin_user->getUsername();
 
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php
index fbc4769..d382baf 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php
@@ -89,13 +89,13 @@ public function setUp() {
         'entity_id' => $this->node->id(),
       ));
       $comment->uid->target_id = 0;
-      $comment->subject->value = 'Test comment ' . $i;
+      $comment->setSubject('Test comment ' . $i);
       $comment->comment_body->value = 'Test body ' . $i;
       $comment->comment_body->format = 'full_html';
 
       // Ensure comments are sorted in ascending order.
       $time = REQUEST_TIME + ($this->masterDisplayResults - $i);
-      $comment->created->value = $time;
+      $comment->setCreatedTime($time);
       $comment->changed->value = $time;
 
       $comment->save();
@@ -124,10 +124,10 @@ public function testBlockDisplay() {
     );
     $expected_result = array();
     foreach (array_values($this->commentsCreated) as $key => $comment) {
-      $expected_result[$key]['entity_id'] = $comment->entity_id->value;
-      $expected_result[$key]['subject'] = $comment->subject->value;
+      $expected_result[$key]['entity_id'] = $comment->getCommentedEntityId();
+      $expected_result[$key]['subject'] = $comment->getSubject();
       $expected_result[$key]['cid'] = $comment->id();
-      $expected_result[$key]['created'] = $comment->created->value;
+      $expected_result[$key]['created'] = $comment->getCreatedTime();
     }
     $this->assertIdenticalResultset($view, $expected_result, $map);
 
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/RowRssTest.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/RowRssTest.php
index d0cd727..2cee7a1 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/Views/RowRssTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/RowRssTest.php
@@ -38,7 +38,7 @@ public function testRssRow() {
     $result = $this->xpath('//item');
     $this->assertEqual(count($result), 1, 'Just one comment was found in the rss output.');
 
-    $this->assertEqual($result[0]->pubdate, gmdate('r', $this->comment->created->value), 'The right pubDate appears in the rss output.');
+    $this->assertEqual($result[0]->pubdate, gmdate('r', $this->comment->getCreatedTime()), 'The right pubDate appears in the rss output.');
   }
 
 }
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 9b405b2..8fa6e28 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -451,8 +451,8 @@ function forum_permission() {
  * $comment->save() calls hook_comment_publish() for all published comments.
  */
 function forum_comment_publish($comment) {
-  if ($comment->entity_type->value == 'node') {
-    \Drupal::service('forum_manager')->updateIndex($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    \Drupal::service('forum_manager')->updateIndex($comment->getCommentedEntityId());
   }
 }
 
@@ -465,8 +465,8 @@ function forum_comment_publish($comment) {
 function forum_comment_update($comment) {
   // $comment->save() calls hook_comment_publish() for all published comments,
   // so we need to handle all other values here.
-  if (!$comment->status->value && $comment->entity_type->value == 'node') {
-    \Drupal::service('forum_manager')->updateIndex($comment->entity_id->value);
+  if (!$comment->isPublished() && $comment->getCommentedEntityType() == 'node') {
+    \Drupal::service('forum_manager')->updateIndex($comment->getCommentedEntityId());
   }
 }
 
@@ -474,8 +474,8 @@ function forum_comment_update($comment) {
  * Implements hook_comment_unpublish().
  */
 function forum_comment_unpublish($comment) {
-  if ($comment->entity_type->value == 'node') {
-    \Drupal::service('forum_manager')->updateIndex($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    \Drupal::service('forum_manager')->updateIndex($comment->getCommentedEntityId());
   }
 }
 
@@ -483,8 +483,8 @@ function forum_comment_unpublish($comment) {
  * Implements hook_comment_delete().
  */
 function forum_comment_delete($comment) {
-  if ($comment->entity_type->value == 'node') {
-    \Drupal::service('forum_manager')->updateIndex($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    \Drupal::service('forum_manager')->updateIndex($comment->getCommentedEntityId());
   }
 }
 
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 9a9f154..289dbfb 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -2046,8 +2046,8 @@ function node_reindex_node_search($nid) {
  */
 function node_comment_insert($comment) {
   // Reindex the node when comments are added.
-  if ($comment->entity_type->value == 'node') {
-    node_reindex_node_search($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    node_reindex_node_search($comment->getCommentedEntityId());
   }
 }
 
@@ -2056,8 +2056,8 @@ function node_comment_insert($comment) {
  */
 function node_comment_update($comment) {
   // Reindex the node when comments are changed.
-  if ($comment->entity_type->value == 'node') {
-    node_reindex_node_search($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    node_reindex_node_search($comment->getCommentedEntityId());
   }
 }
 
@@ -2066,8 +2066,8 @@ function node_comment_update($comment) {
  */
 function node_comment_delete($comment) {
   // Reindex the node when comments are deleted.
-  if ($comment->entity_type->value == 'node') {
-    node_reindex_node_search($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    node_reindex_node_search($comment->getCommentedEntityId());
   }
 }
 
@@ -2076,8 +2076,8 @@ function node_comment_delete($comment) {
  */
 function node_comment_publish($comment) {
   // Reindex the node when comments are published.
-  if ($comment->entity_type->value == 'node') {
-    node_reindex_node_search($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    node_reindex_node_search($comment->getCommentedEntityId());
   }
 }
 
@@ -2086,7 +2086,7 @@ function node_comment_publish($comment) {
  */
 function node_comment_unpublish($comment) {
   // Reindex the node when comments are unpublished.
-  if ($comment->entity_type->value == 'node') {
-    node_reindex_node_search($comment->entity_id->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    node_reindex_node_search($comment->getCommentedEntityId());
   }
 }
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 018aff6..e476e8f 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -227,12 +227,12 @@ function rdf_comment_load($comments) {
     // to optimize performance for websites that implement an entity cache.
     $created_mapping = rdf_get_mapping('comment', $comment->bundle())
       ->getPreparedFieldMapping('created');
-    $comment->rdf_data['date'] = rdf_rdfa_attributes($created_mapping, $comment->created->value);
-    $entity = entity_load($comment->entity_type->value, $comment->entity_id->value);
+    $comment->rdf_data['date'] = rdf_rdfa_attributes($created_mapping, $comment->getCreatedTime());
+    $entity = $comment->getCommentedEntity();
     $uri = $entity->uri();
     $comment->rdf_data['entity_uri'] = url($uri['path']);
-    if ($comment->pid->target_id) {
-      $comment->rdf_data['pid_uri'] = url('comment/' . $comment->pid->target_id);
+    if ($comment->hasParentComment()) {
+      $comment->rdf_data['pid_uri'] = url('comment/' . $comment->getParentComment()->id());
     }
   }
 }
diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module
index b1be041..d863f49 100644
--- a/core/modules/tracker/tracker.module
+++ b/core/modules/tracker/tracker.module
@@ -194,8 +194,8 @@ function tracker_node_predelete(EntityInterface $node, $arg = 0) {
 function tracker_comment_update($comment) {
   // $comment->save() calls hook_comment_publish() for all published comments
   // so we need to handle all other values here.
-  if ($comment->status->value != CommentInterface::PUBLISHED && $comment->entity_type->value == 'node') {
-    _tracker_remove($comment->entity_id->target_id, $comment->uid->target_id, $comment->changed->value);
+  if (!$comment->isPublished() && $comment->getCommentedEntityType() == 'node') {
+    _tracker_remove($comment->getCommentedEntityId(), $comment->getAuthorId(), $comment->getChangedTime());
   }
 }
 
@@ -206,8 +206,8 @@ function tracker_comment_update($comment) {
  * $comment->save() calls hook_comment_publish() for all published comments.
  */
 function tracker_comment_publish($comment) {
-  if ($comment->entity_type->value == 'node') {
-    _tracker_add($comment->entity_id->target_id, $comment->uid->target_id, $comment->changed->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    _tracker_add($comment->getCommentedEntityId(), $comment->getAuthorId(), $comment->getChangedTime());
   }
 }
 
@@ -215,8 +215,8 @@ function tracker_comment_publish($comment) {
  * Implements hook_comment_unpublish().
  */
 function tracker_comment_unpublish($comment) {
-  if ($comment->entity_type->value == 'node') {
-    _tracker_remove($comment->entity_id->target_id, $comment->uid->target_id, $comment->changed->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    _tracker_remove($comment->getCommentedEntityId(), $comment->getAuthorId(), $comment->getChangedTime());
   }
 }
 
@@ -224,8 +224,8 @@ function tracker_comment_unpublish($comment) {
  * Implements hook_comment_delete().
  */
 function tracker_comment_delete($comment) {
-  if ($comment->entity_type->value == 'node') {
-    _tracker_remove($comment->entity_id->target_id, $comment->uid->target_id, $comment->changed->value);
+  if ($comment->getCommentedEntityType() == 'node') {
+    _tracker_remove($comment->getCommentedEntityId(), $comment->getAuthorId(), $comment->getChangedTime());
   }
 }
 
