diff --git a/licensing.module b/licensing.module
index baca07c..bf9ee97 100644
--- a/licensing.module
+++ b/licensing.module
@@ -4,7 +4,11 @@
  * @file
  * Contains license.module..
  */
-
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Session\AccountInterface;
+use Drupal\licensing\Entity\LicenseInterface;
+use Drupal\licensing\Entity\LicenseType;
+use Drupal\licensing\Entity\License;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Access\AccessResult;
 
@@ -69,7 +73,7 @@ function licensing_theme_suggestions_license(array $variables) {
 /**
  * Implements hook_entity_access().
  */
-function licensing_entity_access(\Drupal\Core\Entity\EntityInterface $entity, $operation, \Drupal\Core\Session\AccountInterface $account) {
+function licensing_entity_access(EntityInterface $entity, $operation, AccountInterface $account) {
     $access = AccessResult::neutral();
 
     if ($account->hasPermission('administer license entities')) {
@@ -115,7 +119,7 @@ function licensing_entity_access(\Drupal\Core\Entity\EntityInterface $entity, $o
  *
  * @return bool|\Drupal\licensing\Entity\License
  */
-function licensing_load_active_user_license_for_entity(\Drupal\Core\Session\AccountInterface $account, \Drupal\Core\Entity\EntityInterface $entity, $properties = []) {
+function licensing_load_active_user_license_for_entity(AccountInterface $account, EntityInterface $entity, $properties = []) {
     $default_properties['status'] = LICENSE_ACTIVE;
     $properties = array_merge($default_properties, $properties);
     $licenses = licensing_load_user_licenses_for_entity($account, $entity, $properties);
@@ -134,7 +138,7 @@ function licensing_load_active_user_license_for_entity(\Drupal\Core\Session\Acco
  *
  * @return \Drupal\licensing\Entity\License[]
  */
-function licensing_load_user_licenses_for_entity(\Drupal\Core\Session\AccountInterface $account, \Drupal\Core\Entity\EntityInterface $entity, $properties = []) {
+function licensing_load_user_licenses_for_entity(AccountInterface $account, EntityInterface $entity, $properties = []) {
     $default_properties = [
       'user_id' => $account->id(),
       'licensed_entity' => $entity->id(),
@@ -161,7 +165,7 @@ function licensing_load_user_licenses_for_entity(\Drupal\Core\Session\AccountInt
  *
  * @return bool
  */
-function licensing_license_applies_to_user(\Drupal\licensing\Entity\LicenseInterface $license, \Drupal\Core\Session\AccountInterface $account) {
+function licensing_license_applies_to_user(LicenseInterface $license, AccountInterface $account) {
     $bundle = $license->bundle();
     $license_type = \Drupal::entityTypeManager()->getStorage('license_type')->load($bundle);
 
@@ -174,7 +178,7 @@ function licensing_license_applies_to_user(\Drupal\licensing\Entity\LicenseInter
  *
  * @return bool
  */
-function licensing_license_type_applies_to_user(\Drupal\licensing\Entity\LicenseType $license_type, \Drupal\Core\Session\AccountInterface $account) {
+function licensing_license_type_applies_to_user(LicenseType $license_type, AccountInterface $account) {
   // Licensing does no apply to administrators.
   if ($account->hasPermission('administer license entities')) {
     return FALSE;
@@ -221,9 +225,9 @@ function licensing_cron() {
   $query = \Drupal::entityQuery('license');
   $query->condition('status', LICENSE_EXPIRED, '!=')
     ->condition('expires_automatically', '1')
-    ->condition('expiry', REQUEST_TIME, '<=');
+    ->condition('expiry', \Drupal::time()->getRequestTime(), '<=');
   if ($ids = $query->execute()) {
-    $licenses = \Drupal\licensing\Entity\License::loadMultiple($ids);
+    $licenses = License::loadMultiple($ids);
 
     // @todo Queue this!
     /** @var \Drupal\Core\Entity\EntityInterface $license */
