diff --git a/campaign_kit.module b/campaign_kit.module
index 8fa0125..da79cc0 100644
--- a/campaign_kit.module
+++ b/campaign_kit.module
@@ -147,7 +147,7 @@ function campaign_kit_theme() {
  * @param $theme_registry
  */
 function campaign_kit_theme_registry_alter(&$theme_registry) {
-  $theme_registry['campaign_badge__campaign_badge']['path'] = drupal_get_path('module', 'campaign_kit') . '/templates';
+  $theme_registry['campaign_badge__campaign_badge']['path'] = \Drupal::service('extension.list.module')->getPath('campaign_kit') . '/templates';
 }
 
 /**
@@ -1018,7 +1018,7 @@ function campaign_kit_preprocess_html(&$variables) {
       $campaignEntity = Campaign::load($campaignId);
       $campaignTitle = $campaignEntity->getTitle();
       $campaignDescription = strip_tags($campaignEntity->get('description')->value);
-      $campaignImage = file_create_url($campaignEntity->get('header_image')->entity->uri->value);
+      $campaignImage = \Drupal::service('file_url_generator')->generateAbsoluteString($campaignEntity->get('header_image')->entity->uri->value);
     }
     else {
       $campaignTitle = '';
diff --git a/modules/campaign_kit_demo/campaign_kit_demo.install b/modules/campaign_kit_demo/campaign_kit_demo.install
index 365c1c0..0eb5ca4 100644
--- a/modules/campaign_kit_demo/campaign_kit_demo.install
+++ b/modules/campaign_kit_demo/campaign_kit_demo.install
@@ -88,42 +88,30 @@ function campaign_kit_demo_install() {
   Drupal::service('file_system')->prepareDirectory($destination, FileSystemInterface::CREATE_DIRECTORY);
 
   // Validating image for Standalone Campaign.
-  $imgSourceStandalone = sprintf('%s/images/standalone-image-demo.jpg', drupal_get_path('module', 'campaign_kit_demo'));
+  $imgSourceStandalone = sprintf('%s/images/standalone-image-demo.jpg', \Drupal::service('extension.list.module')->getPath('campaign_kit_demo'));
   $imgStandalone = NULL;
   if (is_readable($imgSourceStandalone)) {
     $dataStandalone = file_get_contents($imgSourceStandalone);
 
-    $imgStandalone = file_save_data(
-      $dataStandalone,
-      $destination . '/standalone-image-demo.jpg',
-      FileSystemInterface::EXISTS_REPLACE
-    );
+    $imgStandalone = \Drupal::service('file.repository')->writeData($dataStandalone, $destination . '/standalone-image-demo.jpg', FileSystemInterface::EXISTS_REPLACE);
   }
 
   // Validating image for Parent Campaign.
-  $imgSourceParent = sprintf('%s/images/parent-image-demo.jpg', drupal_get_path('module', 'campaign_kit_demo'));
+  $imgSourceParent = sprintf('%s/images/parent-image-demo.jpg', \Drupal::service('extension.list.module')->getPath('campaign_kit_demo'));
   $imgParent = NULL;
   if (is_readable($imgSourceParent)) {
     $dataParent = file_get_contents($imgSourceParent);
 
-    $imgParent = file_save_data(
-      $dataParent,
-      $destination . '/parent-image-demo.jpg',
-      FileSystemInterface::EXISTS_REPLACE
-    );
+    $imgParent = \Drupal::service('file.repository')->writeData($dataParent, $destination . '/parent-image-demo.jpg', FileSystemInterface::EXISTS_REPLACE);
   }
 
   // Validating image for Child Campaign.
-  $imgSourceChild = sprintf('%s/images/child-image-demo.jpg', drupal_get_path('module', 'campaign_kit_demo'));
+  $imgSourceChild = sprintf('%s/images/child-image-demo.jpg', \Drupal::service('extension.list.module')->getPath('campaign_kit_demo'));
   $imgChild = NULL;
   if (is_readable($imgSourceChild)) {
     $dataChild = file_get_contents($imgSourceChild);
 
-    $imgChild = file_save_data(
-      $dataChild,
-      $destination . '/child-image-demo.jpg',
-      FileSystemInterface::EXISTS_REPLACE
-    );
+    $imgChild = \Drupal::service('file.repository')->writeData($dataChild, $destination . '/child-image-demo.jpg', FileSystemInterface::EXISTS_REPLACE);
   }
   /** @var \Drupal\Core\Datetime\DrupalDateTime $datetimeStart */
   $datetimeStart = new DrupalDateTime();
diff --git a/src/Event/PostDonation.php b/src/Event/PostDonation.php
index ff3439b..a1d446d 100644
--- a/src/Event/PostDonation.php
+++ b/src/Event/PostDonation.php
@@ -7,7 +7,7 @@ use Symfony\Component\EventDispatcher\Event;
 /**
  * Class PostDonation.
  */
-class PostDonation extends Event {
+class PostDonation extends \Symfony\Contracts\EventDispatcher\Event {
 
   /**
    * Post Donation API event Array.
diff --git a/src/Form/DonateForm.php b/src/Form/DonateForm.php
index 1611359..441a1c6 100644
--- a/src/Form/DonateForm.php
+++ b/src/Form/DonateForm.php
@@ -774,7 +774,7 @@ class DonateForm extends FormBase {
         $event = $this->getDetailEvent($campaignDonationValues, $charge, $newsletter, 'Campaign');
         // Fires Post Donation.
         $postDonation = new PostDonation($event);
-        $this->eventDispatcher->dispatch(DonationEvents::POST_DONATION, $postDonation);
+        $this->eventDispatcher->dispatch($postDonation, DonationEvents::POST_DONATION);
 
         // Redirect user.
         $form_state->setRedirect('campaign_kit_core.campaign_thank_you', [
@@ -861,7 +861,7 @@ class DonateForm extends FormBase {
         // Fires Post Donation.
         $event = $this->getDetailEvent($donationValues, $charge, $newsletter, 'Single');
         $postDonation = new PostDonation($event);
-        $this->eventDispatcher->dispatch(DonationEvents::POST_DONATION, $postDonation);
+        $this->eventDispatcher->dispatch($postDonation, DonationEvents::POST_DONATION);
 
         // Redirect to thank you page.
         // Attach donation ID and node ID.
diff --git a/src/Plugin/Block/BadgeComponent/BadgeComponentEventSubscriber.php b/src/Plugin/Block/BadgeComponent/BadgeComponentEventSubscriber.php
index c18bf6d..e13c2d9 100644
--- a/src/Plugin/Block/BadgeComponent/BadgeComponentEventSubscriber.php
+++ b/src/Plugin/Block/BadgeComponent/BadgeComponentEventSubscriber.php
@@ -45,7 +45,7 @@ class BadgeComponentEventSubscriber implements EventSubscriberInterface {
    *   The event.
    */
   public function themeEvent(ThemeEvent $event) {
-    $modulePath = drupal_get_path('module', 'campaign_kit');
+    $modulePath = \Drupal::service('extension.list.module')->getPath('campaign_kit');
 
     $newThemes = [
       'BadgeComponent' => [
diff --git a/src/Plugin/Block/CampaignComponent/CampaignComponentEventSubscriber.php b/src/Plugin/Block/CampaignComponent/CampaignComponentEventSubscriber.php
index 57aa6a8..d64d3b2 100644
--- a/src/Plugin/Block/CampaignComponent/CampaignComponentEventSubscriber.php
+++ b/src/Plugin/Block/CampaignComponent/CampaignComponentEventSubscriber.php
@@ -45,7 +45,7 @@ class CampaignComponentEventSubscriber implements EventSubscriberInterface {
    *   The event.
    */
   public function themeEvent(ThemeEvent $event) {
-    $modulePath = drupal_get_path('module', 'campaign_kit');
+    $modulePath = \Drupal::service('extension.list.module')->getPath('campaign_kit');
 
     $newThemes = [
       'CampaignComponent' => [
diff --git a/src/Plugin/Block/Donate/DonateEventSubscriber.php b/src/Plugin/Block/Donate/DonateEventSubscriber.php
index d66be6f..a16e26d 100644
--- a/src/Plugin/Block/Donate/DonateEventSubscriber.php
+++ b/src/Plugin/Block/Donate/DonateEventSubscriber.php
@@ -45,7 +45,7 @@ class DonateEventSubscriber implements EventSubscriberInterface {
    *   The event.
    */
   public function themeEvent(ThemeEvent $event) {
-    $modulePath = drupal_get_path('module', 'campaign_kit');
+    $modulePath = \Drupal::service('extension.list.module')->getPath('campaign_kit');
 
     $newThemes = [
       'Donate' => [
diff --git a/src/Plugin/Block/DonateThankYou/DonateThankYouEventSubscriber.php b/src/Plugin/Block/DonateThankYou/DonateThankYouEventSubscriber.php
index 39a771d..54bb234 100644
--- a/src/Plugin/Block/DonateThankYou/DonateThankYouEventSubscriber.php
+++ b/src/Plugin/Block/DonateThankYou/DonateThankYouEventSubscriber.php
@@ -45,7 +45,7 @@ class DonateThankYouEventSubscriber implements EventSubscriberInterface {
    *   The event.
    */
   public function themeEvent(ThemeEvent $event) {
-    $modulePath = drupal_get_path('module', 'campaign_kit');
+    $modulePath = \Drupal::service('extension.list.module')->getPath('campaign_kit');
 
     $newThemes = [
       'DonateThankYou' => [
diff --git a/src/Plugin/Block/ThankYou/ThankYouEventSubscriber.php b/src/Plugin/Block/ThankYou/ThankYouEventSubscriber.php
index 804d11d..bed438f 100644
--- a/src/Plugin/Block/ThankYou/ThankYouEventSubscriber.php
+++ b/src/Plugin/Block/ThankYou/ThankYouEventSubscriber.php
@@ -45,7 +45,7 @@ class ThankYouEventSubscriber implements EventSubscriberInterface {
    *   The event.
    */
   public function themeEvent(ThemeEvent $event) {
-    $modulePath = drupal_get_path('module', 'campaign_kit');
+    $modulePath = \Drupal::service('extension.list.module')->getPath('campaign_kit');
 
     $newThemes = [
       'thankYou' => [
