diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
index 954d7a9..500db13 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
@@ -393,10 +393,7 @@
             }
 
             final RepositoryAdmin admin = getRepositoryAdmin();
-            final List repos = new ArrayList();
-            repos.add(admin.getSystemRepository());
-            repos.addAll(Arrays.asList(admin.listRepositories()));
-            Resolver resolver = admin.resolver((Repository[]) repos.toArray(new Repository[repos.size()]));
+            Resolver resolver = admin.resolver();
             resolver.add(resource);
             resolver.resolve(Resolver.NO_OPTIONAL_RESOURCES);
             Resource[] required = resolver.getRequiredResources();
diff --git a/webconsole/src/main/resources/res/ui/jquery.uuid.js b/webconsole/src/main/resources/res/ui/jquery.uuid.js
deleted file mode 100644
index f22bf2d..0000000
--- a/webconsole/src/main/resources/res/ui/jquery.uuid.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-Usage 1: define the default prefix by using an object with the property prefix as a parameter which contains a string value; {prefix: 'id'}
-Usage 2: call the function jQuery.uuid() with a string parameter p to be used as a prefix to generate a random uuid;
-Usage 3: call the function jQuery.uuid() with no parameters to generate a uuid with the default prefix; defaul prefix: '' (empty string)
-*/
-
-/*
-Generate fragment of random numbers
-*/
-jQuery._uuid_default_prefix = '';
-jQuery._uuidlet = function () {
-	return(((1+Math.random())*0x10000)|0).toString(16).substring(1);
-};
-/*
-Generates random uuid
-*/
-jQuery.uuid = function (p) {
-	if (typeof(p) == 'object' && typeof(p.prefix) == 'string') {
-		jQuery._uuid_default_prefix = p.prefix;
-	} else {
-		p = p || jQuery._uuid_default_prefix || '';
-		return(p+jQuery._uuidlet()+jQuery._uuidlet()+"-"+jQuery._uuidlet()+"-"+jQuery._uuidlet()+"-"+jQuery._uuidlet()+"-"+jQuery._uuidlet()+jQuery._uuidlet()+jQuery._uuidlet());
-	};
-};
\ No newline at end of file
diff --git a/webconsole/src/main/resources/res/ui/obr.js b/webconsole/src/main/resources/res/ui/obr.js
index 3b2c9fc..2d5bc0a 100644
--- a/webconsole/src/main/resources/res/ui/obr.js
+++ b/webconsole/src/main/resources/res/ui/obr.js
@@ -45,6 +45,12 @@
   };
 }
 
+var uid = 0;
+function guid() {
+   uid = uid + 1;
+   return (0x10000 + uid).toString(16).substring(1) + (((1+Math.random())*0x10000)|0).toString(16).substring(1);
+}
+
 /* displays a date in the user's local timezone */
 function localTm(time) {
 	return (time ? new Date(time) : new Date()).toLocaleString();
@@ -164,7 +170,7 @@
 
 function createDetailedTable(enclosing, name, headers, rows, callback) {
     if (rows && rows.length > 0) {
-        var uuid = jQuery.uuid();
+        var uuid = guid();
         var title = createElement('span', null, null, [
                                 createElement('span', 'ui-icon ui-icon-triangle-1-e', { id: "img"+uuid, style: {display: "inline-block"} }),
                                 text(" "),
@@ -301,11 +307,11 @@
             createElement('form', 'button-group', { method: "post"}, [
                 createElement('input', null, { type: "hidden", name: "bundle", value: res.id}),
                 createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploy", value: "Deploy" }, [ text("dummy")]),
-                createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploystart", value: "Start" }, [ text("dummy")]),
+                createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploystart", value: "Deploy and Start" }, [ text("dummy")]),
                 text(" "),
                 createElement('input', 'ui-state-default ui-corner-all', { id: "optional", type: "checkbox", name: "optional" }),
                 text(" "),
-                createElement('label', 'ui-widget', { 'for': "optional" }, [ text("optional") ])
+                createElement('label', 'ui-widget', { 'for': "optional" }, [ text("deploy optional dependencies") ])
             ])
         ])
     ]));
@@ -368,7 +374,7 @@
                             return [ text(p.filter), text(""), text(p.optional) ];
                         });
     // Imported services
-    createDetailedTable(tbody, "Imported bundles", ["Service", "Optional"], getRequirementsByName(res, "service"), function(p) {
+    createDetailedTable(tbody, "Imported services", ["Service", "Optional"], getRequirementsByName(res, "service"), function(p) {
                             return [ text(p.filter), text(p.optional) ];
                         });
     // Required dependencies
diff --git a/webconsole/src/main/resources/templates/obr.html b/webconsole/src/main/resources/templates/obr.html
index 9797d5c..6f1ae5a 100644
--- a/webconsole/src/main/resources/templates/obr.html
+++ b/webconsole/src/main/resources/templates/obr.html
@@ -1,4 +1,3 @@
-<script type="text/javascript" src="res/ui/jquery.uuid.js"></script>
 <script type="text/javascript" src="res/ui/obr.js"></script>
 <script type="text/javascript">
 var i18n = {
@@ -48,33 +47,33 @@
 <div class="ui-widget-header ui-corner-top buttonGroup">
     <span style="float: left; margin-left: 1em">${obr.res.title}</span>
     <span>
-        <a href="obr?list=a">A</a>
-        <a href="obr?list=b">B</a>
-        <a href="obr?list=c">C</a>
-        <a href="obr?list=d">D</a>
-        <a href="obr?list=e">E</a>
-        <a href="obr?list=f">F</a>
-        <a href="obr?list=g">G</a>
-        <a href="obr?list=h">H</a>
-        <a href="obr?list=i">I</a>
-        <a href="obr?list=j">J</a>
-        <a href="obr?list=k">K</a>
-        <a href="obr?list=l">L</a>
-        <a href="obr?list=m">M</a>
-        <a href="obr?list=n">N</a>
-        <a href="obr?list=o">O</a>
-        <a href="obr?list=p">P</a>
-        <a href="obr?list=q">Q</a>
-        <a href="obr?list=r">R</a>
-        <a href="obr?list=s">S</a>
-        <a href="obr?list=t">T</a>
-        <a href="obr?list=u">U</a>
-        <a href="obr?list=v">V</a>
-        <a href="obr?list=w">W</a>
-        <a href="obr?list=x">X</a>
-        <a href="obr?list=y">Y</a>
-        <a href="obr?list=z">Z</a>
-        <a href="obr?list=-">?</a>
+        <a href="${pluginRoot}?list=a">A</a>
+        <a href="${pluginRoot}?list=b">B</a>
+        <a href="${pluginRoot}?list=c">C</a>
+        <a href="${pluginRoot}?list=d">D</a>
+        <a href="${pluginRoot}?list=e">E</a>
+        <a href="${pluginRoot}?list=f">F</a>
+        <a href="${pluginRoot}?list=g">G</a>
+        <a href="${pluginRoot}?list=h">H</a>
+        <a href="${pluginRoot}?list=i">I</a>
+        <a href="${pluginRoot}?list=j">J</a>
+        <a href="${pluginRoot}?list=k">K</a>
+        <a href="${pluginRoot}?list=l">L</a>
+        <a href="${pluginRoot}?list=m">M</a>
+        <a href="${pluginRoot}?list=n">N</a>
+        <a href="${pluginRoot}?list=o">O</a>
+        <a href="${pluginRoot}?list=p">P</a>
+        <a href="${pluginRoot}?list=q">Q</a>
+        <a href="${pluginRoot}?list=r">R</a>
+        <a href="${pluginRoot}?list=s">S</a>
+        <a href="${pluginRoot}?list=t">T</a>
+        <a href="${pluginRoot}?list=u">U</a>
+        <a href="${pluginRoot}?list=v">V</a>
+        <a href="${pluginRoot}?list=w">W</a>
+        <a href="${pluginRoot}?list=x">X</a>
+        <a href="${pluginRoot}?list=y">Y</a>
+        <a href="${pluginRoot}?list=z">Z</a>
+        <a href="${pluginRoot}?list=-">?</a>
     </span>
     <input type="text" id="searchField"/>
     <button id="searchBtn">${obr.action.search}</button>
