diff --git a/src/app/extender/services/onboard.service.spec.ts b/src/app/extender/services/onboard.service.spec.ts
index 17a7543..d53f3af 100644
--- a/src/app/extender/services/onboard.service.spec.ts
+++ b/src/app/extender/services/onboard.service.spec.ts
@@ -34,11 +34,7 @@
 
 const MockModelStore = {
   query: () => {
-    return {
-      subscribe: () => {
-        return;
-      }
-    };
+    return subject.asObservable();
   }
 };
 
@@ -69,17 +65,12 @@
 
   describe('when receive an event', () => {
     it('should use $ocLazyLoad to add modules to the app', () => {
-      subject.next({
-        model: 'XOSComponent',
-        msg: {
-          app: 'sample',
-          object: {
-            extra: '["vendor.js", "app.js"]',
-            name: 'sample app'
-          }
+      subject.next([
+        {
+          files: 'vendor.js,app.js',
+          name: 'sample app'
         }
-      });
-      $timeout.flush();
+      ]);
       expect($ocLazyLoad.load).toHaveBeenCalledWith('vendor.js');
       expect($ocLazyLoad.load).toHaveBeenCalledWith('app.js');
     });
diff --git a/src/app/extender/services/onboard.service.ts b/src/app/extender/services/onboard.service.ts
index 2f85028..b6a9abc 100644
--- a/src/app/extender/services/onboard.service.ts
+++ b/src/app/extender/services/onboard.service.ts
@@ -1,4 +1,4 @@
-import {IWSEventService, IWSEvent} from '../../datasources/websocket/global';
+import {IWSEventService} from '../../datasources/websocket/global';
 import {IXosModelStoreService} from '../../datasources/stores/model.store';
 import * as _ from 'lodash';
 import {Observable} from 'rxjs';
@@ -20,56 +20,19 @@
   ) {
     this.$log.info('[XosOnboarder] Setup');
 
-    // Listen for new app (we need a pause to allow the container to boot)
-    this.webSocket.list()
-      .filter((e: IWSEvent) => {
-        if (e.model === 'XOSComponent' && e.msg.object.extra) {
-          e.msg.object.extra = JSON.parse(e.msg.object.extra);
-          return true;
-        }
-        return false;
-      })
-      .subscribe(
-        (event) => {
-          this.$timeout(() => {
-            this.$log.info(`[XosOnboarder] Loading files for app: ${event.msg.object.name}`);
-            // NOTE we need the timeout because the event is triggered when the model is created,
-            // XOS take around 15s to boot it
-            this.loadFile(event.msg.object.extra)
-              .then((res) => {
-                this.$log.info(`[XosOnboarder] All files loaded for app: ${event.msg.object.name}`);
-              });
-          }, 20 * 1000);
-        }
-      );
+    // Load onboarded app
+    const ComponentObservable: Observable<any> = this.XosModelStore.query('XOSGuiExtension');
 
-    // Load previously onboarded app (containers are already running, so we don't need to wait)
-    let componentsLoaded = false;
-    const ComponentObservable: Observable<any> = this.XosModelStore.query('XOSComponent');
     ComponentObservable.subscribe(
         (component) => {
-          if (componentsLoaded) {
-            // if we have already loaded the component present when we loaded the page
-            // do nothing, we are intercepting WS to give the container time to boot
-            return;
-          }
-
           _.forEach(component, (c) => {
-            if (c.extra) {
-              this.$log.info(`[XosOnboarder] Loading files for app: ${c.name}`);
-              let extra;
-              try {
-                extra = JSON.parse(c.extra);
-              } catch (e) {
-                extra = c.extra;
-              }
-              this.loadFile(extra)
-                .then((res) => {
-                  this.$log.info(`[XosOnboarder] All files loaded for app: ${c.name}`);
-                });
-            }
+            this.$log.info(`[XosOnboarder] Loading files for app: ${c.name}`);
+            const files = c.files.split(',').map(s => s.trim());
+            this.loadFile(files)
+              .then((res) => {
+                this.$log.info(`[XosOnboarder] All files loaded for app: ${c.name}`);
+              });
           });
-          componentsLoaded = true;
         }
       );
   }
diff --git a/src/extensions/.gitignore b/src/extensions/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/src/extensions/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
