diff --git a/dev/demo/all.js b/dev/demo/all.js
index 5ce1266..29dd405 100644
--- a/dev/demo/all.js
+++ b/dev/demo/all.js
@@ -271,8 +271,7 @@
   ]
 };
 
-
-KorAP.hintArray = {
+var hintArray = {
   "-" : [
     ["Connexor",   "cnx/",     "Constituency, Lemma, Morphology, Part-of-Speech, Syntax"],
     ["CoreNLP",    "corenlp/", "Named Entities"],
@@ -417,44 +416,48 @@
   ]
 };
 
-// Parse and show the table
-// Override getMatchInfo API call
-KorAP.API.getMatchInfo = function(match, callObj, cb) {
-  if (callObj["spans"] !== undefined && callObj["spans"] === true) {
-    cb({ "snippet": treeSnippet2 });
+
+requirejs.config({
+  baseUrl: '../js/src',
+  paths : {
+    'lib': '../lib'
   }
-  else {
-    cb({ "snippet": snippet });
-  }
-};
+});
 
+require(['init'], function (init) {
 
-/**
- * Do some things at the beginning.
- */
-document.addEventListener('DOMContentLoaded', function () {
+  KorAP.hintArray = hintArray;
 
-  // Decorate actions
-  var init = KorAP.init();
+  // Parse and show the table
+  // Override getMatchInfo API call
+  KorAP.API.getMatchInfo = function(match, callObj, cb) {
+    if (callObj["spans"] !== undefined && callObj["spans"] === true) {
+      cb({ "snippet": treeSnippet2 });
+    }
+    else {
+      cb({ "snippet": snippet });
+    }
+  };
+
+  /**
+   * Do some things at the beginning.
+   */
 
   // document.getElementById('vc-choose').click();
-
   // init.tutorial.show();
 
-/*
+  /*
+    KorAP.HintMenu.hide = function () {};
+    init.hint.show();
 
-  KorAP.HintMenu.hide = function () {};
-  init.hint.show();
-
-
-  var menu = KorAP.MatchTreeMenu.create(
-    undefined,
-    menuContent
-  );
-  menu.hide = function () {};
-  document.getElementById('menu').appendChild(menu.element());
-  menu.limit(3);
-  menu.show();
-  menu.focus();
-*/
+    var menu = KorAP.MatchTreeMenu.create(
+      undefined,
+      menuContent
+    );
+    menu.hide = function () {};
+    document.getElementById('menu').appendChild(menu.element());
+    menu.limit(3);
+    menu.show();
+    menu.focus();
+  */
 });
