diff --git a/webconsole/DISCLAIMER b/webconsole/DISCLAIMER
deleted file mode 100644
index 90850c2..0000000
--- a/webconsole/DISCLAIMER
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Sling is an effort undergoing incubation at The Apache Software Foundation (ASF),
-sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly accepted
-projects until a further review indicates that the infrastructure, communications,
-and decision making process have stabilized in a manner consistent with other
-successful ASF projects. While incubation status is not necessarily a reflection of
-the completeness or stability of the code, it does indicate that the project has yet
-to be fully endorsed by the ASF.
\ No newline at end of file
diff --git a/webconsole/NOTICE b/webconsole/NOTICE
index 3b33958..d456f0d 100644
--- a/webconsole/NOTICE
+++ b/webconsole/NOTICE
@@ -1,4 +1,4 @@
-Apache Sling OSGi Web Console
+Apache Felix OSGi Web Console
 Copyright 2007-2008 The Apache Software Foundation
 
 Based on source code originally developed by
diff --git a/webconsole/pom.xml b/webconsole/pom.xml
index 96341b1..1ddeb72 100644
--- a/webconsole/pom.xml
+++ b/webconsole/pom.xml
@@ -17,33 +17,35 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.apache.sling</groupId>
-        <artifactId>sling</artifactId>
-        <version>1-incubator-SNAPSHOT</version>
-        <relativePath>../../parent/pom.xml</relativePath>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>felix</artifactId>
+        <version>1.0.2</version>
+        <relativePath>../pom/pom.xml</relativePath>
     </parent>
 
-    <artifactId>org.apache.sling.osgi.console.web</artifactId>
+    <artifactId>org.apache.felix.webconsole</artifactId>
     <packaging>bundle</packaging>
-    <version>2.0.0-incubator-SNAPSHOT</version>
+    <version>1.0.0-SNAPSHOT</version>
 
-    <name>Sling - Sling Management Console</name>
-    <description>Sling Management Console Servlet</description>
+    <name>Apache Felix Web Management Console</name>
+    <description>
+        Web Based Management Console for OSGi Frameworks
+    </description>
 
     <scm>
         <connection>
-            scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/osgi/console-web
+            scm:svn:http://svn.apache.org/repos/asf/felix/trunk/webconsole
         </connection>
         <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/osgi/console-web
+            scm:svn:https://svn.apache.org/repos/asf/felix/trunk/webconsole
         </developerConnection>
-        <url>
-            http://svn.apache.org/viewvc/incubator/sling/trunk/osgi/console-web
-        </url>
+        <url>http://svn.apache.org/viewvc/felix/trunk/webconsole</url>
     </scm>
 
     <build>
@@ -59,14 +61,14 @@
                 <configuration>
                     <instructions>
                         <Bundle-Activator>
-                            org.apache.sling.osgi.console.web.internal.SlingManagerActivator
+                            org.apache.sling.felix.webconsole.internal.OsgiManagerActivator
                         </Bundle-Activator>
                         <Export-Package>
-                            org.apache.sling.osgi.console.web,
+                            org.apache.sling.felix.webconsole,
                         </Export-Package>
                         <Private-Package>
-                            !org.apache.sling.osgi.console.web,
-                            org.apache.sling.osgi.console.web.*,
+                            !org.apache.sling.felix.webconsole,
+                            org.apache.sling.felix.webconsole.*,
 
                             <!-- File Upload functionality -->
                             org.apache.commons.fileupload,
@@ -79,13 +81,13 @@
                             org.apache.commons.io.output,
 
                             <!-- Required for JSON data transfer -->
-                            org.apache.sling.commons.json,
+                            org.json,
 
                             <!-- Import/Export-Package parsing -->
                             org.apache.felix.bundlerepository
                         </Private-Package>
                         <Import-Package>
-                            org.apache.sling.*; org.apache.felix.*;
+                            org.apache.felix.*;
                             org.osgi.service.obr;resolution:=optional,*
                         </Import-Package>
                     </instructions>
@@ -98,40 +100,55 @@
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>servlet-api</artifactId>
+            <version>2.4</version>
+            <scope>provided</scope>
         </dependency>
 
         <!-- This adds commons-io transitively -->
         <dependency>
             <groupId>commons-fileupload</groupId>
             <artifactId>commons-fileupload</artifactId>
+            <version>1.1.1</version>
             <scope>compile</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.osgi.core</artifactId>
+            <version>1.0.1</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.osgi.compendium</artifactId>
+            <version>1.0.1</version>
+            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>javax.servlet</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.json</artifactId>
-            <version>2.0.0-incubator-SNAPSHOT</version>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20070829</version>
             <scope>compile</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr</artifactId>
+            <version>1.0.0</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.bundlerepository</artifactId>
+            <version>1.0.3</version>
             <scope>compile</scope>
         </dependency>
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/Action.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/Action.java
similarity index 97%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/Action.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/Action.java
index 80ef110..480ebff 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/Action.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/Action.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web;
+package org.apache.sling.felix.webconsole;
 
 import java.io.IOException;
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/ConfigurationPrinter.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/ConfigurationPrinter.java
similarity index 95%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/ConfigurationPrinter.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/ConfigurationPrinter.java
index b28af2e..55025aa 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/ConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/ConfigurationPrinter.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web;
+package org.apache.sling.felix.webconsole;
 
 import java.io.PrintWriter;
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/Render.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/Render.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/Render.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/Render.java
index 6fd4c65..3f7d64c 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/Render.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/Render.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web;
+package org.apache.sling.felix.webconsole;
 
 import java.io.IOException;
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/BaseManagementPlugin.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/BaseManagementPlugin.java
similarity index 94%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/BaseManagementPlugin.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/BaseManagementPlugin.java
index e430145..bf7a197 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/BaseManagementPlugin.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/BaseManagementPlugin.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web.internal;
+package org.apache.sling.felix.webconsole.internal;
 
-import org.apache.sling.osgi.console.web.internal.servlet.Logger;
+import org.apache.sling.felix.webconsole.internal.servlet.Logger;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.service.startlevel.StartLevel;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/SlingManagerActivator.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/OsgiManagerActivator.java
similarity index 86%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/SlingManagerActivator.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/OsgiManagerActivator.java
index d00dad4..ef8c057 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/SlingManagerActivator.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/OsgiManagerActivator.java
@@ -16,13 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web.internal;
+package org.apache.sling.felix.webconsole.internal;
 
-import org.apache.sling.osgi.console.web.internal.servlet.SlingManager;
+import org.apache.sling.felix.webconsole.internal.servlet.SlingManager;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 
-public class SlingManagerActivator implements BundleActivator {
+public class OsgiManagerActivator implements BundleActivator {
 
     private SlingManager slingManager;
     
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/Util.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/Util.java
similarity index 92%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/Util.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/Util.java
index 0ab4a64..dd460c7 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/Util.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/Util.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal;
+package org.apache.sling.felix.webconsole.internal;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -28,7 +28,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.sling.osgi.console.web.Render;
+import org.apache.sling.felix.webconsole.Render;
 
 /**
  * The <code>Util</code> TODO
@@ -116,12 +116,12 @@
         return pw;
     }
 
-    public static void navigation(PrintWriter pw, Collection<Render> renders, String current, boolean disabled) {
+    public static void navigation(PrintWriter pw, Collection renders, String current, boolean disabled) {
         pw.println("<p id='technav'>");
 
-        SortedMap<String, String> map = new TreeMap<String, String>();
-        for (Iterator<Render> ri=renders.iterator(); ri.hasNext(); ) {
-            Render render = ri.next();
+        SortedMap map = new TreeMap();
+        for (Iterator ri=renders.iterator(); ri.hasNext(); ) {
+            Render render = (Render) ri.next();
             if (render.getLabel() == null) {
                 // ignore renders without a label
             } else if (disabled || current.equals(render.getName())) {
@@ -131,7 +131,7 @@
             }
         }
 
-        for (Iterator<String> li=map.values().iterator(); li.hasNext(); ) {
+        for (Iterator li=map.values().iterator(); li.hasNext(); ) {
             pw.println(li.next());
         }
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/AbstractScrPlugin.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/AbstractScrPlugin.java
similarity index 91%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/AbstractScrPlugin.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/AbstractScrPlugin.java
index 97167bb..034f5ed 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/AbstractScrPlugin.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/AbstractScrPlugin.java
@@ -16,10 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web.internal.compendium;
+package org.apache.sling.felix.webconsole.internal.compendium;
 
 import org.apache.felix.scr.ScrService;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
 import org.osgi.util.tracker.ServiceTracker;
 
 public class AbstractScrPlugin extends BaseManagementPlugin {
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/AjaxConfigManagerAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/AjaxConfigManagerAction.java
similarity index 90%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/AjaxConfigManagerAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/AjaxConfigManagerAction.java
index d9018a0..e170133 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/AjaxConfigManagerAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/AjaxConfigManagerAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.compendium;
+package org.apache.sling.felix.webconsole.internal.compendium;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -32,10 +32,10 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.commons.json.JSONArray;
-import org.apache.sling.commons.json.JSONException;
-import org.apache.sling.commons.json.JSONObject;
-import org.apache.sling.osgi.console.web.Action;
+import org.apache.sling.felix.webconsole.Action;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.InvalidSyntaxException;
@@ -47,7 +47,6 @@
 
 /**
  * The <code>AjaxConfigManagerAction</code> TODO
- * 
  */
 public class AjaxConfigManagerAction extends ConfigManagerBase implements
         Action {
@@ -124,7 +123,7 @@
         json.put(ConfigManager.PID, pid);
         json.put("isFactory", isFactory);
 
-        Dictionary<?, ?> props = null;
+        Dictionary props = null;
         ObjectClassDefinition ocd;
         if (config != null) {
             props = config.getProperties();
@@ -137,7 +136,7 @@
 
         if (props != null) {
             JSONObject properties = new JSONObject();
-            for (Enumeration<?> pe = props.keys(); pe.hasMoreElements();) {
+            for (Enumeration pe = props.keys(); pe.hasMoreElements();) {
                 Object key = pe.nextElement();
 
                 // ignore well known special properties
@@ -168,11 +167,11 @@
         }
     }
 
-    private Dictionary<?, ?> mergeWithMetaType(Dictionary<?, ?> props,
+    private Dictionary mergeWithMetaType(Dictionary props,
             ObjectClassDefinition ocd, JSONObject json) throws JSONException {
 
         if (props == null) {
-            props = new Hashtable<String, Object>();
+            props = new Hashtable();
         }
 
         if (ocd != null) {
@@ -224,14 +223,14 @@
                     if (ad[i].getCardinality() == 0) {
                         // scalar
                         if (value instanceof Vector) {
-                            value = ((Vector<?>) value).get(0);
+                            value = ((Vector) value).get(0);
                         } else if (value.getClass().isArray()) {
                             value = Array.get(value, 0);
                         }
                         entry.put("value", value);
                     } else {
                         if (value instanceof Vector) {
-                            value = new JSONArray((Vector<?>) value);
+                            value = new JSONArray((Vector) value);
                         } else if (value.getClass().isArray()) {
                             value = new JSONArray(
                                 Arrays.asList((Object[]) value));
@@ -274,16 +273,15 @@
         } else {
             Bundle bundle = this.getBundle(config.getBundleLocation());
 
-            @SuppressWarnings("unchecked")
-            Dictionary<String, String> headers = bundle.getHeaders(locale);
-            String name = headers.get(Constants.BUNDLE_NAME);
+            Dictionary headers = bundle.getHeaders(locale);
+            String name = (String) headers.get(Constants.BUNDLE_NAME);
             if (name == null) {
                 location = bundle.getSymbolicName();
             } else {
                 location = name + " (" + bundle.getSymbolicName() + ")";
             }
 
-            Version v = Version.parseVersion(headers.get(Constants.BUNDLE_VERSION));
+            Version v = Version.parseVersion((String) headers.get(Constants.BUNDLE_VERSION));
             location += ", Version " + v.toString();
         }
         json.put("bundleLocation", location);
@@ -311,10 +309,9 @@
 
             // add sling context into the configuration
             if (request.getParameter("sling.context") != null) {
-                @SuppressWarnings("unchecked")
-                Dictionary<String, Object> props = config.getProperties();
+                Dictionary props = config.getProperties();
                 if (props == null) {
-                    props = new Hashtable<String, Object>();
+                    props = new Hashtable();
                 }
                 props.put("sling.context",
                     request.getParameter("sling.context"));
@@ -341,20 +338,18 @@
             }
         } else {
             Configuration config = ca.getConfiguration(pid, null);
-            @SuppressWarnings("unchecked")
-            Dictionary<String, Object> props = config.getProperties();
+            Dictionary props = config.getProperties();
             if (props == null) {
-                props = new Hashtable<String, Object>();
+                props = new Hashtable();
             }
 
-            Map<String, AttributeDefinition> adMap = this.getAttributeDefinitionMap(
-                config, null);
+            Map adMap = (Map) this.getAttributeDefinitionMap(config, null);
             if (adMap != null) {
                 StringTokenizer propTokens = new StringTokenizer(propertyList,
                     ",");
                 while (propTokens.hasMoreTokens()) {
                     String propName = propTokens.nextToken();
-                    AttributeDefinition ad = adMap.get(propName);
+                    AttributeDefinition ad = (AttributeDefinition) adMap.get(propName);
                     if (ad == null
                         || (ad.getCardinality() == 0 && ad.getType() == AttributeDefinition.STRING)) {
                         String prop = request.getParameter(propName);
@@ -367,7 +362,7 @@
                         props.put(propName, this.toType(ad.getType(), prop));
                     } else {
                         // array or vector of any type
-                        Vector<Object> vec = new Vector<Object>();
+                        Vector vec = new Vector();
 
                         String[] properties = request.getParameterValues(propName);
                         if (properties != null) {
@@ -426,7 +421,7 @@
         }
     }
 
-    private Object toArray(int type, Vector<Object> values) {
+    private Object toArray(int type, Vector values) {
         int size = values.size();
 
         // short cut for string array
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ComponentConfigurationPrinter.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
similarity index 89%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ComponentConfigurationPrinter.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
index 59ecaa9..4756207 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ComponentConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web.internal.compendium;
+package org.apache.sling.felix.webconsole.internal.compendium;
 
 import java.io.PrintWriter;
 import java.util.Arrays;
@@ -29,7 +29,7 @@
 import org.apache.felix.scr.Component;
 import org.apache.felix.scr.Reference;
 import org.apache.felix.scr.ScrService;
-import org.apache.sling.osgi.console.web.ConfigurationPrinter;
+import org.apache.sling.felix.webconsole.ConfigurationPrinter;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
@@ -41,7 +41,6 @@
 
     private ServiceRegistration registration;
 
-    @Override
     public void setBundleContext(BundleContext bundleContext) {
         super.setBundleContext(bundleContext);
 
@@ -65,13 +64,15 @@
             } else {
 
                 // order components by id
-                TreeMap<Long, Component> componentMap = new TreeMap<Long, Component>();
-                for (Component component : components) {
-                    componentMap.put(component.getId(), component);
+                TreeMap componentMap = new TreeMap();
+                for (int i=0; i < components.length; i++) {
+                    Component component = components[1];
+                    componentMap.put(new Long(component.getId()), component);
                 }
 
                 // render components
-                for (Component component : componentMap.values()) {
+                for (Iterator ci = componentMap.values().iterator(); ci.hasNext();) {
+                    Component component = (Component) ci.next();
                     component(pw, component);
                 }
             }
@@ -173,15 +174,13 @@
     }
 
     private void listProperties(PrintWriter pw, Component component) {
-        @SuppressWarnings("unchecked")
-        Dictionary<String, Object> props = component.getProperties();
+        Dictionary props = component.getProperties();
         if (props != null) {
 
             pw.println("  Properties=");
-            TreeSet<String> keys = new TreeSet<String>(
-                Collections.list(props.keys()));
-            for (Iterator<String> ki = keys.iterator(); ki.hasNext();) {
-                String key = ki.next();
+            TreeSet keys = new TreeSet(Collections.list(props.keys()));
+            for (Iterator ki = keys.iterator(); ki.hasNext();) {
+                String key = (String) ki.next();
                 Object value = props.get(key);
                 if (value.getClass().isArray()) {
                     value = Arrays.asList((Object[]) value);
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ComponentRenderAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ComponentRenderAction.java
similarity index 94%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ComponentRenderAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ComponentRenderAction.java
index 04d1c39..0ee0dbf 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ComponentRenderAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ComponentRenderAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.compendium;
+package org.apache.sling.felix.webconsole.internal.compendium;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -31,12 +31,12 @@
 import org.apache.felix.scr.Component;
 import org.apache.felix.scr.Reference;
 import org.apache.felix.scr.ScrService;
-import org.apache.sling.commons.json.JSONArray;
-import org.apache.sling.commons.json.JSONException;
-import org.apache.sling.commons.json.JSONObject;
-import org.apache.sling.osgi.console.web.Action;
-import org.apache.sling.osgi.console.web.Render;
-import org.apache.sling.osgi.console.web.internal.Util;
+import org.apache.sling.felix.webconsole.Action;
+import org.apache.sling.felix.webconsole.Render;
+import org.apache.sling.felix.webconsole.internal.Util;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.component.ComponentConstants;
@@ -120,14 +120,16 @@
             } else {
 
                 // order components by id
-                TreeMap<String, Component> componentMap = new TreeMap<String, Component>();
-                for (Component component : components) {
+                TreeMap componentMap = new TreeMap();
+                for (int i=0; i < components.length; i++) {
+                    Component component = components[i];
                     componentMap.put(component.getName(), component);
                 }
 
                 // render components
                 long previousComponent = -1;
-                for (Component component : componentMap.values()) {
+                for (Iterator ci = componentMap.values().iterator(); ci.hasNext();) {
+                    Component component = (Component) ci.next();
                     if (previousComponent >= 0) {
                         // prepare for injected table information row
                         pw.println("<tr id='component" + previousComponent
@@ -352,14 +354,12 @@
     }
 
     private void listProperties(JSONArray jsonProps, Component component) {
-        @SuppressWarnings("unchecked")
-        Dictionary<String, Object> props = component.getProperties();
+        Dictionary props = component.getProperties();
         if (props != null) {
             StringBuffer buf = new StringBuffer();
-            TreeSet<String> keys = new TreeSet<String>(
-                Collections.list(props.keys()));
-            for (Iterator<String> ki = keys.iterator(); ki.hasNext();) {
-                String key = ki.next();
+            TreeSet keys = new TreeSet(Collections.list(props.keys()));
+            for (Iterator ki = keys.iterator(); ki.hasNext();) {
+                String key = (String) ki.next();
                 buf.append(key).append(" = ");
 
                 Object prop = props.get(key);
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ConfigManager.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ConfigManager.java
similarity index 80%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ConfigManager.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ConfigManager.java
index a24b31f..f0e76ed 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ConfigManager.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ConfigManager.java
@@ -14,11 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.compendium;
+package org.apache.sling.felix.webconsole.internal.compendium;
 
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.Dictionary;
+import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
 import java.util.SortedMap;
@@ -28,9 +29,9 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.osgi.console.web.Render;
-import org.apache.sling.osgi.console.web.internal.Util;
-import org.apache.sling.osgi.console.web.internal.core.SetStartLevelAction;
+import org.apache.sling.felix.webconsole.Render;
+import org.apache.sling.felix.webconsole.internal.Util;
+import org.apache.sling.felix.webconsole.internal.core.SetStartLevelAction;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
@@ -80,7 +81,8 @@
         pw.println("</table>");
     }
 
-    private void listConfigurations(PrintWriter pw, boolean optionalMetaType, Locale loc) {
+    private void listConfigurations(PrintWriter pw, boolean optionalMetaType,
+            Locale loc) {
 
         ConfigurationAdmin ca = this.getConfigurationAdmin();
         if (ca == null) {
@@ -92,10 +94,10 @@
 
         try {
             // get a list of all pids for which MetaData exists
-            Map<String, Bundle> metaDataPids = this.getMetadataPids();
+            Map metaDataPids = this.getMetadataPids();
 
             // sorted map of options
-            SortedMap<String, String> options = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
+            SortedMap options = new TreeMap(String.CASE_INSENSITIVE_ORDER);
 
             // find all ManagedServiceFactories to get the factoryPIDs
             ServiceReference[] refs = this.getBundleContext().getServiceReferences(
@@ -121,7 +123,7 @@
                     }
 
                     if (ocd != null || optionalMetaType) {
-                        options.put("factoryPid="+pid, name);
+                        options.put("factoryPid=" + pid, name);
                     }
                 }
             }
@@ -130,18 +132,22 @@
             Configuration[] cfgs = ca.listConfigurations(null);
             for (int i = 0; cfgs != null && i < cfgs.length; i++) {
 
-                // ignore configuration object if an entry already exists in the map
+                // ignore configuration object if an entry already exists in the
+                // map
                 String pid = cfgs[i].getPid();
-                if (options.containsKey("pid="+pid) || options.containsKey("factoryPid="+pid)) {
+                if (options.containsKey("pid=" + pid)
+                    || options.containsKey("factoryPid=" + pid)) {
                     continue;
                 }
 
-                Dictionary<?, ?> props = cfgs[i].getProperties();
-                Object slingContext = (props != null) ? props.get("sling.context") : null;
+                Dictionary props = cfgs[i].getProperties();
+                Object slingContext = (props != null)
+                        ? props.get("sling.context")
+                        : null;
 
                 // insert and entry for the pid
-                ObjectClassDefinition ocd = this.getObjectClassDefinition(cfgs[i],
-                    locale);
+                ObjectClassDefinition ocd = this.getObjectClassDefinition(
+                    cfgs[i], locale);
                 String name;
                 if (ocd != null) {
                     name = ocd.getName() + " (";
@@ -160,26 +166,27 @@
                 }
 
                 if (ocd != null || optionalMetaType) {
-                    options.put("pid="+pid, name);
+                    options.put("pid=" + pid, name);
                 }
 
-                // if the configuration is part of a factory, ensure an entry for the factory
+                // if the configuration is part of a factory, ensure an entry
+                // for the factory
                 if (cfgs[i].getFactoryPid() != null) {
                     pid = cfgs[i].getFactoryPid();
-                    if (options.containsValue("factoryPid="+pid)) {
+                    if (options.containsValue("factoryPid=" + pid)) {
                         continue;
                     }
 
-                    String existing = options.remove("pid="+pid);
+                    String existing = (String) options.remove("pid=" + pid);
                     if (existing != null) {
-                        options.put("factoryPid="+pid, existing);
+                        options.put("factoryPid=" + pid, existing);
                     } else {
                         Bundle bundle = this.getBundle(cfgs[i].getBundleLocation());
                         ocd = this.getObjectClassDefinition(bundle, pid, locale);
                         if (ocd != null) {
-                            options.put("factoryPid="+pid, ocd.getName());
+                            options.put("factoryPid=" + pid, ocd.getName());
                         } else if (optionalMetaType) {
-                            options.put("factoryPid="+pid, pid);
+                            options.put("factoryPid=" + pid, pid);
                         }
                     }
                 }
@@ -188,9 +195,10 @@
             // If there are any meta data PIDs for which there is no existing
             // configuration, we add them to the list to create configuration
             if (!metaDataPids.isEmpty()) {
-                for (Entry<String, Bundle> mdp : metaDataPids.entrySet()) {
+                for(Iterator mdpi=metaDataPids.entrySet().iterator(); mdpi.hasNext(); ) {
+                Entry mdp = (Entry) mdpi.next();
                     ObjectClassDefinition ocd = this.getObjectClassDefinition(
-                        mdp.getValue(), mdp.getKey(), locale);
+                        (Bundle) mdp.getValue(), (String) mdp.getKey(), locale);
                     options.put("pid=" + mdp.getKey(), ocd.getName() + " ("
                         + mdp.getKey() + ")");
                 }
@@ -200,7 +208,8 @@
             pw.println("<input type='hidden' name='" + Util.PARAM_ACTION
                 + "' value='" + SetStartLevelAction.NAME + "'>");
             pw.println("<select class='select' name='pid' onChange='configure();'>");
-            for (Entry<String, String> entry : options.entrySet()) {
+            for (Iterator ei = options.entrySet().iterator(); ei.hasNext();) {
+                Entry entry = (Entry) ei.next();
                 pw.print("<option value='" + entry.getKey() + "'>");
                 pw.print(entry.getValue());
                 pw.println("</option>");
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ConfigManagerBase.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ConfigManagerBase.java
similarity index 94%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ConfigManagerBase.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ConfigManagerBase.java
index e55a201..f638683 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/compendium/ConfigManagerBase.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/compendium/ConfigManagerBase.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.compendium;
+package org.apache.sling.felix.webconsole.internal.compendium;
 
 import java.util.HashMap;
 import java.util.Locale;
@@ -22,7 +22,7 @@
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.Configuration;
@@ -69,8 +69,8 @@
         return (MetaTypeService) metaTypeService.getService();
     }
 
-    protected Map<String, Bundle> getMetadataPids() {
-        Map<String, Bundle> pids = new HashMap<String, Bundle>();
+    protected Map getMetadataPids() {
+        Map pids = new HashMap();
         MetaTypeService mts = this.getMetaTypeService();
         if (mts != null) {
             Bundle[] bundles = this.getBundleContext().getBundles();
@@ -165,14 +165,14 @@
         return null;
     }
 
-    protected Map<String, AttributeDefinition> getAttributeDefinitionMap(
+    protected Map getAttributeDefinitionMap(
             Configuration config, String locale) {
         ObjectClassDefinition ocd = this.getObjectClassDefinition(config,
             locale);
         if (ocd != null) {
             AttributeDefinition[] ad = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL);
             if (ad != null) {
-                Map<String, AttributeDefinition> adMap = new HashMap<String, AttributeDefinition>();
+                Map adMap = new HashMap();
                 for (int i = 0; i < ad.length; i++) {
                     adMap.put(ad[i].getID(), ad[i]);
                 }
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/AjaxBundleDetailsAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/AjaxBundleDetailsAction.java
similarity index 87%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/AjaxBundleDetailsAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/AjaxBundleDetailsAction.java
index e5cc104..e680106 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/AjaxBundleDetailsAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/AjaxBundleDetailsAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -23,6 +23,7 @@
 import java.util.Date;
 import java.util.Dictionary;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
@@ -35,9 +36,9 @@
 import org.apache.felix.bundlerepository.R4Export;
 import org.apache.felix.bundlerepository.R4Import;
 import org.apache.felix.bundlerepository.R4Package;
-import org.apache.sling.commons.json.JSONArray;
-import org.apache.sling.commons.json.JSONException;
-import org.apache.sling.commons.json.JSONObject;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -64,7 +65,6 @@
     // see #activate and #isBootDelegated
     private boolean[] bootPkgWildcards;
 
-    @Override
     public void setBundleContext(BundleContext bundleContext) {
         super.setBundleContext(bundleContext);
 
@@ -106,8 +106,7 @@
             long bundleId = getBundleId(request);
             Bundle bundle = getBundleContext().getBundle(bundleId);
             if (bundle != null) {
-                @SuppressWarnings("unchecked")
-                Dictionary<String, String> headers = bundle.getHeaders();
+                Dictionary headers = bundle.getHeaders();
 
                 JSONArray props = new JSONArray();
                 keyVal(props, "Symbolic Name", bundle.getSymbolicName());
@@ -150,7 +149,7 @@
 
     private Integer getStartLevel(Bundle bundle) {
         StartLevel sl = getStartLevel();
-        return (sl != null) ? sl.getBundleStartLevel(bundle) : null;
+        return (sl != null) ? new Integer(sl.getBundleStartLevel(bundle)) : null;
     }
 
     private void listImportExport(JSONArray props, Bundle bundle) {
@@ -159,23 +158,29 @@
             return;
         }
 
-        Map<String, Bundle> usingBundles = new TreeMap<String, Bundle>();
-        
+        Map usingBundles = new TreeMap();
+
         ExportedPackage[] exports = packageAdmin.getExportedPackages(bundle);
         if (exports != null && exports.length > 0) {
             // do alphabetical sort
-            Arrays.sort(exports, new Comparator<ExportedPackage>() {
+            Arrays.sort(exports, new Comparator() {
                 public int compare(ExportedPackage p1, ExportedPackage p2) {
                     return p1.getName().compareTo(p2.getName());
                 }
+
+                public int compare(Object o1, Object o2) {
+                    return compare((ExportedPackage) o1, (ExportedPackage) o2);
+                }
             });
 
             StringBuffer val = new StringBuffer();
-            for (ExportedPackage export : exports) {
+            for (int j=0; j < exports.length; j++) {
+                ExportedPackage export = exports[j];
                 printExport(val, export.getName(), export.getVersion());
                 Bundle[] ubList = export.getImportingBundles();
                 if (ubList != null) {
-                    for (Bundle ub : ubList) {
+                    for (int i=0; i < ubList.length; i++) {
+                        Bundle ub = ubList[i];
                         usingBundles.put(ub.getSymbolicName(), ub);
                     }
                 }
@@ -188,7 +193,7 @@
         exports = packageAdmin.getExportedPackages((Bundle) null);
         if (exports != null && exports.length > 0) {
             // collect import packages first
-            final List<ExportedPackage> imports = new ArrayList<ExportedPackage>();
+            final List imports = new ArrayList();
             for (int i = 0; i < exports.length; i++) {
                 final ExportedPackage ep = exports[i];
                 final Bundle[] importers = ep.getImportingBundles();
@@ -203,14 +208,20 @@
             // now sort
             StringBuffer val = new StringBuffer();
             if (imports.size() > 0) {
-                final ExportedPackage[] packages = imports.toArray(new ExportedPackage[imports.size()]);
-                Arrays.sort(packages, new Comparator<ExportedPackage>() {
+                final ExportedPackage[] packages = (ExportedPackage[]) imports.toArray(new ExportedPackage[imports.size()]);
+                Arrays.sort(packages, new Comparator() {
                     public int compare(ExportedPackage p1, ExportedPackage p2) {
                         return p1.getName().compareTo(p2.getName());
                     }
+
+                    public int compare(Object o1, Object o2) {
+                        return compare((ExportedPackage) o1,
+                            (ExportedPackage) o2);
+                    }
                 });
                 // and finally print out
-                for (ExportedPackage ep : packages) {
+                for (int i=0; i < packages.length; i++) {
+                    ExportedPackage ep = packages[i];
                     printImport(val, ep.getName(), ep.getVersion(), ep);
                 }
             } else {
@@ -220,10 +231,11 @@
 
             keyVal(props, "Imported Packages", val.toString());
         }
-        
+
         if (!usingBundles.isEmpty()) {
             StringBuffer val = new StringBuffer();
-            for (Bundle usingBundle : usingBundles.values()) {
+            for (Iterator ui = usingBundles.values().iterator(); ui.hasNext();) {
+                Bundle usingBundle = (Bundle) ui.next();
                 val.append(getBundleDescriptor(usingBundle));
                 val.append("<br />");
             }
@@ -232,23 +244,26 @@
     }
 
     private void listImportExportsUnresolved(JSONArray props, Bundle bundle) {
-        Dictionary<?, ?> dict = bundle.getHeaders();
+        Dictionary dict = bundle.getHeaders();
 
         String target = (String) dict.get(Constants.EXPORT_PACKAGE);
         if (target != null) {
             R4Package[] pkgs = R4Package.parseImportOrExportHeader(target);
             if (pkgs != null && pkgs.length > 0) {
                 // do alphabetical sort
-                Arrays.sort(pkgs, new Comparator<R4Package>() {
+                Arrays.sort(pkgs, new Comparator() {
                     public int compare(R4Package p1, R4Package p2) {
                         return p1.getName().compareTo(p2.getName());
                     }
+
+                    public int compare(Object o1, Object o2) {
+                        return compare((R4Package) o1, (R4Package) o2);
+                    }
                 });
 
                 StringBuffer val = new StringBuffer();
-                for (R4Package pkg : pkgs) {
-                    R4Export export = new R4Export(pkg);
-
+                for (int i=0; i < pkgs.length; i++) {
+                    R4Export export = new R4Export(pkgs[i]);
                     printExport(val, export.getName(), export.getVersion());
                 }
                 keyVal(props, "Exported Packages", val.toString());
@@ -261,13 +276,14 @@
         if (target != null) {
             R4Package[] pkgs = R4Package.parseImportOrExportHeader(target);
             if (pkgs != null && pkgs.length > 0) {
-                Map<String, R4Import> imports = new TreeMap<String, R4Import>();
-                for (R4Package pkg : pkgs) {
+                Map imports = new TreeMap();
+                for (int i=0; i < pkgs.length; i++) {
+                    R4Package pkg = pkgs[i];
                     imports.put(pkg.getName(), new R4Import(pkg));
                 }
 
                 // collect import packages first
-                final Map<String, ExportedPackage> candidates = new HashMap<String, ExportedPackage>();
+                final Map candidates = new HashMap();
                 PackageAdmin packageAdmin = getPackageAdmin();
                 if (packageAdmin != null) {
                     ExportedPackage[] exports = packageAdmin.getExportedPackages((Bundle) null);
@@ -276,7 +292,7 @@
                         for (int i = 0; i < exports.length; i++) {
                             final ExportedPackage ep = exports[i];
 
-                            R4Import imp = imports.get(ep.getName());
+                            R4Import imp = (R4Import) imports.get(ep.getName());
                             if (imp != null && imp.isSatisfied(toR4Export(ep))) {
                                 candidates.put(ep.getName(), ep);
                             }
@@ -287,8 +303,9 @@
                 // now sort
                 StringBuffer val = new StringBuffer();
                 if (imports.size() > 0) {
-                    for (R4Import r4Import : imports.values()) {
-                        ExportedPackage ep = candidates.get(r4Import.getName());
+                    for (Iterator ii = imports.values().iterator(); ii.hasNext();) {
+                        R4Import r4Import = (R4Import) ii.next();
+                        ExportedPackage ep = (ExportedPackage) candidates.get(r4Import.getName());
 
                         // if there is no matching export, check whether this
                         // bundle has the package, ignore the entry in this case
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/BundleAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/BundleAction.java
similarity index 88%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/BundleAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/BundleAction.java
index 98130f6..35d109b 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/BundleAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/BundleAction.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.sling.osgi.console.web.Action;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.Action;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
 
 abstract class BundleAction extends BaseManagementPlugin implements Action {
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/BundleListRender.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/BundleListRender.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/BundleListRender.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/BundleListRender.java
index 590ce74..195c08d 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/BundleListRender.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/BundleListRender.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -24,9 +24,9 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.osgi.console.web.Render;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
-import org.apache.sling.osgi.console.web.internal.Util;
+import org.apache.sling.felix.webconsole.Render;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.internal.Util;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -351,7 +351,10 @@
 
     // ---------- inner classes ------------------------------------------------
 
-    private static final Comparator<Bundle> BUNDLE_NAME_COMPARATOR = new Comparator<Bundle>() {
+    private static final Comparator BUNDLE_NAME_COMPARATOR = new Comparator() {
+        public int compare(Object o1, Object o2) {
+            return compare((Bundle) o1, (Bundle) o2);
+        }
         public int compare(Bundle b1, Bundle b2) {
 
             // the same bundles
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/InstallAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/InstallAction.java
similarity index 95%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/InstallAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/InstallAction.java
index 15b2ada..fbbdb01 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/InstallAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/InstallAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -28,7 +28,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.fileupload.FileItem;
-import org.apache.sling.osgi.console.web.internal.Util;
+import org.apache.sling.felix.webconsole.internal.Util;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.Constants;
@@ -67,8 +67,7 @@
             HttpServletResponse response) {
 
         // get the uploaded data
-        @SuppressWarnings("unchecked")
-        Map<String, FileItem[]> params = (Map<String, FileItem[]>) request.getAttribute(Util.ATTR_FILEUPLOAD);
+        Map params = (Map) request.getAttribute(Util.ATTR_FILEUPLOAD);
         if (params == null) {
             return true;
         }
@@ -127,9 +126,9 @@
         return true;
     }
 
-    private FileItem getFileItem(Map<String, FileItem[]> params, String name,
+    private FileItem getFileItem(Map params, String name,
             boolean isFormField) {
-        FileItem[] items = params.get(name);
+        FileItem[] items = (FileItem[]) params.get(name);
         if (items != null) {
             for (int i = 0; i < items.length; i++) {
                 if (items[i].isFormField() == isFormField) {
@@ -211,7 +210,6 @@
         Thread t = new InstallHelper(this, "Background Install " + bundleFile,
             bundleFile) {
 
-            @Override
             protected void doRun(InputStream bundleStream)
                     throws BundleException {
                 Bundle bundle = getBundleContext().installBundle(location,
@@ -236,7 +234,6 @@
             + bundle.getSymbolicName() + " (" + bundle.getBundleId() + ")",
             bundleFile) {
 
-            @Override
             protected void doRun(InputStream bundleStream)
                     throws BundleException {
                 bundle.update(bundleStream);
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/RefreshPackagesAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/RefreshPackagesAction.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/RefreshPackagesAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/RefreshPackagesAction.java
index 9fc4821..d328296 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/RefreshPackagesAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/RefreshPackagesAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/SetStartLevelAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/SetStartLevelAction.java
similarity index 93%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/SetStartLevelAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/SetStartLevelAction.java
index 6a263f0..cb90bd2 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/SetStartLevelAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/SetStartLevelAction.java
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.osgi.console.web.Action;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.Action;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
 import org.osgi.service.startlevel.StartLevel;
 
 /**
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/StartAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/StartAction.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/StartAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/StartAction.java
index d365aa0..5564704 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/StartAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/StartAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/StopAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/StopAction.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/StopAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/StopAction.java
index 1f576b6..41b43ff 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/StopAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/StopAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/UninstallAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/UninstallAction.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/UninstallAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/UninstallAction.java
index 8bfe801..cdb9fb1 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/UninstallAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/UninstallAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/UpdateAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/UpdateAction.java
similarity index 98%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/UpdateAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/UpdateAction.java
index f0beb2a..0165851 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/core/UpdateAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/core/UpdateAction.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.core;
+package org.apache.sling.felix.webconsole.internal.core;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/misc/AssemblyListRender.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/misc/AssemblyListRender.java
similarity index 86%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/misc/AssemblyListRender.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/misc/AssemblyListRender.java
index 7b4b48d..4000d66 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/misc/AssemblyListRender.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/misc/AssemblyListRender.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.misc;
+package org.apache.sling.felix.webconsole.internal.misc;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.sling.osgi.console.web.internal.core.BundleListRender;
+import org.apache.sling.felix.webconsole.internal.core.BundleListRender;
 import org.osgi.framework.Bundle;
 
 public class AssemblyListRender extends BundleListRender {
@@ -37,12 +37,12 @@
 
     protected Bundle[] getBundles() {
         Bundle[] bundles = this.getBundleContext().getBundles();
-        List<Bundle> assList = new ArrayList<Bundle>();
+        List assList = new ArrayList();
         for (int i=0; i < bundles.length; i++) {
             if (bundles[i].getHeaders().get("Assembly-Bundles") != null) {
                 assList.add(bundles[i]);
             }
         }
-        return assList.toArray(new Bundle[assList.size()]);
+        return (Bundle[]) assList.toArray(new Bundle[assList.size()]);
     }
 }
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/misc/ConfigurationRender.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/misc/ConfigurationRender.java
similarity index 86%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/misc/ConfigurationRender.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/misc/ConfigurationRender.java
index df7e3c0..dee96b5 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/misc/ConfigurationRender.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/misc/ConfigurationRender.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.misc;
+package org.apache.sling.felix.webconsole.internal.misc;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -41,9 +41,9 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.sling.osgi.console.web.ConfigurationPrinter;
-import org.apache.sling.osgi.console.web.Render;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.ConfigurationPrinter;
+import org.apache.sling.felix.webconsole.Render;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.InvalidSyntaxException;
@@ -65,7 +65,7 @@
 
     private int cfgPrinterTrackerCount;
 
-    private SortedMap<String, ConfigurationPrinter> configurationPrinters = new TreeMap<String, ConfigurationPrinter>();
+    private SortedMap configurationPrinters = new TreeMap();
 
     public String getName() {
         return NAME;
@@ -103,8 +103,8 @@
         this.printPreferences(pw);
         this.printConfigurations(pw);
 
-        for (ConfigurationPrinter cp : getConfigurationPrinters()) {
-            printConfigurationPrinter(pw, cp);
+        for (Iterator cpi = getConfigurationPrinters().iterator(); cpi.hasNext();) {
+            printConfigurationPrinter(pw, (ConfigurationPrinter) cpi.next());
         }
 
         pw.println("</pre>");
@@ -113,7 +113,7 @@
         pw.println("</table>");
     }
 
-    private Collection<ConfigurationPrinter> getConfigurationPrinters() {
+    private Collection getConfigurationPrinters() {
         if (cfgPrinterTracker == null) {
             cfgPrinterTracker = new ServiceTracker(getBundleContext(),
                 ConfigurationPrinter.SERVICE, null);
@@ -122,10 +122,11 @@
         }
 
         if (cfgPrinterTrackerCount != cfgPrinterTracker.getTrackingCount()) {
-            SortedMap<String, ConfigurationPrinter> cp = new TreeMap<String, ConfigurationPrinter>();
+            SortedMap cp = new TreeMap();
             Object[] services = cfgPrinterTracker.getServices();
             if (services != null) {
-                for (Object srv : services) {
+                for (int i = 0; i < services.length; i++) {
+                    Object srv = services[i];
                     ConfigurationPrinter cfgPrinter = (ConfigurationPrinter) srv;
                     cp.put(cfgPrinter.getTitle(), cfgPrinter);
                 }
@@ -141,8 +142,9 @@
         pw.println("*** System properties:");
 
         Properties props = System.getProperties();
-        SortedSet<Object> keys = new TreeSet<Object>(props.keySet());
-        for (Object key : keys) {
+        SortedSet keys = new TreeSet(props.keySet());
+        for (Iterator ki = keys.iterator(); ki.hasNext();) {
+            Object key = ki.next();
             this.infoLine(pw, null, (String) key, props.get(key));
         }
 
@@ -166,8 +168,9 @@
                 IOUtils.closeQuietly(ins);
             }
 
-            SortedSet<Object> keys = new TreeSet<Object>(props.keySet());
-            for (Object key : keys) {
+            SortedSet keys = new TreeSet(props.keySet());
+            for (Iterator ki = keys.iterator(); ki.hasNext();) {
+                Object key = ki.next();
                 this.infoLine(pw, null, (String) key, props.get(key));
             }
 
@@ -182,7 +185,7 @@
         pw.println("*** Assemblies:");
 
         Bundle[] bundles = getBundleContext().getBundles();
-        SortedSet<String> keys = new TreeSet<String>();
+        SortedSet keys = new TreeSet();
         for (int i = 0; i < bundles.length; i++) {
             if (bundles[i].getHeaders().get("Assembly-Bundles") != null) {
                 keys.add(this.getBundleString(bundles[i], false));
@@ -192,7 +195,7 @@
         if (keys.isEmpty()) {
             pw.println("  No Assemblies installed");
         } else {
-            for (Iterator<String> ki = keys.iterator(); ki.hasNext();) {
+            for (Iterator ki = keys.iterator(); ki.hasNext();) {
                 this.infoLine(pw, null, null, ki.next());
             }
         }
@@ -206,12 +209,12 @@
         // Monitor" [Resolved]
 
         Bundle[] bundles = getBundleContext().getBundles();
-        SortedSet<String> keys = new TreeSet<String>();
+        SortedSet keys = new TreeSet();
         for (int i = 0; i < bundles.length; i++) {
             keys.add(this.getBundleString(bundles[i], true));
         }
 
-        for (Iterator<String> ki = keys.iterator(); ki.hasNext();) {
+        for (Iterator ki = keys.iterator(); ki.hasNext();) {
             this.infoLine(pw, null, null, ki.next());
         }
 
@@ -222,7 +225,7 @@
         pw.println("*** Services:");
 
         // get the list of services sorted by service ID (ascending)
-        SortedMap<Object, ServiceReference> srMap = new TreeMap<Object, ServiceReference>();
+        SortedMap srMap = new TreeMap();
         try {
             ServiceReference[] srs = getBundleContext().getAllServiceReferences(
                 null, null);
@@ -234,8 +237,8 @@
             // expected
         }
 
-        for (Iterator<ServiceReference> si = srMap.values().iterator(); si.hasNext();) {
-            ServiceReference sr = si.next();
+        for (Iterator si = srMap.values().iterator(); si.hasNext();) {
+            ServiceReference sr = (ServiceReference) si.next();
 
             this.infoLine(pw, null,
                 String.valueOf(sr.getProperty(Constants.SERVICE_ID)),
@@ -245,7 +248,7 @@
 
             Bundle[] users = sr.getUsingBundles();
             if (users != null && users.length > 0) {
-                List<String> userString = new ArrayList<String>();
+                List userString = new ArrayList();
                 for (int i = 0; i < users.length; i++) {
                     userString.add(this.getBundleString(users[i], false));
                 }
@@ -324,13 +327,13 @@
             try {
                 Configuration[] configs = ca.listConfigurations(null);
                 if (configs != null && configs.length > 0) {
-                    SortedMap<Object, Configuration> sm = new TreeMap<Object, Configuration>();
+                    SortedMap sm = new TreeMap();
                     for (int i = 0; i < configs.length; i++) {
                         sm.put(configs[i].getPid(), configs[i]);
                     }
 
-                    for (Iterator<Configuration> mi = sm.values().iterator(); mi.hasNext();) {
-                        this.printConfiguration(pw, mi.next());
+                    for (Iterator mi = sm.values().iterator(); mi.hasNext();) {
+                        this.printConfiguration(pw, (Configuration) mi.next());
                     }
                 } else {
                     pw.println("  No Configurations available");
@@ -364,16 +367,15 @@
                 : "Unbound";
         this.infoLine(pw, "  ", "BundleLocation", loc);
 
-        @SuppressWarnings("unchecked")
-        Dictionary<String, Object> props = config.getProperties();
+        Dictionary props = config.getProperties();
         if (props != null) {
-            SortedSet<String> keys = new TreeSet<String>();
-            for (Enumeration<String> ke = props.keys(); ke.hasMoreElements();) {
+            SortedSet keys = new TreeSet();
+            for (Enumeration ke = props.keys(); ke.hasMoreElements();) {
                 keys.add(ke.nextElement());
             }
 
-            for (Iterator<String> ki = keys.iterator(); ki.hasNext();) {
-                String key = ki.next();
+            for (Iterator ki = keys.iterator(); ki.hasNext();) {
+                String key = (String) ki.next();
                 this.infoLine(pw, "  ", key, props.get(key));
             }
         }
@@ -431,8 +433,7 @@
             buf.append(bundle.getBundleId());
         }
 
-        @SuppressWarnings("unchecked")
-        Dictionary<String, String> headers = bundle.getHeaders();
+        Dictionary headers = bundle.getHeaders();
         if (headers.get(Constants.BUNDLE_VERSION) != null) {
             buf.append(" (").append(headers.get(Constants.BUNDLE_VERSION)).append(
                 ')');
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/AbstractObrPlugin.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/AbstractObrPlugin.java
similarity index 94%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/AbstractObrPlugin.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/AbstractObrPlugin.java
index c5f35dc..2ac8d8f 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/AbstractObrPlugin.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/AbstractObrPlugin.java
@@ -16,11 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web.internal.obr;
+package org.apache.sling.felix.webconsole.internal.obr;
 
 //import org.apache.sling.osgi.assembly.installer.BundleRepositoryAdmin;
 //import org.apache.sling.osgi.assembly.installer.InstallerService;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
 import org.osgi.framework.BundleContext;
 import org.osgi.util.tracker.ServiceTracker;
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/BundleRepositoryRender.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/BundleRepositoryRender.java
similarity index 95%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/BundleRepositoryRender.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/BundleRepositoryRender.java
index c33a4ea..ba603d0 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/BundleRepositoryRender.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/BundleRepositoryRender.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.obr;
+package org.apache.sling.felix.webconsole.internal.obr;
 
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -23,8 +23,8 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import org.apache.sling.osgi.console.web.Render;
-import org.apache.sling.osgi.console.web.internal.Util;
+import org.apache.sling.felix.webconsole.Render;
+import org.apache.sling.felix.webconsole.internal.Util;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -48,7 +48,7 @@
         super.setBundleContext(bundleContext);
 
         String urlStr = bundleContext.getProperty(REPOSITORY_PROPERTY);
-        List<String> urlList = new ArrayList<String>();
+        List urlList = new ArrayList();
 
         if (urlStr != null) {
             StringTokenizer st = new StringTokenizer(urlStr);
@@ -57,7 +57,7 @@
             }
         }
 
-        this.repoURLs = urlList.toArray(new String[urlList.size()]);
+        this.repoURLs = (String[]) urlList.toArray(new String[urlList.size()]);
     }
 
     public String getName() {
@@ -256,8 +256,8 @@
         pw.println("</table></form>");
     }
 
-    private Map<String, Version> getBundles() {
-        Map<String, Version> bundles = new HashMap<String, Version>();
+    private Map getBundles() {
+        Map bundles = new HashMap();
 
         Bundle[] installed = getBundleContext().getBundles();
         for (int i = 0; i < installed.length; i++) {
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/InstallFromRepoAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/InstallFromRepoAction.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/InstallFromRepoAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/InstallFromRepoAction.java
index 0135a91..e549c5b 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/InstallFromRepoAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/InstallFromRepoAction.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.obr;
+package org.apache.sling.felix.webconsole.internal.obr;
 
-import org.apache.sling.osgi.console.web.Action;
+import org.apache.sling.felix.webconsole.Action;
 
 public abstract class InstallFromRepoAction extends AbstractObrPlugin implements Action {
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/RefreshRepoAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/RefreshRepoAction.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/RefreshRepoAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/RefreshRepoAction.java
index 8ab5dd6..31e1faf 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/obr/RefreshRepoAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/obr/RefreshRepoAction.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.obr;
+package org.apache.sling.felix.webconsole.internal.obr;
 
-import org.apache.sling.osgi.console.web.Action;
+import org.apache.sling.felix.webconsole.Action;
 
 public abstract class RefreshRepoAction extends AbstractObrPlugin implements Action {
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/ConfigurationListener.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/ConfigurationListener.java
similarity index 91%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/ConfigurationListener.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/ConfigurationListener.java
index 9c01539..df15bda 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/ConfigurationListener.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/ConfigurationListener.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web.internal.servlet;
+package org.apache.sling.felix.webconsole.internal.servlet;
 
 import java.util.Dictionary;
 import java.util.Hashtable;
@@ -32,7 +32,7 @@
     static ServiceRegistration create(SlingManager slingManager) {
         ConfigurationListener cl = new ConfigurationListener(slingManager);
 
-        Dictionary<String, String> props = new Hashtable<String, String>();
+        Dictionary props = new Hashtable();
         props.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
         props.put(Constants.SERVICE_DESCRIPTION,
             "Sling Management Console Configuration Receiver");
@@ -46,7 +46,6 @@
         this.slingManager = slingManager;
     }
 
-    @SuppressWarnings("unchecked")
     public void updated(Dictionary config) {
         slingManager.updateConfiguration(config);
     }
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/Logger.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/Logger.java
similarity index 97%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/Logger.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/Logger.java
index 1926497..6d75345 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/Logger.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/Logger.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.osgi.console.web.internal.servlet;
+package org.apache.sling.felix.webconsole.internal.servlet;
 
 import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/SlingHttpContext.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/SlingHttpContext.java
similarity index 98%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/SlingHttpContext.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/SlingHttpContext.java
index 1f7ad6d..3761215 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/SlingHttpContext.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/SlingHttpContext.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.servlet;
+package org.apache.sling.felix.webconsole.internal.servlet;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/SlingManager.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/SlingManager.java
similarity index 84%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/SlingManager.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/SlingManager.java
index 57109a0..ddf8007 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/servlet/SlingManager.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/servlet/SlingManager.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.servlet;
+package org.apache.sling.felix.webconsole.internal.servlet;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -22,6 +22,7 @@
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.SortedMap;
@@ -39,28 +40,28 @@
 import org.apache.commons.fileupload.disk.DiskFileItemFactory;
 import org.apache.commons.fileupload.servlet.ServletFileUpload;
 import org.apache.commons.fileupload.servlet.ServletRequestContext;
-import org.apache.sling.osgi.console.web.Action;
-import org.apache.sling.osgi.console.web.Render;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
-import org.apache.sling.osgi.console.web.internal.Util;
-import org.apache.sling.osgi.console.web.internal.compendium.AjaxConfigManagerAction;
-import org.apache.sling.osgi.console.web.internal.compendium.ComponentConfigurationPrinter;
-import org.apache.sling.osgi.console.web.internal.compendium.ComponentRenderAction;
-import org.apache.sling.osgi.console.web.internal.compendium.ConfigManager;
-import org.apache.sling.osgi.console.web.internal.core.AjaxBundleDetailsAction;
-import org.apache.sling.osgi.console.web.internal.core.BundleListRender;
-import org.apache.sling.osgi.console.web.internal.core.InstallAction;
-import org.apache.sling.osgi.console.web.internal.core.RefreshPackagesAction;
-import org.apache.sling.osgi.console.web.internal.core.SetStartLevelAction;
-import org.apache.sling.osgi.console.web.internal.core.StartAction;
-import org.apache.sling.osgi.console.web.internal.core.StopAction;
-import org.apache.sling.osgi.console.web.internal.core.UninstallAction;
-import org.apache.sling.osgi.console.web.internal.core.UpdateAction;
-import org.apache.sling.osgi.console.web.internal.misc.ConfigurationRender;
-import org.apache.sling.osgi.console.web.internal.system.GCAction;
-import org.apache.sling.osgi.console.web.internal.system.ShutdownAction;
-import org.apache.sling.osgi.console.web.internal.system.ShutdownRender;
-import org.apache.sling.osgi.console.web.internal.system.VMStatRender;
+import org.apache.sling.felix.webconsole.Action;
+import org.apache.sling.felix.webconsole.Render;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.internal.Util;
+import org.apache.sling.felix.webconsole.internal.compendium.AjaxConfigManagerAction;
+import org.apache.sling.felix.webconsole.internal.compendium.ComponentConfigurationPrinter;
+import org.apache.sling.felix.webconsole.internal.compendium.ComponentRenderAction;
+import org.apache.sling.felix.webconsole.internal.compendium.ConfigManager;
+import org.apache.sling.felix.webconsole.internal.core.AjaxBundleDetailsAction;
+import org.apache.sling.felix.webconsole.internal.core.BundleListRender;
+import org.apache.sling.felix.webconsole.internal.core.InstallAction;
+import org.apache.sling.felix.webconsole.internal.core.RefreshPackagesAction;
+import org.apache.sling.felix.webconsole.internal.core.SetStartLevelAction;
+import org.apache.sling.felix.webconsole.internal.core.StartAction;
+import org.apache.sling.felix.webconsole.internal.core.StopAction;
+import org.apache.sling.felix.webconsole.internal.core.UninstallAction;
+import org.apache.sling.felix.webconsole.internal.core.UpdateAction;
+import org.apache.sling.felix.webconsole.internal.misc.ConfigurationRender;
+import org.apache.sling.felix.webconsole.internal.system.GCAction;
+import org.apache.sling.felix.webconsole.internal.system.ShutdownAction;
+import org.apache.sling.felix.webconsole.internal.system.ShutdownRender;
+import org.apache.sling.felix.webconsole.internal.system.VMStatRender;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
@@ -118,7 +119,7 @@
      */
     private static final String DEFAULT_MANAGER_ROOT = "/system/console";
 
-    private static final Class<?>[] PLUGIN_CLASSES = {
+    private static final Class[] PLUGIN_CLASSES = {
         AjaxConfigManagerAction.class, ComponentConfigurationPrinter.class,
         ComponentRenderAction.class, ConfigManager.class,
         AjaxBundleDetailsAction.class, BundleListRender.class,
@@ -142,9 +143,9 @@
 
     private ServiceRegistration configurationListener;
 
-    private Map<String, Action> operations = new HashMap<String, Action>();
+    private Map operations = new HashMap();
 
-    private SortedMap<String, Render> renders = new TreeMap<String, Render>();
+    private SortedMap renders = new TreeMap();
 
     private Render defaultRender;
 
@@ -152,7 +153,7 @@
 
     private String webManagerRoot;
 
-    private Dictionary<String, Object> configuration;
+    private Dictionary configuration;
 
     public SlingManager(BundleContext bundleContext) {
 
@@ -175,7 +176,8 @@
         httpServiceTracker = new HttpServiceTracker(this);
         httpServiceTracker.open();
 
-        for (Class<?> pluginClass : PLUGIN_CLASSES) {
+        for (int i=0; i < PLUGIN_CLASSES.length; i++) {
+            Class pluginClass = PLUGIN_CLASSES[i];
             try {
                 Object plugin = pluginClass.newInstance();
                 if (plugin instanceof BaseManagementPlugin) {
@@ -271,7 +273,7 @@
         // check action
         String actionName = this.getParameter(req, Util.PARAM_ACTION);
         if (actionName != null) {
-            Action action = this.operations.get(actionName);
+            Action action = (Action) this.operations.get(actionName);
             if (action != null) {
                 boolean redirect = true;
                 try {
@@ -322,7 +324,7 @@
             page = page.substring(lastSlash + 1);
         }
 
-        Render render = this.renders.get(page);
+        Render render = (Render) this.renders.get(page);
         return (render == null) ? this.defaultRender : render;
     }
 
@@ -334,8 +336,7 @@
         }
 
         // check, whether we alread have the parameters
-        @SuppressWarnings("unchecked")
-        Map<String, FileItem[]> params = (Map<String, FileItem[]>) request.getAttribute(Util.ATTR_FILEUPLOAD);
+        Map params = (Map) request.getAttribute(Util.ATTR_FILEUPLOAD);
         if (params == null) {
             // parameters not read yet, read now
             // Create a factory for disk-based file items
@@ -347,12 +348,12 @@
             upload.setSizeMax(-1);
 
             // Parse the request
-            params = new HashMap<String, FileItem[]>();
+            params = new HashMap();
             try {
-                @SuppressWarnings("unchecked")
-                List<FileItem> items = upload.parseRequest(request);
-                for (FileItem fi : items) {
-                    FileItem[] current = params.get(fi.getFieldName());
+                List items = upload.parseRequest(request);
+                for (Iterator fiter=items.iterator(); fiter.hasNext(); ) {
+                    FileItem fi = (FileItem) fiter.next();
+                    FileItem[] current = (FileItem[]) params.get(fi.getFieldName());
                     if (current == null) {
                         current = new FileItem[] { fi };
                     } else {
@@ -370,7 +371,7 @@
             request.setAttribute(Util.ATTR_FILEUPLOAD, params);
         }
 
-        FileItem[] param = params.get(name);
+        FileItem[] param = (FileItem[]) params.get(name);
         if (param != null) {
             for (int i = 0; i < param.length; i++) {
                 if (param[i].isFormField()) {
@@ -397,7 +398,6 @@
             this.slingManager = slingManager;
         }
 
-        @Override
         public Object addingService(ServiceReference reference) {
             Object operation = super.addingService(reference);
             if (operation instanceof HttpService) {
@@ -406,7 +406,6 @@
             return operation;
         }
 
-        @Override
         public void removedService(ServiceReference reference, Object service) {
             if (service instanceof HttpService) {
                 slingManager.unbindHttpService((HttpService) service);
@@ -425,7 +424,6 @@
             this.slingManager = slingManager;
         }
 
-        @Override
         public Object addingService(ServiceReference reference) {
             Object operation = super.addingService(reference);
             if (operation instanceof Action) {
@@ -434,7 +432,6 @@
             return operation;
         }
 
-        @Override
         public void removedService(ServiceReference reference, Object service) {
             if (service instanceof Action) {
                 slingManager.bindOperation((Action) service);
@@ -453,7 +450,6 @@
             this.slingManager = slingManager;
         }
 
-        @Override
         public Object addingService(ServiceReference reference) {
             Object operation = super.addingService(reference);
             if (operation instanceof Render) {
@@ -462,7 +458,6 @@
             return operation;
         }
 
-        @Override
         public void removedService(ServiceReference reference, Object service) {
             if (service instanceof Render) {
                 slingManager.bindRender((Render) service);
@@ -473,7 +468,7 @@
     }
 
     protected synchronized void bindHttpService(HttpService httpService) {
-        Dictionary<String, Object> config = getConfiguration();
+        Dictionary config = getConfiguration();
 
         // get authentication details
         String realm = this.getProperty(config, PROP_REALM,
@@ -486,7 +481,7 @@
             HttpContext httpContext = new SlingHttpContext(httpService, realm,
                 userId, password);
 
-            Dictionary<String, String> servletConfig = toStringConfig(config);
+            Dictionary servletConfig = toStringConfig(config);
 
             // rest of sling
             httpService.registerServlet(this.webManagerRoot, this,
@@ -535,25 +530,25 @@
             if (this.renders.isEmpty()) {
                 this.defaultRender = null;
             } else {
-                this.defaultRender = this.renders.values().iterator().next();
+                this.defaultRender = (Render) renders.values().iterator().next();
             }
         }
     }
 
-    private Dictionary<String, Object> getConfiguration() {
+    private Dictionary getConfiguration() {
         return configuration;
     }
 
-    void updateConfiguration(Dictionary<String, Object> config) {
+    void updateConfiguration(Dictionary config) {
         if (config == null) {
-            config = new Hashtable<String, Object>();
+            config = new Hashtable();
         }
 
         configuration = config;
 
         defaultRenderName = (String) config.get(PROP_DEFAULT_RENDER);
         if (defaultRenderName != null && renders.get(defaultRenderName) != null) {
-            defaultRender = renders.get(defaultRenderName);
+            defaultRender = (Render) renders.get(defaultRenderName);
         }
 
         // get the web manager root path
@@ -582,7 +577,7 @@
      * @return The value of the named property as a string or <code>def</code>
      *         if the property does not exist
      */
-    private String getProperty(Dictionary<String, Object> config, String name,
+    private String getProperty(Dictionary config, String name,
             String def) {
         Object value = config.get(name);
         if (value instanceof String) {
@@ -596,9 +591,9 @@
         return String.valueOf(value);
     }
 
-    private Dictionary<String, String> toStringConfig(Dictionary<?, ?> config) {
-        Dictionary<String, String> stringConfig = new Hashtable<String, String>();
-        for (Enumeration<?> ke = config.keys(); ke.hasMoreElements();) {
+    private Dictionary toStringConfig(Dictionary config) {
+        Dictionary stringConfig = new Hashtable();
+        for (Enumeration ke = config.keys(); ke.hasMoreElements();) {
             Object key = ke.nextElement();
             stringConfig.put(key.toString(), String.valueOf(config.get(key)));
         }
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/GCAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/GCAction.java
similarity index 92%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/GCAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/GCAction.java
index 9de94e6..e4b9a46 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/GCAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/GCAction.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.system;
+package org.apache.sling.felix.webconsole.internal.system;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.osgi.console.web.Action;
+import org.apache.sling.felix.webconsole.Action;
 
 public class GCAction implements Action {
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/ShutdownAction.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/ShutdownAction.java
similarity index 92%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/ShutdownAction.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/ShutdownAction.java
index 9e45bfb..8e7386e 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/ShutdownAction.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/ShutdownAction.java
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.system;
+package org.apache.sling.felix.webconsole.internal.system;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.osgi.console.web.Action;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.Action;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
 import org.osgi.framework.BundleException;
 import org.osgi.service.log.LogService;
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/ShutdownRender.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/ShutdownRender.java
similarity index 94%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/ShutdownRender.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/ShutdownRender.java
index 3eb16d5..a2af9d4 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/ShutdownRender.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/ShutdownRender.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.system;
+package org.apache.sling.felix.webconsole.internal.system;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -22,7 +22,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.osgi.console.web.Render;
+import org.apache.sling.felix.webconsole.Render;
 
 public class ShutdownRender implements Render {
 
diff --git a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/VMStatRender.java b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/VMStatRender.java
similarity index 95%
rename from webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/VMStatRender.java
rename to webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/VMStatRender.java
index 97ae8ef..387a406 100644
--- a/webconsole/src/main/java/org/apache/sling/osgi/console/web/internal/system/VMStatRender.java
+++ b/webconsole/src/main/java/org/apache/sling/felix/webconsole/internal/system/VMStatRender.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.osgi.console.web.internal.system;
+package org.apache.sling.felix.webconsole.internal.system;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -23,10 +23,10 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.osgi.console.web.Render;
-import org.apache.sling.osgi.console.web.internal.BaseManagementPlugin;
-import org.apache.sling.osgi.console.web.internal.Util;
-import org.apache.sling.osgi.console.web.internal.core.SetStartLevelAction;
+import org.apache.sling.felix.webconsole.Render;
+import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin;
+import org.apache.sling.felix.webconsole.internal.Util;
+import org.apache.sling.felix.webconsole.internal.core.SetStartLevelAction;
 
 public class VMStatRender extends BaseManagementPlugin implements Render {
 
diff --git a/webconsole/src/main/resources/OSGI-INF/metatype/metatype.properties b/webconsole/src/main/resources/OSGI-INF/metatype/metatype.properties
index be38663..5384d8f 100644
--- a/webconsole/src/main/resources/OSGI-INF/metatype/metatype.properties
+++ b/webconsole/src/main/resources/OSGI-INF/metatype/metatype.properties
@@ -22,8 +22,8 @@
 # descriptions as used in the metatype.xml descriptor generated by the
 # the Sling SCR plugin
 
-manager.name = Sling Management Console
-manager.description = Configuration of the Sling Management Console.
+manager.name = OSGi Management Console
+manager.description = Configuration of the OSGi Management Console.
 
 manager.root.name = Root URI
 manager.root.description = The root path to the Sling Management Console.
