diff --git a/content_entity_example/content_entity_example.info.yml b/content_entity_example/content_entity_example.info.yml
new file mode 100755
index 0000000..0315475
--- /dev/null
+++ b/content_entity_example/content_entity_example.info.yml
@@ -0,0 +1,9 @@
+name: Content Entity Example
+type: module
+description: 'Provides ContentEntityExampleContact entity.'
+package: Example modules
+core: 8.x
+# These modules are required by the tests, must be available at bootstrap time
+dependencies:
+  - options
+  - entity_reference
diff --git a/content_entity_example/content_entity_example.links.action.yml b/content_entity_example/content_entity_example.links.action.yml
new file mode 100755
index 0000000..b307873
--- /dev/null
+++ b/content_entity_example/content_entity_example.links.action.yml
@@ -0,0 +1,11 @@
+# All action links for this module
+
+content_entity_example.contact_add:
+  # Which route will be called by the link
+  route_name: content_entity_example.contact_add
+  title: 'Add Contact'
+
+  # Where will the link appear, defined by route name.
+  appears_on:
+    - content_entity_example.contact_list
+    - content_entity_example.contact_view
diff --git a/content_entity_example/content_entity_example.links.menu.yml b/content_entity_example/content_entity_example.links.menu.yml
new file mode 100755
index 0000000..19693f4
--- /dev/null
+++ b/content_entity_example/content_entity_example.links.menu.yml
@@ -0,0 +1,12 @@
+# Define the menu links for this module
+
+content_entity_example.contact_list:
+  title: 'Content Entity Example: Contacts Listing'
+  route_name: content_entity_example.contact_list
+  description: 'List Contacts'
+  weight: 10
+content_entity_example_contact.admin.structure.settings:
+  title: Contact Settings
+  description: 'Configure Contact entity'
+  route_name:  content_entity_example.contact_settings
+  parent: system.admin_structure
diff --git a/content_entity_example/content_entity_example.links.task.yml b/content_entity_example/content_entity_example.links.task.yml
new file mode 100755
index 0000000..2af3592
--- /dev/null
+++ b/content_entity_example/content_entity_example.links.task.yml
@@ -0,0 +1,22 @@
+# Define the 'local' links for the module
+
+contact.settings_tab:
+  route_name: content_entity_example.contact_settings
+  title: 'Settings'
+  base_route: content_entity_example.contact_settings
+
+content_entity_example.contact_view:
+  route_name: content_entity_example.contact_view
+  base_route: content_entity_example.contact_view
+  title: 'View'
+
+contact.page_edit:
+  route_name: content_entity_example.contact_edit
+  base_route: content_entity_example.contact_view
+  title: Edit
+
+contact.delete_confirm:
+  route_name:  content_entity_example.contact_delete
+  base_route:  content_entity_example.contact_view
+  title: Delete
+  weight: 10
diff --git a/content_entity_example/content_entity_example.module b/content_entity_example/content_entity_example.module
new file mode 100755
index 0000000..1bded97
--- /dev/null
+++ b/content_entity_example/content_entity_example.module
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\content_entity_example\content_entity_example.module
+ */
+
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * @defgroup content_entity_example Example: Content Entity
+ * @ingroup examples
+ * @{
+ * Implement a Content entity.
+ *
+ * This module demonstrates implementing a Content Entity.
+ *
+ * This is an example of a fieldable content entity used to hold structured
+ * information without the overhead of using a content type. It is defined
+ * programmatically and we will expose the main techniques to handle and expose
+ * the contents.
+ *
+ * We define a content entity named 'Contact'. With it, we demonstrate the main
+ * tasks for an entity:
+ * - define
+ * - save
+ * - load
+ * - view
+ * - edit
+ * - delete
+ * - control access
+ *
+ * Where ever possible, we use the amazing tools built into D8 natively.
+ * }
+ */
+
+/**
+ * Implements hook_permission().
+ */
+function content_entity_example_permission() {
+  return array(
+    'delete contact entity' => array(
+      'title' => t('Delete entity content.'),
+    ),
+    'add contact entity' => array(
+      'title' => t('Add entity content'),
+    ),
+    'view contact entity' => array(
+      'title' => t('View entity content'),
+    ),
+    'edit contact entity' => array(
+      'title' => t('Edit entity content'),
+    ),
+    'administer contact entity' => array(
+      'title' => t('Administer settings'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_help().
+ */
+function content_entity_example_help($route_name) {
+  switch ($route_name) {
+    // Main module help for the block module.
+    case 'content_entity_example.contact_list':
+      return '<p>' .
+      t('Content Entity Example implements a Contacts model. These contacts are fieldable entities. You can manage the fields on the <a href="@adminlink">Contacts admin page</a>.', array(
+          '@adminlink' => \Drupal::urlGenerator()->generateFromRoute('content_entity_example.contact_settings'),
+        )
+      ) . '</p>';
+  }
+}
diff --git a/content_entity_example/content_entity_example.routing.yml b/content_entity_example/content_entity_example.routing.yml
new file mode 100755
index 0000000..91f6bbd
--- /dev/null
+++ b/content_entity_example/content_entity_example.routing.yml
@@ -0,0 +1,58 @@
+# This file brings everything together. Very nifty!
+
+# Route name can be used in sevaral place (links, redirects, local actions etc.)
+content_entity_example.contact_view:
+  path: '/content_entity_example_contact/{content_entity_example_contact}'
+  defaults:
+  # Calls the view controller, defined in the annotation of the contact entity
+    _entity_view: 'content_entity_example_contact'
+    _title: 'Contact Content'
+  requirements:
+  # Calls the access controller of the entity, $operation 'view'
+    _entity_access: 'content_entity_example_contact.view'
+
+content_entity_example.contact_list:
+  path: '/content_entity_example_contact/list'
+  defaults:
+  # Calls the list controller, defined in the annotation of the contact entity.
+    _entity_list: 'content_entity_example_contact'
+    _title: 'Contact List'
+  requirements:
+  # Checks for permission directly.
+    _permission: 'view contact entity'
+
+content_entity_example.contact_add:
+  path: '/content_entity_example_contact/add'
+  defaults:
+  # Calls the form.add controller, defined in the contact entity.
+    _entity_form: content_entity_example_contact.add
+    _title: 'Add Contact'
+  requirements:
+    _entity_create_access: 'content_entity_example_contact'
+
+content_entity_example.contact_edit:
+  path: '/content_entity_example_contact/{content_entity_example_contact}/edit'
+  defaults:
+  # Calls the form.edit controller, defined in the contact entity.
+    _entity_form: content_entity_example_contact.edit
+    _title: 'Edit Contact'
+  requirements:
+    _entity_access: 'content_entity_example_contact.edit'
+
+content_entity_example.contact_delete:
+  path: '/contact/{content_entity_example_contact}/delete'
+  defaults:
+    # Calls the form.delete controller, defined in the contact entity.
+    _entity_form: content_entity_example_contact.delete
+    _title: 'Delete Contact'
+  requirements:
+
+    _entity_access: 'content_entity_example_contact.delete'
+
+content_entity_example.contact_settings:
+  path: 'admin/structure/content_entity_example_contact_settings'
+  defaults:
+    _form: '\Drupal\content_entity_example\Form\ContactSettingsForm'
+    _title: 'Contact Settings'
+  requirements:
+    _permission: 'administer contact entity'
diff --git a/content_entity_example/src/ContactAccessControlHandler.php b/content_entity_example/src/ContactAccessControlHandler.php
new file mode 100755
index 0000000..5b812a9
--- /dev/null
+++ b/content_entity_example/src/ContactAccessControlHandler.php
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\content_entity_example/ContactAccessController
+ */
+
+namespace Drupal\content_entity_example;
+
+use Drupal\Core\Entity\EntityAccessControlHandler;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Session\AccountInterface;
+
+/**
+ * Access controller for the comment entity.
+ *
+ * @see \Drupal\comment\Entity\Comment.
+ */
+class ContactAccessControlHandler extends EntityAccessControlHandler {
+
+  /**
+   * {@inheritdoc}
+   *
+   * Link the activities to the permissions. checkAccess is called with the
+   * $operation as defined in the routing.yml file.
+   */
+  protected function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) {
+
+    switch ($operation) {
+      case 'view':
+        return $account->hasPermission('view contact entity');
+        break;
+
+      case 'edit':
+        return $account->hasPermission('edit contact entity');
+        break;
+
+      case 'delete':
+        return $account->hasPermission('delete contact entity');
+        break;
+
+    }
+
+    return TRUE;
+  }
+
+  /**
+   * {@inheritdoc}
+   *
+   * Separate from the checkAccess because the entity does not yet exist, it
+   * will be created during the 'add' process.
+   */
+  protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
+    return $account->hasPermission('add contact entity');
+  }
+}
diff --git a/content_entity_example/src/ContactInterface.php b/content_entity_example/src/ContactInterface.php
new file mode 100755
index 0000000..499d555
--- /dev/null
+++ b/content_entity_example/src/ContactInterface.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\content_entity_example\ContactInterface.
+ */
+
+namespace Drupal\content_entity_example;
+
+use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\Core\Entity\EntityTypeInterface;
+use Drupal\user\EntityOwnerInterface;
+/**
+ * Provides an interface defining a Contact entity.
+ * @ingroup content_entity_example
+ */
+interface ContactInterface extends ContentEntityInterface, EntityOwnerInterface {
+
+}
diff --git a/content_entity_example/src/Entity/Contact.php b/content_entity_example/src/Entity/Contact.php
new file mode 100755
index 0000000..e4e8514
--- /dev/null
+++ b/content_entity_example/src/Entity/Contact.php
@@ -0,0 +1,310 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\content_entity_example\Entity\ContentEntityExample.
+ */
+
+namespace Drupal\content_entity_example\Entity;
+
+use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Field\FieldDefinition;
+use Drupal\Core\Entity\ContentEntityBase;
+use Drupal\Core\Entity\EntityTypeInterface;
+use Drupal\content_entity_example\ContactInterface;
+use Drupal\user\UserInterface;
+/**
+ * Defines the ContentEntityExample entity.
+ *
+ * @ingroup content_entity_example
+ *
+ * This is the main definition of the entity type. From it, an entityType is
+ * derived. The most important properties in this example are listed below.
+ *
+ * id: The unique identifier of this entityType. It follows the pattern
+ * 'moduleName_xyz' to avoid naming conflicts.
+ *
+ * label: Human readable name of the entity type.
+ *
+ * controllers: Controller classes are used for different tasks. You can use
+ * standard controllers provided by D8 or build your own controller, most
+ * probably derived from the standard class. In detail:
+ *
+ * - view_builder: we use the standard controller to view an instance. It is
+ *   called when a route lists an '_entity_view' default for the entityType
+ *   (see routing.yml for details. The view can be manipulated by using the
+ *   standard drupal tools in the settings.
+ *
+ * - list-builder: We derive our own list builder class from the
+ *   entityListBuilder to control the presentation.
+ *   If there is a view available for this entity from the views module, it
+ *   overrides the list builder. @todo: any view? naming convention?
+ *
+ * - form: We derive our own forms to add functionality like additional fields,
+ *   redirects etc. These forms are called when the routing list an
+ *   '_entity_form' default for the entityType. Depending on the suffix
+ *   (.add/.edit/.delete) in the route, the correct form is called.
+ *
+ * - access: Our own accessController where we determine access rights based on
+ *   permissions.
+ *
+ *  - base_table: Define the name of the table used to store the data. Make sure
+ *    it is unique. The schema is automatically determined from the
+ *    BaseFieldDefinitions below. The table is automatically created during
+ *    installation.
+ *
+ *  - fieldable: Can additional fields be added to the entity via the GUI?
+ *    Analog to content types.
+ *
+ *  - entity_keys: How to access the fields. Analog to 'nid' or 'uid'.
+ *
+ *  - links: Provide links to do standard tasks. The 'edit-form' and
+ *    'delete-form' links are added to the list built by the
+ *    entityListController. They will show up as action buttons in an additional
+ *    column. @todo: understand and explain the admin-link thing
+ *
+ * There are many more properties to be used in an entity type definition. For
+ * a complete overview, please refer to the '\Drupal\Core\Entity\EntityType'
+ * class definition.
+ *
+ * The following construct is the actual definition of the entity type which
+ * ist read and cached. Don't forget to clear cache after changes.
+ *
+ * @ContentEntityType(
+ *   id = "content_entity_example_contact",
+ *   label = @Translation("Contact entity"),
+ *   controllers = {
+ *     "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
+ *     "list_builder" = "Drupal\content_entity_example\Entity\Controller\ContactListBuilder",
+ *
+ *     "form" = {
+ *       "add" = "Drupal\content_entity_example\Form\ContactForm",
+ *       "edit" = "Drupal\content_entity_example\Form\ContactForm",
+ *       "delete" = "Drupal\content_entity_example\Form\ContactDeleteForm",
+ *     },
+ *     "access" = "Drupal\content_entity_example\ContactAccessControlHandler",
+ *   },
+ *   base_table = "contact",
+ *   admin_permission = "administer content_entity_example entity",
+ *   fieldable = TRUE,
+ *   entity_keys = {
+ *     "id" = "id",
+ *     "label" = "name",
+ *     "uuid" = "uuid"
+ *   },
+ *   links = {
+ *     "edit-form" = "content_entity_example.contact_edit",
+ *     "admin-form" = "content_entity_example.contact_settings",
+ *     "delete-form" = "content_entity_example.contact_delete"
+ *   }
+ * )
+ *
+ * The 'Contact' class defines methods and fields for the contact entity.
+ *
+ * Being derived from the ContentEntityBase class, we can override the methods
+ * we want. In our case we want to provide access to the standard fields about
+ * creation and changed time stamps.
+ *
+ * Our interface (see ContactInterface) also exposes the EntityOwnerInterface.
+ * This allows us to provide methods for setting and providing ownership
+ * information.
+ *
+ * The most important part is the definitions of the field properties for this
+ * entity type. These are of the same type as fields added through the GUI, but
+ * they can by changed in code. In the definition we can define if the user with
+ * the rights privileges can influence the presentation (view, edit) of each
+ * field.
+ */
+class Contact extends ContentEntityBase implements ContactInterface {
+
+  /**
+   * {@inheritdoc}
+   *
+   * When a new entity instance is added, set the user_id entity reference to
+   * the current user as the creator of the instance.
+   */
+  public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {
+    parent::preCreate($storage_controller, $values);
+    $values += array(
+      'user_id' => \Drupal::currentUser()->id(),
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCreatedTime() {
+    return $this->get('created')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getChangedTime() {
+    return $this->get('changed')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getOwner() {
+    return $this->get('user_id')->entity;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getOwnerId() {
+    return $this->get('user_id')->target_id;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setOwnerId($uid) {
+    $this->set('user_id', $uid);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setOwner(UserInterface $account) {
+    $this->set('user_id', $account->id());
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   *
+   * Define the field properties here.
+   *
+   * Field name, type and size determine the table structure.
+   *
+   * In addition, we can define how the field and its content can be manipulated
+   * in the GUI. The behaviour of the widgets used can be determined here.
+   */
+  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
+
+    // Standard field, used as unique if primary index.
+    $fields['id'] = FieldDefinition::create('integer')
+      ->setLabel(t('ID'))
+      ->setDescription(t('The ID of the Contact entity.'))
+      ->setReadOnly(TRUE);
+
+    // Standard field, unique outside of the scope of the current project.
+    $fields['uuid'] = FieldDefinition::create('uuid')
+      ->setLabel(t('UUID'))
+      ->setDescription(t('The UUID of the Contact entity.'))
+      ->setReadOnly(TRUE);
+
+    // Name field for the contact.
+    // We set display options for the view as well as the form.
+    // Users with correct privileges can change the view and edit configuration.
+
+    $fields['name'] = FieldDefinition::create('string')
+      ->setLabel(t('Name'))
+      ->setDescription(t('The name of the Contact entity.'))
+      ->setSettings(array(
+        'default_value' => '',
+        'max_length' => 255,
+        'text_processing' => 0,
+      ))
+      ->setDisplayOptions('view', array(
+        'label' => 'above',
+        'type' => 'string',
+        'weight' => -6,
+      ))
+      ->setDisplayOptions('form', array(
+        'type' => 'string',
+        'weight' => -6,
+      ))
+      ->setDisplayConfigurable('form', TRUE)
+      ->setDisplayConfigurable('view', TRUE);
+
+    $fields['first_name'] = FieldDefinition::create('string')
+      ->setLabel(t('First Name'))
+      ->setDescription(t('The first name of the Contact entity.'))
+      ->setSettings(array(
+        'default_value' => '',
+        'max_length' => 255,
+        'text_processing' => 0,
+      ))
+      ->setDisplayOptions('view', array(
+        'label' => 'above',
+        'type' => 'string',
+        'weight' => -5,
+      ))
+      ->setDisplayOptions('form', array(
+        'type' => 'string',
+        'weight' => -5,
+      ))
+      ->setDisplayConfigurable('form', TRUE)
+      ->setDisplayConfigurable('view', TRUE);
+
+    // Gender field for the contact.
+    // ListTextType with a drop down menu widget.
+    // The values shown in the menu are 'male' and 'female'.
+    // In the view the field content is shown as string.
+    // In the form the choices are presented as options list.
+    $fields['gender'] = FieldDefinition::create('list_text')
+      ->setLabel(t('Gender'))
+      ->setDescription(t('The gender of the Contact entity.'))
+      ->setSettings(array(
+        'allowed_values' => array(
+          'female' => 'female',
+          'male' => 'male',
+        ),
+      ))
+      ->setDisplayOptions('view', array(
+        'label' => 'above',
+        'type' => 'string',
+        'weight' => -4,
+      ))
+      ->setDisplayOptions('form', array(
+        'type' => 'options_select',
+        'weight' => -4,
+      ))
+      ->setDisplayConfigurable('form', TRUE)
+      ->setDisplayConfigurable('view', TRUE);
+
+    // Owner field of the contact.
+    // Entity reference field, holds the reference to the user object.
+    // The view shows the user name field of the user.
+    // The form presents a auto complete field for the user name.
+    $fields['user_id'] = FieldDefinition::create('entity_reference')
+      ->setLabel(t('User Name'))
+      ->setDescription(t('The Name of the associated user.'))
+      ->setSetting('target_type', 'user')
+      ->setSetting('handler', 'default')
+      ->setDisplayOptions('view', array(
+        'label' => 'above',
+        'type' => 'entity_reference',
+        'weight' => -3,
+      ))
+      ->setDisplayOptions('form', array(
+        'type' => 'entity_reference_autocomplete',
+        'settings' => array(
+          'match_operator' => 'CONTAINS',
+          'size' => 60,
+          'autocomplete_type' => 'tags',
+          'placeholder' => '',
+        ),
+        'weight' => -3,
+      ))
+      ->setDisplayConfigurable('form', TRUE)
+      ->setDisplayConfigurable('view', TRUE);
+
+    $fields['langcode'] = FieldDefinition::create('language')
+      ->setLabel(t('Language code'))
+      ->setDescription(t('The language code of ContentEntityExample entity.'));
+    $fields['created'] = FieldDefinition::create('created')
+      ->setLabel(t('Created'))
+      ->setDescription(t('The time that the entity was created.'));
+
+    $fields['changed'] = FieldDefinition::create('changed')
+      ->setLabel(t('Changed'))
+      ->setDescription(t('The time that the entity was last edited.'));
+
+    return $fields;
+  }
+}
diff --git a/content_entity_example/src/Entity/Controller/ContactListBuilder.php b/content_entity_example/src/Entity/Controller/ContactListBuilder.php
new file mode 100755
index 0000000..f27ddcb
--- /dev/null
+++ b/content_entity_example/src/Entity/Controller/ContactListBuilder.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\content_entity_example\Entity\Controller\ContentEntityExampleController.
+ */
+
+namespace Drupal\content_entity_example\Entity\Controller;
+
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Entity\EntityListBuilder;
+
+/**
+ * Provides a list controller for content_entity_example entity.
+ *
+ * @ingroup content_entity_example
+ */
+class ContactListBuilder extends EntityListBuilder {
+
+  /**
+   * {@inheritdoc}
+   *
+   * Building the header and content lines for the contact list.
+   *
+   * Calling the parent::buildHeader() adds a column for the possible actions
+   * and inserts the 'edit' and 'delete' links as defined for the entity type.
+   */
+  public function buildHeader() {
+    $header['id'] = t('ContactID');
+    $header['name'] = t('Name');
+    $header['first_name'] = t('First Name');
+    $header['gender'] = t('Gender');
+    return $header + parent::buildHeader();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildRow(EntityInterface $entity) {
+    /* @var $entity \Drupal\content_entity_example\Entity\Contact */
+    $row['id'] = $entity->id();
+    $row['name'] = \Drupal::l($this->getLabel($entity),
+      'content_entity_example.contact_view', array(
+        'content_entity_example_contact' => $entity->id(),
+      ));
+    $row['first_name'] = $entity->first_name->value;
+    $row['gender'] = $entity->gender->value;
+    return $row + parent::buildRow($entity);
+  }
+}
diff --git a/content_entity_example/src/Form/ContactDeleteForm.php b/content_entity_example/src/Form/ContactDeleteForm.php
new file mode 100755
index 0000000..4ee1292
--- /dev/null
+++ b/content_entity_example/src/Form/ContactDeleteForm.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\content_entity_example\Entity\Form\ContactDeleteForm.
+ */
+
+namespace Drupal\content_entity_example\Form;
+
+use Drupal\Core\Entity\ContentEntityConfirmFormBase;
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Url;
+
+/**
+ * Provides a form for deleting a content_entity_example entity.
+ *
+ * @ingroup content_entity_example
+ */
+class ContactDeleteForm extends ContentEntityConfirmFormBase {
+
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getQuestion() {
+    return t('Are you sure you want to delete entity %name?', array('%name' => $this->entity->label()));
+  }
+
+  /**
+   * {@inheritdoc}
+   *
+   * If the delete command is canceled, return to the contact list.
+   */
+  public function getCancelURL() {
+    return new Url('content_entity_example.contact_list');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getConfirmText() {
+    return t('Delete');
+  }
+
+  /**
+   * {@inheritdoc}
+   *
+   * Delete the entity and log the event. log() replaces the watchdog.
+   */
+  public function submit(array $form, FormStateInterface $form_state) {
+    $this->entity->delete();
+
+    \Drupal::logger('content_entity_example')->log(WATCHDOG_INFO, '@type: deleted %title.',
+      array(
+        '@type' => $this->entity->bundle(),
+        '%title' => $this->entity->label(),
+      ));
+    $form_state->setRedirect('content_entity_example.contact_list');
+  }
+
+}
diff --git a/content_entity_example/src/Form/ContactForm.php b/content_entity_example/src/Form/ContactForm.php
new file mode 100755
index 0000000..e0b647e
--- /dev/null
+++ b/content_entity_example/src/Form/ContactForm.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * @file
+ * Definition of Drupal\content_entity_example\Entity\Form\ContentEntityExampleFormController.
+ */
+
+namespace Drupal\content_entity_example\Form;
+
+use Drupal\Core\Entity\ContentEntityForm;
+use Drupal\Core\Language\Language;
+use Drupal\Core\Form\FormStateInterface;
+
+/**
+ * Form controller for the content_entity_example entity edit forms.
+ *
+ * @ingroup content_entity_example
+ */
+class ContactForm extends ContentEntityForm {
+
+  /**
+   * Overrides Drupal\Core\Entity\EntityFormController::buildForm().
+   */
+  public function buildForm(array $form, FormStateInterface $form_state) {
+    /* @var $entity \Drupal\content_entity_example\Entity\Contact */
+    $form = parent::buildForm($form, $form_state);
+    $entity = $this->entity;
+
+    $form['langcode'] = array(
+      '#title' => t('Language'),
+      '#type' => 'language_select',
+      '#default_value' => $entity->getUntranslated()->language()->id,
+      '#languages' => Language::STATE_ALL,
+    );
+
+    return $form;
+  }
+
+  /**
+   * Overrides \Drupal\Core\Entity\EntityFormController::submit().
+   */
+  public function submit(array $form, FormStateInterface $form_state) {
+    // Build the entity object from the submitted values.
+    $entity = parent::submit($form, $form_state);
+    $form_state->setRedirect('content_entity_example.contact_list');
+
+    return $entity;
+  }
+
+  /**
+   * Overrides Drupal\Core\Entity\EntityFormController::save().
+   */
+  public function save(array $form, FormStateInterface $form_state) {
+    $entity = $this->entity;
+    $entity->save();
+  }
+}
diff --git a/content_entity_example/src/Form/ContactSettingsForm.php b/content_entity_example/src/Form/ContactSettingsForm.php
new file mode 100755
index 0000000..2ce56e8
--- /dev/null
+++ b/content_entity_example/src/Form/ContactSettingsForm.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * @file
+ * Defines Drupal\content_entity_example\Form\ContentEntityExampleSettingsForm.
+ */
+
+namespace Drupal\content_entity_example\Form;
+
+use Drupal\Core\Form\FormBase;
+use Drupal\Core\Form\FormStateInterface;
+
+/**
+ * Class ContentEntityExampleSettingsForm.
+ * @package Drupal\content_entity_example\Form
+ * @ingroup content_entity_example
+ */
+class ContactSettingsForm extends FormBase {
+  /**
+   * Returns a unique string identifying the form.
+   *
+   * @return string
+   *   The unique string identifying the form.
+   */
+  public function getFormId() {
+    return 'content_entity_example_settings';
+  }
+
+  /**
+   * Form submission handler.
+   *
+   * @param FormStateInterface $form
+   *   An associative array containing the structure of the form.
+   * @param array $form_state
+   *   An associative array containing the current state of the form.
+   */
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    // Empty implementation of the abstract submit class.
+  }
+
+
+  /**
+   * Define the form used for ContentEntityExample settings.
+   * @return array
+   *   Form definition array.
+   *
+   * @param array $form
+   *   An associative array containing the structure of the form.
+   * @param FormStateInterface $form_state
+   *   An associative array containing the current state of the form.
+   */
+  public function buildForm(array $form, FormStateInterface $form_state) {
+    $form['contact_settings']['#markup'] = 'Settings form for ContentEntityExample. Manage field settings here.';
+    return $form;
+  }
+}
diff --git a/content_entity_example/src/Tests/ContentEntityExampleTest.php b/content_entity_example/src/Tests/ContentEntityExampleTest.php
new file mode 100755
index 0000000..591b35b
--- /dev/null
+++ b/content_entity_example/src/Tests/ContentEntityExampleTest.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * @file
+ * Test cases for Content Entity Example Module.
+ */
+
+namespace Drupal\content_entity_example\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Class ContentEntityExampleTest.
+ * @package Drupal\content_entity_example\Tests
+ *
+ * @ingroup content_entity_example
+ */
+class ContentEntityExampleTest extends WebTestBase {
+
+  public static $modules = array('content_entity_example', 'block');
+
+  protected $webUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Content Entity Example tests',
+      'description' => 'Tests the basic functions of the Content Entity Example module.',
+      'group' => 'Content Entity Example',
+    );
+  }
+
+  /**
+   * Set up instance for starting the test.
+   */
+  public function setUp() {
+    parent::setUp();
+
+    $this->webUser = $this->drupalCreateUser(array(
+     'add contact entity',
+     'edit contact entity',
+     'view contact entity',
+     'delete contact entity',
+     'administer contact entity'));
+    $this->drupalPlaceBlock('system_menu_block:tools', array());
+  }
+
+  /**
+   * Basic tests for Content Entity Example.
+   */
+  public function testContentEntityExample() {
+
+    // Anonymous User should not see the link to the listing.
+    $this->assertNoText(t('Content Entity Example: Contacts Listing'));
+
+    $this->drupalLogin($this->webUser);
+
+    // Web_user user has the right to view listing.
+    $this->assertLink(t('Content Entity Example: Contacts Listing'));
+
+    $this->clickLink(t('Content Entity Example: Contacts Listing'));
+
+    // WebUser can add entity content.
+    $this->assertLink(t('Add Contact'));
+
+    $this->clickLink(t('Add Contact'));
+
+    $this->assertFieldByName('name[0][value]', '', 'Name Field, empty');
+    $this->assertFieldByName('name[0][value]', '', 'First Name Field, empty');
+    $this->assertFieldByName('name[0][value]', '', 'Gender Field, empty');
+
+    $user_ref = $this->webUser->name->value . ' (' . $this->webUser->id() . ')';
+    $this->assertFieldByName('user_id[0][target_id]', $user_ref, 'User ID reference field points to web_user');
+
+    // Post content, save an instance. Go back to list after saving.
+    $edit = array(
+      'name[0][value]' => 'test name',
+      'first_name[0][value]' => 'test first name',
+      'gender' => 'male',
+    );
+    $this->drupalPostForm(NULL, $edit, t('Save'));
+
+    // Entity listed.
+    $this->assertLink(t('Edit'));
+    $this->assertLink(t('Delete'));
+
+    $this->clickLink('test name');
+
+    // Entity shown.
+    $this->assertText(t('test name'));
+    $this->assertText(t('test first name'));
+    $this->assertText(t('male'));
+    $this->assertLink(t('Add Contact'));
+    $this->assertLink(t('Edit'));
+    $this->assertLink(t('Delete'));
+
+    // Delete the entity.
+    $this->clickLink('Delete');
+
+    // Confirm deletion.
+    $this->assertLink(t('Cancel'));
+    $this->drupalPostForm(NULL, array(), 'Delete');
+
+    // Back to list, must be empty.
+    $this->assertNoText('test name');
+
+    // Settings page.
+    $this->drupalGet('admin/structure/content_entity_example_contact_settings');
+    $this->assertText(t('Contact Settings'));
+
+  }
+}
