diff --git a/src/background.js b/src/background.js
index 6728e07..688aaa1 100644
--- a/src/background.js
+++ b/src/background.js
@@ -1,45 +1,9 @@
-function isEmpty(obj) {
-  return Object.keys(obj).length === 0;
-}
-
-const defaultOptions = {
-  'list': true,
-  'thread': true,
-  'threadall': false,
-  'fixedtoolbar': false,
-  'redirect': false,
-  'history': false,
-  'loaddrafts': false,
-  'batchduplicate': false,
-  'escalatethreads': false,
-  'movethreads': false,
-  'increasecontrast': false,
-  'stickysidebarheaders': false,
-  'profileindicator': false,
-};
-
-function cleanUpOptions() {
-  chrome.storage.sync.get(null, function(options) {
-    console.log('[cleanUpOptions] Previous options', options);
-    var ok = true;
-    for (const [opt, value] of Object.entries(defaultOptions)) {
-      if (!(opt in options)) {
-        ok = false;
-        options[opt] = value;
-      }
-    }
-
-    console.log('[cleanUpOptions] New options', options);
-
-    if (!ok) {
-      chrome.storage.sync.set(options);
-    }
-  });
-}
-
+// When the extension gets updated, set new options to their default value.
 chrome.runtime.onInstalled.addListener(function(details) {
   if (details.reason == 'install' || details.reason == 'update') {
-    cleanUpOptions();
+    chrome.storage.sync.get(null, function(options) {
+      cleanUpOptions(options);
+    });
   }
 });
 
diff --git a/src/common/common.js b/src/common/common.js
new file mode 100644
index 0000000..28c233a
--- /dev/null
+++ b/src/common/common.js
@@ -0,0 +1,44 @@
+const defaultOptions = {
+  'list': true,
+  'thread': true,
+  'threadall': false,
+  'fixedtoolbar': false,
+  'redirect': false,
+  'history': false,
+  'loaddrafts': false,
+  'batchduplicate': false,
+  'escalatethreads': false,
+  'movethreads': false,
+  'increasecontrast': false,
+  'stickysidebarheaders': false,
+  'profileindicator': false,
+};
+
+const deprecatedOptions = [
+  'escalatethreads',
+  'movethreads',
+  'batchduplicate',
+];
+
+function isEmpty(obj) {
+  return Object.keys(obj).length === 0;
+}
+
+function cleanUpOptions(options) {
+  console.log('[cleanUpOptions] Previous options', options);
+  var ok = true;
+  for (const [opt, value] of Object.entries(defaultOptions)) {
+    if (!(opt in options)) {
+      ok = false;
+      options[opt] = value;
+    }
+  }
+
+  console.log('[cleanUpOptions] New options', options);
+
+  if (!ok) {
+    chrome.storage.sync.set(options);
+  }
+
+  return options;
+}
diff --git a/src/common/content_scripts_injections.js b/src/common/content_scripts_injections.js
new file mode 100644
index 0000000..2067075
--- /dev/null
+++ b/src/common/content_scripts_injections.js
@@ -0,0 +1,16 @@
+function injectStylesheet(stylesheetName) {
+  var link = document.createElement('link');
+  link.setAttribute('rel', 'stylesheet');
+  link.setAttribute('href', stylesheetName);
+  document.head.appendChild(link);
+}
+
+function injectStyles(css) {
+  injectStylesheet('data:text/css;charset=UTF-8,' + encodeURIComponent(css));
+}
+
+function injectScript(scriptName) {
+  var script = document.createElement('script');
+  script.src = scriptName;
+  document.head.appendChild(script);
+}
diff --git a/src/content_scripts/console_inject.js b/src/content_scripts/console_inject.js
index 8d481e9..eda9960 100644
--- a/src/content_scripts/console_inject.js
+++ b/src/content_scripts/console_inject.js
@@ -62,23 +62,6 @@
   });
 };
 
-function injectStylesheet(stylesheetName) {
-  var link = document.createElement('link');
-  link.setAttribute('rel', 'stylesheet');
-  link.setAttribute('href', stylesheetName);
-  document.head.appendChild(link);
-}
-
-function injectStyles(css) {
-  injectStylesheet('data:text/css;charset=UTF-8,' + encodeURIComponent(css));
-}
-
-function injectScript(scriptName) {
-  var script = document.createElement('script');
-  script.src = scriptName;
-  document.head.appendChild(script);
-}
-
 var observerOptions = {
   childList: true,
   attributes: true,
diff --git a/src/content_scripts/thread_inject.js b/src/content_scripts/thread_inject.js
index 2e2554a..89ef2f6 100644
--- a/src/content_scripts/thread_inject.js
+++ b/src/content_scripts/thread_inject.js
@@ -1,22 +1,5 @@
 var intersectionObserver;
 
-function injectStylesheet(stylesheetName) {
-  var link = document.createElement('link');
-  link.setAttribute('rel', 'stylesheet');
-  link.setAttribute('href', stylesheetName);
-  document.head.appendChild(link);
-}
-
-function injectStyles(css) {
-  injectStylesheet('data:text/css;charset=UTF-8,' + encodeURIComponent(css));
-}
-
-function injectScript(scriptName) {
-  var script = document.createElement('script');
-  script.src = scriptName;
-  document.head.appendChild(script);
-}
-
 function intersectionCallback(entries, observer) {
   entries.forEach(entry => {
     if (entry.isIntersecting) {
diff --git a/src/options.html b/src/options.html
index 6dc2d46..cd325a0 100644
--- a/src/options.html
+++ b/src/options.html
@@ -23,6 +23,7 @@
     </p>
     <p class="actions"><button id="save" data-i18n="save"></button></p>
     <div id="save-indicator"></div>
+    <script src="common/common.js"></script>
     <script src="options.js"></script>
   </body>
 </html>
diff --git a/src/options.js b/src/options.js
index af9dede..64d1bad 100644
--- a/src/options.js
+++ b/src/options.js
@@ -1,47 +1,5 @@
-function isEmpty(obj) {
-  return Object.keys(obj).length === 0;
-}
-
-const defaultOptions = {
-  'list': true,
-  'thread': true,
-  'threadall': false,
-  'fixedtoolbar': false,
-  'redirect': false,
-  'history': false,
-  'loaddrafts': false,
-  'batchduplicate': false,
-  'escalatethreads': false,
-  'movethreads': false,
-  'increasecontrast': false,
-  'stickysidebarheaders': false,
-  'profileindicator': false,
-};
-
-const deprecatedOptions = [
-  'escalatethreads',
-  'movethreads',
-  'batchduplicate',
-];
-
 var savedSuccessfullyTimeout = null;
 
-function cleanUpOptions(options) {
-  var ok = true;
-  for (const [opt, value] of Object.entries(defaultOptions)) {
-    if (!opt in options) {
-      ok = false;
-      options[opt] = value;
-    }
-  }
-
-  if (!ok) {
-    chrome.storage.sync.set(options);
-  }
-
-  return options;
-}
-
 function save() {
   var options = defaultOptions;
 
diff --git a/templates/manifest.gjson b/templates/manifest.gjson
index 06a9965..e1f6cdb 100644
--- a/templates/manifest.gjson
+++ b/templates/manifest.gjson
@@ -13,7 +13,7 @@
   "content_scripts": [
     {
       "matches": ["https://support.google.com/s/community*"],
-      "js": ["content_scripts/console_inject.js"]
+      "js": ["common/content_scripts_injections.js", "content_scripts/console_inject.js"]
     },
     {
       "matches": ["https://support.google.com/s/community*"],
@@ -26,7 +26,7 @@
     },
     {
       "matches": ["https://support.google.com/*/thread/*"],
-      "js": ["content_scripts/thread_inject.js"],
+      "js": ["common/content_scripts_injections.js", "content_scripts/thread_inject.js"],
       "run_at": "document_end"
     },
     {
@@ -62,7 +62,10 @@
 #if defined(CHROMIUM)
     "persistent": false,
 #endif
-    "scripts": ["background.js"]
+    "scripts": [
+      "common/common.js",
+      "background.js"
+    ]
   },
 #if defined(GECKO)
   "browser_specific_settings": {
