diff --git a/gulpfile.js b/gulpfile.js
index b0a61542ed19a092f6fb5f8bfc4c38055f33811e..73976d74a609842284a884c6505b7d8204988b45 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -478,19 +478,15 @@ function webUglify() {
       // Process JS
       .pipe(jsFilter)
       .pipe(uglify(uglifyOptions)) // Minify javascript files
+      .pipe(rename({ extname: '.min.js' }))
       .pipe(jsFilter.restore)
 
       // Process CSS
       .pipe(cssFilter)
       .pipe(csso())               // Minify any CSS sources
+      .pipe(rename({ extname: '.min.css' }))
       .pipe(cssFilter.restore)
 
-      // Add revision to filename  (but not index.html and config.js)
-      .pipe(revFilesFilter)
-      .pipe(rev())                // Rename the concatenated files
-      .pipe(revFilesFilter.restore)
-
-      .pipe(revReplace())         // Substitute in new filenames
       .pipe(gulp.dest(wwwPath));
   }
 }
@@ -564,20 +560,15 @@ function webApiUglify() {
       // Process JS
       .pipe(jsFilter)
       .pipe(uglify(uglifyOptions)) // Minify any javascript sources
+      .pipe(rename({ extname: '.min.js' }))
       .pipe(jsFilter.restore)
 
       // Process CSS
       .pipe(cssFilter)
       .pipe(csso())               // Minify any CSS sources
+      .pipe(rename({ extname: '.min.css' }))
       .pipe(cssFilter.restore)
 
-      // Add revision to filename  (but not index.html and config.js)
-      .pipe(revFilesFilter)
-      .pipe(rev())                // Rename the concatenated files
-      .pipe(revFilesFilter.restore)
-
-      .pipe(revReplace())         // Substitute in new filenames
-
       .pipe(indexFilter)
       .pipe(replace("dist_js", "../dist_js"))
       .pipe(replace("dist_css", "../dist_css"))
@@ -591,14 +582,8 @@ function webApiUglify() {
     log(colors.red('API: Uglify JS and CSS files. Skip') + colors.grey(' (missing options --release or --uglify)'));
 
     return gulp.src(tmpPath + '/*/index.html')
-      //.pipe(refHash())            // Generate hashed filenames for the build blocks
       .pipe(useref())             // Concatenate with gulp-useref
 
-      // Process CSS
-      .pipe(cssFilter)
-      .pipe(csso())               // Minify any CSS sources
-      .pipe(cssFilter.restore)
-
       .pipe(indexFilter)
       .pipe(replace("dist_js", "../dist_js"))
       .pipe(replace("dist_css", "../dist_css"))
@@ -691,25 +676,31 @@ function webExtensionCopyFiles() {
   const manifestFilter = filter(["**/manifest.json"], { restore: true });
   const txtFilter = filter(["**/*.txt"], { restore: true });
 
-  // Copy files
-  return gulp.src([
-    wwwPath + '/**/*',
+  return es.merge(
+    // Copy files
+    gulp.src([
+      wwwPath + '/**/*',
 
-    // Skip API and debug.html
-    '!' + wwwPath + '/api',
-    wwwPath + '/api/*',
-    '!' + wwwPath + '/api/debug.html',
-    '!' + wwwPath + '/debug.html',
+      // Skip min files
+      '!' + wwwPath + '/dist_js/*.min.js',
+      '!' + wwwPath + '/dist_css/*.min.css',
 
-    // Remove unused files (feed.json) in extension
-    '!' + wwwPath + '/feed*.json',
+      // Skip API and html
+      '!' + wwwPath + '/api',
+      '!' + wwwPath + '/dist_js/*-api.js',
+      '!' + wwwPath + '/dist_css/*-api.css',
+      '!' + wwwPath + '/index.html',
+      '!' + wwwPath + '/debug.html',
 
-    // Skip web manifest
-    '!' + wwwPath + '/manifest.json',
+      // Remove unused files (feed.json) in extension
+      '!' + wwwPath + '/feed*.json',
 
-    // Add specific resource (and overwrite the default 'manifest.json')
-    resourcesPath + '/**/*.*'
-   ])
+      // Skip web manifest
+      '!' + wwwPath + '/manifest.json',
+
+      // Add specific resource (and overwrite the default 'manifest.json')
+      resourcesPath + '/**/*.*'
+    ])
 
     // Process TXT files: Add the UTF-8 BOM character
     .pipe(txtFilter)
@@ -721,7 +712,13 @@ function webExtensionCopyFiles() {
     .pipe(replace(/\"version\": \"[^\"]*\"/, '"version": "' + version + '"'))
     .pipe(manifestFilter.restore)
 
-    .pipe(gulp.dest('./dist/web/ext'));
+    .pipe(gulp.dest('./dist/web/ext')),
+
+    // Use debug as main index
+    gulp.src(wwwPath + '/debug.html')
+      .pipe(rename("index.html"))
+      .pipe(gulp.dest('./dist/web/ext'))
+  );
 }
 
 function webExtensionZip() {
diff --git a/yarn.lock b/yarn.lock
index a58e75a59d05be2f5f1d5dab7a6e57657308e85f..331e7aa6bdcc789ba9ac61c07b15e36b7bb9f328 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2363,19 +2363,6 @@ degenerator@^1.0.4:
     escodegen "1.x.x"
     esprima "3.x.x"
 
-del@^2.1.0:
-  version "2.2.2"
-  resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
-  integrity sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=
-  dependencies:
-    globby "^5.0.0"
-    is-path-cwd "^1.0.0"
-    is-path-in-cwd "^1.0.0"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-    rimraf "^2.2.8"
-
 del@^3.0.0:
   version "3.0.0"
   resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5"
@@ -3664,18 +3651,6 @@ global-prefix@^1.0.1:
     is-windows "^1.0.1"
     which "^1.2.14"
 
-globby@^5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
-  integrity sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=
-  dependencies:
-    array-union "^1.0.1"
-    arrify "^1.0.0"
-    glob "^7.0.3"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-
 globby@^6.1.0:
   version "6.1.0"
   resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
@@ -3934,18 +3909,6 @@ gulp-debug@^4.0.0:
     through2 "^2.0.0"
     tildify "^1.1.2"
 
-gulp-dest-clean@^0.5.0:
-  version "0.5.0"
-  resolved "https://registry.yarnpkg.com/gulp-dest-clean/-/gulp-dest-clean-0.5.0.tgz#92a156f74952f1ccc4c0f1d440a192a5ad5f413c"
-  integrity sha1-kqFW90lS8czEwPHUQKGSpa1fQTw=
-  dependencies:
-    chalk "^1.1.1"
-    del "^2.1.0"
-    gulp-util "^3.0.7"
-    lie "^3.0.1"
-    object-assign "^4.0.1"
-    through2 "^2.0.0"
-
 gulp-filter@^4.0.0:
   version "4.0.0"
   resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-4.0.0.tgz#395f58a256c559cdb9e0d157f1caaf5248a38dcb"
@@ -4111,15 +4074,6 @@ gulp-ng-constant@^1.1.0:
     through2 "^2.0.0"
     vinyl "^2.1.0"
 
-gulp-ref-hash@^0.0.2:
-  version "0.0.2"
-  resolved "https://registry.yarnpkg.com/gulp-ref-hash/-/gulp-ref-hash-0.0.2.tgz#7099efea0847532d36124de25f0280990b5c4744"
-  integrity sha1-cJnv6ghHUy02Ek3iXwKAmQtcR0Q=
-  dependencies:
-    gulp-util "^2.2.17"
-    through2 "^0.5.1"
-    underscore "^1.6.0"
-
 gulp-remove-code@^1.0.2:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/gulp-remove-code/-/gulp-remove-code-1.0.2.tgz#a05df4d87af6bc0821aa5fa6e24ceb4fd59d0256"
@@ -4253,7 +4207,7 @@ gulp-util@3.0.3:
     through2 "^0.6.3"
     vinyl "^0.4.3"
 
-gulp-util@^2.2.14, gulp-util@^2.2.17, gulp-util@~2.2.14:
+gulp-util@^2.2.14, gulp-util@~2.2.14:
   version "2.2.20"
   resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-2.2.20.tgz#d7146e5728910bd8f047a6b0b1e549bc22dbd64c"
   integrity sha1-1xRuVyiRC9jwR6awseVJvCLb1kw=
@@ -4651,11 +4605,6 @@ ignore@^4.0.3:
   resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
   integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
 
-immediate@~3.0.5:
-  version "3.0.6"
-  resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
-  integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
-
 import-fresh@^3.0.0:
   version "3.2.1"
   resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
@@ -5514,13 +5463,6 @@ levn@~0.3.0:
     prelude-ls "~1.1.2"
     type-check "~0.3.2"
 
-lie@^3.0.1:
-  version "3.3.0"
-  resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a"
-  integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==
-  dependencies:
-    immediate "~3.0.5"
-
 liftoff@^2.1.0:
   version "2.5.0"
   resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec"
@@ -8962,7 +8904,7 @@ through2@=0.4.2, through2@^0.4.2, through2@~0.4.0, through2@~0.4.1:
     readable-stream "~1.0.17"
     xtend "~2.1.1"
 
-through2@^0.5.0, through2@^0.5.1:
+through2@^0.5.0:
   version "0.5.1"
   resolved "https://registry.yarnpkg.com/through2/-/through2-0.5.1.tgz#dfdd012eb9c700e2323fd334f38ac622ab372da7"
   integrity sha1-390BLrnHAOIyP9M084rGIqs3Lac=
@@ -9260,11 +9202,6 @@ underscore@1.2.1:
   resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.2.1.tgz#fc5c6b0765673d92a2d4ac8b4dc0aa88702e2bd4"
   integrity sha1-/FxrB2VnPZKi1KyLTcCqiHAuK9Q=
 
-underscore@^1.6.0:
-  version "1.9.2"
-  resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.2.tgz#0c8d6f536d6f378a5af264a72f7bec50feb7cf2f"
-  integrity sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==
-
 underscore@^1.8.3, underscore@^1.9.1:
   version "1.9.1"
   resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961"