diff --git a/src/Controller/AJAXLinkController.php b/src/Controller/AJAXLinkController.php
index 3d4dd77..0a79537 100644
--- a/src/Controller/AJAXLinkController.php
+++ b/src/Controller/AJAXLinkController.php
@@ -34,11 +34,9 @@ class AJAXLinkController extends ControllerBase {
    * @see \Drupal\flag\Plugin\ActionLink\AJAXactionLink
    */
   public function flag(FlagInterface $flag, $entity_id) {
-    $flag_id = $flag->id();
-
-    $flagging = \Drupal::service('flag')->flag($flag_id, $entity_id);
-
-    $entity = $flagging->getFlaggable();
+    $flag_service = \Drupal::service('flag');
+    $entity = $flag_service->getFlaggableById($flag, $entity_id);
+    $flag_service->flag($flag, $entity);
 
     return $this->generateResponse('unflag', $flag, $entity);
   }
@@ -51,21 +49,18 @@ class AJAXLinkController extends ControllerBase {
    *
    * @param \Drupal\flag\FlagInterface $flag
    *   The flag entity.
-   * @param int $entity_id
-   *   The entity ID to unflag.
+   * @param \Drupal\Core\Entity\EntityInterface $entity
+   *   The entity to unflag.
    *
    * @return AjaxResponse
    *   The response object.
    *
    * @see \Drupal\flag\Plugin\ActionLink\AJAXactionLink
    */
-  public function unflag(FlagInterface $flag, $entity_id) {
-    $flag_id = $flag->id();
+  public function unflag(FlagInterface $flag, $entity) {
 
     $flag_service = \Drupal::service('flag');
-    $flag_service->unflag($flag_id, $entity_id);
-
-    $entity = $flag_service->getFlaggableById($flag, $entity_id);
+    $flag_service->unflag($flag, $entity);
 
     return $this->generateResponse('flag', $flag, $entity);
   }
diff --git a/src/Controller/ReloadLinkController.php b/src/Controller/ReloadLinkController.php
index 2d41e42..3088ac7 100644
--- a/src/Controller/ReloadLinkController.php
+++ b/src/Controller/ReloadLinkController.php
@@ -64,10 +64,11 @@ class ReloadLinkController extends ControllerBase implements ContainerInjectionI
    * @see \Drupal\flag\Plugin\Reload
    */
   public function flag(FlagInterface $flag, $entity_id) {
-    $flag_id = $flag->id();
+    /* @var \Drupal\Core\Entity\EntityInterface $entity */
+    $entity = $this->flagService->getFlaggableById($flag, $entity_id);
 
     /* @var \Drupal\flag\FlaggingInterface $flagging */
-    $flagging = $this->flagService->flag($flag_id, $entity_id);
+    $flagging = $this->flagService->flag($flag, $entity);
 
     // Redirect back to the entity. A passed in destination query parameter
     // will automatically override this.
@@ -89,12 +90,9 @@ class ReloadLinkController extends ControllerBase implements ContainerInjectionI
    * @see \Drupal\flag\Plugin\Reload
    */
   public function unflag(FlagInterface $flag, $entity_id) {
-    $flag_id = $flag->id();
-
-    $this->flagService->unflag($flag_id, $entity_id);
-
-    $flag = $this->flagService->getFlagById($flag_id);
+    /* @var \Drupal\Core\Entity\EntityInterface $entity */
     $entity = $this->flagService->getFlaggableById($flag, $entity_id);
+    $this->flagService->unflag($flag, $entity);
 
     // Redirect back to the entity. A passed in destination query parameter
     // will automatically override this.
diff --git a/src/FlagService.php b/src/FlagService.php
index afae11e..65771eb 100644
--- a/src/FlagService.php
+++ b/src/FlagService.php
@@ -263,7 +263,7 @@ class FlagService {
    * @return FlaggingInterface|null
    *   The flagging.
    */
-  public function flagByObject(FlagInterface $flag, EntityInterface $entity, AccountInterface $account = NULL) {
+  public function flag(FlagInterface $flag, EntityInterface $entity, AccountInterface $account = NULL) {
     if (empty($account)) {
       $account = $this->currentUser;
     }
@@ -292,59 +292,6 @@ class FlagService {
   }
 
   /**
-   * Flags an entity given the flag ID and entity ID.
-   *
-   * @param int $flag_id
-   *   The ID of the flag.
-   * @param int $entity_id
-   *   The ID of the entity to flag.
-   * @param AccountInterface $account
-   *   (optional) The account of user flagging the entity. If not given, the
-   *   current user is used.
-   *
-   * @return FlaggingInterface|null
-   *   The flagging entity.
-   *
-   * @api
-   */
-  public function flag($flag_id, $entity_id, AccountInterface $account = NULL) {
-    if (empty($account)) {
-      $account = $this->currentUser;
-    }
-
-    $flag = $this->getFlagById($flag_id);
-    $entity = $this->getFlaggableById($flag, $entity_id);
-
-    return $this->flagByObject($flag, $entity, $account);
-  }
-
-  /**
-   * Unflags an entity given the flag ID and entity ID.
-   *
-   * @param int $flag_id
-   *   The ID of the flag.
-   * @param int $entity_id
-   *   The ID of the flagged entity to unflag.
-   * @param AccountInterface $account
-   *   (optional) The account of the user that created the flagging.
-   *
-   * @return array
-   *   An array of flagging IDs to delete.
-   *
-   * @api
-   */
-  public function unflag($flag_id, $entity_id, AccountInterface $account = NULL) {
-    if (empty($account)) {
-      $account = $this->currentUser;
-    }
-
-    $flag = $this->getFlagById($flag_id);
-    $entity = $this->getFlaggableById($flag, $entity_id);
-
-    return $this->unflagByObject($flag, $entity, $account);
-  }
-
-  /**
    * Unflags the given entity for the given flag.
    *
    * @param FlagInterface $flag
@@ -357,7 +304,7 @@ class FlagService {
    * @return array
    *   An array of flagging IDs to delete.
    */
-  public function unflagByObject(FlagInterface $flag, EntityInterface $entity, AccountInterface $account = NULL) {
+  public function unflag(FlagInterface $flag, EntityInterface $entity, AccountInterface $account = NULL) {
     $this->eventDispatcher->dispatch(FlagEvents::ENTITY_UNFLAGGED, new FlaggingEvent($flag, $entity, 'unflag'));
 
     $out = [];
diff --git a/src/Form/FlaggingConfirmForm.php b/src/Form/FlaggingConfirmForm.php
index 2ce079c..db67b27 100644
--- a/src/Form/FlaggingConfirmForm.php
+++ b/src/Form/FlaggingConfirmForm.php
@@ -113,10 +113,10 @@ class FlaggingConfirmForm extends ConfirmFormBase {
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     if ($this->isFlagged()) {
-      \Drupal::service('flag')->unflagByObject($this->flag, $this->entity);
+      \Drupal::service('flag')->unflag($this->flag, $this->entity);
     }
     else {
-      \Drupal::service('flag')->flagByObject($this->flag, $this->entity);
+      \Drupal::service('flag')->flag($this->flag, $this->entity);
     }
   }
 
