Updated to work on drupal 8 beta.