diff --git a/README.txt b/README.txt
index 11741b8..ecb6caa 100755
--- a/README.txt
+++ b/README.txt
@@ -33,23 +33,19 @@ Using the MathJax CDN (recommended)
    administration screen.
 
 
-Using a local copy of MathJax (relies on libraries module)
-----------------------------------------------------------
+Using a local copy of MathJax
+-----------------------------
 
 1. Install and enable this module.
 
-2. Install and enable "libraries". See http://drupal.org/project/libraries.
-
-3. Install the third-party MathJax software:
+2. Install the third-party MathJax software:
      Download MathJax source from the MathJax website.
      Un-archive it into your "libraries" directory.
      You may need to create the "libraries" directory first.
-     Rename it to "MathJax".
-Relying on the libraries module to locate the 'mathjax' directory allows you to place
-it in a site-specific diretory (e.g. sites/mysite/libraries) or in the default directory
-(libraries). Site-specific versions are selected preferentially.
+     Rename it to "MathJax". When finished you should have this structure:
+     `/libraries/MathJax/MathJax.js`
 
-4. Follow from step #2 above.
+3. Follow from step #2 above.
 
 ORIGINAL AUTHOR
 ===============
diff --git a/mathjax.module b/mathjax.module
index 4c425e1..d66e7a8 100644
--- a/mathjax.module
+++ b/mathjax.module
@@ -53,9 +53,9 @@ function mathjax_library_info_build() {
       'gpl-compatible' => TRUE,
     ],
   ];
-  if ($config->get('use_cdn') == FALSE && function_exists('libraries_get_path')) {
+  if ($config->get('use_cdn') == FALSE) {
     $libraries['source']['js'] = [
-      libraries_get_path('MathJax', TRUE) . '/MathJax.js?config=TeX-AMS-MML_HTMLorMML' => [
+      \Drupal::request()->getBaseUrl() . '/libraries/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' => [
         'type' => 'external',
         'minified' => TRUE,
       ],
diff --git a/src/Form/MathjaxSettingsForm.php b/src/Form/MathjaxSettingsForm.php
index d22babe..bb6ca5a 100644
--- a/src/Form/MathjaxSettingsForm.php
+++ b/src/Form/MathjaxSettingsForm.php
@@ -130,7 +130,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
         ->set('config_type', $form_state->getValue('config_type'))
         ->set('config_string', $form_state->getValue('config_string'))
         ->save();
-
+    drupal_flush_all_caches();
     parent::submitForm($form, $form_state);
   }
 
