diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 33440a37db370471ebe1d5fe859a20f60ecb3909..94ed30e18bb622f589038d10ee257d4c1c4325dc 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -13,7 +13,6 @@ filter:
         - 'core/js/jquery-tipsy.js'
         - 'core/js/jquery-ui-1.10.0.custom.js'
         - 'core/js/placeholders.js'
-        - 'core/js/underscore.js'
         - 'core/js/jquery.multiselect.js'
         - 'core/js/snap.js'
 
diff --git a/bower.json b/bower.json
index 7f31f762752a450d03c96e2d59a221142b25948c..986b88eed470b6c7bb4a5c453205ea595eec0a85 100644
--- a/bower.json
+++ b/bower.json
@@ -15,6 +15,7 @@
   "dependencies": {
     "handlebars": "1.3.0",
     "jquery": "~1.10.0",
-    "moment": "~2.8.3"
+    "moment": "~2.8.3",
+    "underscore": "1.6.0"
   }
 }
diff --git a/core/js/core.json b/core/js/core.json
index 137e0217a6f32c8143cf7cc5d9c782724b473f7b..ea79724dcc6bd364f98f8174b15a1d03ab1524d8 100644
--- a/core/js/core.json
+++ b/core/js/core.json
@@ -2,13 +2,13 @@
 	"vendor": [
 		"jquery/jquery.min.js",
 		"jquery/jquery-migrate.min.js",
+		"underscore/underscore.js",
 		"moment/min/moment-with-locales.js"
 	],
 	"libraries": [
 		"jquery-ui-1.10.0.custom.js",
 		"jquery-showpassword.js",
-		"jquery-tipsy.js",
-		"underscore.js"
+		"jquery-tipsy.js"
 	],
 	"modules": [
 		"compatibility.js",
diff --git a/core/vendor/.gitignore b/core/vendor/.gitignore
index ca64a8539ee991864ea94bd875e1024ce1fadca0..0c14c5a59b7370f848cdc444060132ca30b4c0e5 100644
--- a/core/vendor/.gitignore
+++ b/core/vendor/.gitignore
@@ -1,6 +1,11 @@
 test/
 src/
 
+# underscore
+underscore/**
+!underscore/underscore.js
+!underscore/LICENSE
+
 # momentjs - ignore all files except the two listed below
 moment/benchmarks
 moment/locale
diff --git a/core/vendor/underscore/LICENSE b/core/vendor/underscore/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0d6b8739d957184c5675300d30d899bffdbe6050
--- /dev/null
+++ b/core/vendor/underscore/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative
+Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/core/js/underscore.js b/core/vendor/underscore/underscore.js
similarity index 99%
rename from core/js/underscore.js
rename to core/vendor/underscore/underscore.js
index ca61fdc3a4bab9ae3cc46d53802772dc4621ea37..9a4cabecf7f8a686b1d4ec6b3b1ade467dbe1f3b 100644
--- a/core/js/underscore.js
+++ b/core/vendor/underscore/underscore.js
@@ -462,11 +462,10 @@
 
   // Split an array into two arrays: one whose elements all satisfy the given
   // predicate, and one whose elements all do not satisfy the predicate.
-  _.partition = function(array, predicate, context) {
-    predicate = lookupIterator(predicate);
+  _.partition = function(array, predicate) {
     var pass = [], fail = [];
     each(array, function(elem) {
-      (predicate.call(context, elem) ? pass : fail).push(elem);
+      (predicate(elem) ? pass : fail).push(elem);
     });
     return [pass, fail];
   };
diff --git a/lib/base.php b/lib/base.php
index 2b4ba7bcb4afa39a1a23348b4b6067975fd1b75e..0943286de939c7651b5c3856867bd73d95c149e0 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -334,7 +334,7 @@ class OC {
 		OC_Util::addScript("placeholders");
 		OC_Util::addScript("jquery-tipsy");
 		OC_Util::addScript("compatibility");
-		OC_Util::addScript("underscore");
+		OC_Util::addVendorScript("underscore/underscore");
 		OC_Util::addScript("jquery.ocdialog");
 		OC_Util::addScript("oc-dialogs");
 		OC_Util::addScript("js");