diff --git a/karaf/assembly/src/main/descriptors/unix-bin.xml b/karaf/assembly/src/main/descriptors/unix-bin.xml
index 211dcf2..fb3fead 100644
--- a/karaf/assembly/src/main/descriptors/unix-bin.xml
+++ b/karaf/assembly/src/main/descriptors/unix-bin.xml
@@ -178,15 +178,6 @@
                 <include>org.ops4j.pax.url:pax-url-wrap</include>
             </includes>
         </dependencySet>
-       <dependencySet>
-            <outputDirectory>/system</outputDirectory>
-            <unpack>false</unpack>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputFileNameMapping>org/apache/felix/karaf/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
-            <includes>
-                <include>org.apache.felix.karaf:org.apache.felix.karaf.commons</include>
-            </includes>
-        </dependencySet>
         <dependencySet>
             <outputDirectory>/system</outputDirectory>
             <unpack>false</unpack>
diff --git a/karaf/assembly/src/main/descriptors/windows-bin.xml b/karaf/assembly/src/main/descriptors/windows-bin.xml
index 307d319..3b03a21 100644
--- a/karaf/assembly/src/main/descriptors/windows-bin.xml
+++ b/karaf/assembly/src/main/descriptors/windows-bin.xml
@@ -176,15 +176,6 @@
             <useProjectArtifact>false</useProjectArtifact>
             <outputFileNameMapping>org/apache/felix/karaf/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
-                <include>org.apache.felix.karaf:org.apache.felix.karaf.commons</include>
-            </includes>
-        </dependencySet>
-        <dependencySet>
-            <outputDirectory>/system</outputDirectory>
-            <unpack>false</unpack>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputFileNameMapping>org/apache/felix/karaf/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
-            <includes>
                 <include>org.apache.felix.karaf:org.apache.felix.karaf.management</include>
             </includes>
         </dependencySet>
diff --git a/karaf/assembly/src/main/filtered-resources/etc/startup.properties b/karaf/assembly/src/main/filtered-resources/etc/startup.properties
index bf7a1aa..0ed8095 100644
--- a/karaf/assembly/src/main/filtered-resources/etc/startup.properties
+++ b/karaf/assembly/src/main/filtered-resources/etc/startup.properties
@@ -36,7 +36,6 @@
 #
 org/apache/aries/blueprint/org.apache.aries.blueprint/${aries.blueprint.version}/org.apache.aries.blueprint-${aries.blueprint.version}.jar=20
 
-org/apache/felix/karaf/org.apache.felix.karaf.commons/${project.version}/org.apache.felix.karaf.commons-${project.version}.jar=30
 org/apache/felix/gogo/org.apache.felix.gogo.runtime/${felix.gogo.version}/org.apache.felix.gogo.runtime-${felix.gogo.version}.jar=30
 org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.console/${project.version}/org.apache.felix.karaf.shell.console-${project.version}.jar=30
 org/apache/felix/karaf/deployer/org.apache.felix.karaf.deployer.spring/${project.version}/org.apache.felix.karaf.deployer.spring-${project.version}.jar=30
diff --git a/karaf/commons/pom.xml b/karaf/commons/pom.xml
deleted file mode 100644
index 1083670..0000000
--- a/karaf/commons/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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/xsd/maven-4.0.0.xsd">
-
-  <!--
-
-      Licensed to the Apache Software Foundation (ASF) under one or more
-      contributor license agreements.  See the NOTICE file distributed with
-      this work for additional information regarding copyright ownership.
-      The ASF licenses this file to You under the Apache License, Version 2.0
-      (the "License"); you may not use this file except in compliance with
-      the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-      Unless required by applicable law or agreed to in writing, software
-      distributed under the License is distributed on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-      See the License for the specific language governing permissions and
-      limitations under the License.
-  -->
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>karaf</artifactId>
-    <groupId>org.apache.felix.karaf</groupId>
-    <version>1.7.0-SNAPSHOT</version>
-  </parent>
-
-  <groupId>org.apache.felix.karaf</groupId>
-  <artifactId>org.apache.felix.karaf.commons</artifactId>
-  <version>1.7.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <name>Apache Felix Karaf :: Commons</name>
-
-  <properties>
-    <appendedResourcesDirectory>${basedir}/../etc/appended-resources</appendedResourcesDirectory>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.osgi.core</artifactId>
-      <scope>provided</scope>
-    </dependency>    
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-          <instructions>
-            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-            <Export-Package>${project.artifactId}*;version=${project.version}</Export-Package>
-            <Import-Package>
-                !${project.artifactId}*,
-                *
-            </Import-Package>
-            <_versionpolicy>${bnd.version.policy}</_versionpolicy>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/karaf/commons/src/main/java/org/apache/felix/karaf/commons/osgi/VersionRange.java b/karaf/commons/src/main/java/org/apache/felix/karaf/commons/osgi/VersionRange.java
deleted file mode 100644
index 47045de..0000000
--- a/karaf/commons/src/main/java/org/apache/felix/karaf/commons/osgi/VersionRange.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.karaf.commons.osgi;
-
-import org.osgi.framework.Version;
-
-public class VersionRange
-{
-    private final Version m_low;
-    private final boolean m_isLowInclusive;
-    private final Version m_high;
-    private final boolean m_isHighInclusive;
-    public static final VersionRange infiniteRange = new VersionRange(Version.emptyVersion, true, null, true);
-
-    public VersionRange(
-        Version low, boolean isLowInclusive,
-        Version high, boolean isHighInclusive)
-    {
-        m_low = low;
-        m_isLowInclusive = isLowInclusive;
-        m_high = high;
-        m_isHighInclusive = isHighInclusive;
-    }
-
-    public Version getLow()
-    {
-        return m_low;
-    }
-
-    public boolean isLowInclusive()
-    {
-        return m_isLowInclusive;
-    }
-
-    public Version getHigh()
-    {
-        return m_high;
-    }
-
-    public boolean isHighInclusive()
-    {
-        return m_isHighInclusive;
-    }
-
-    public boolean isInRange(Version version)
-    {
-        // We might not have an upper end to the range.
-        if (m_high == null)
-        {
-            return (version.compareTo(m_low) >= 0);
-        }
-        else if (isLowInclusive() && isHighInclusive())
-        {
-            return (version.compareTo(m_low) >= 0) && (version.compareTo(m_high) <= 0);
-        }
-        else if (isHighInclusive())
-        {
-            return (version.compareTo(m_low) > 0) && (version.compareTo(m_high) <= 0);
-        }
-        else if (isLowInclusive())
-        {
-            return (version.compareTo(m_low) >= 0) && (version.compareTo(m_high) < 0);
-        }
-        return (version.compareTo(m_low) > 0) && (version.compareTo(m_high) < 0);
-    }
-
-    public static VersionRange parse(String range)
-    {
-        // Check if the version is an interval.
-        if (range.indexOf(',') >= 0)
-        {
-            String s = range.substring(1, range.length() - 1);
-            String vlo = s.substring(0, s.indexOf(',')).trim();
-            String vhi = s.substring(s.indexOf(',') + 1, s.length()).trim();
-            return new VersionRange (
-                new Version(vlo), (range.charAt(0) == '['),
-                new Version(vhi), (range.charAt(range.length() - 1) == ']'));
-        }
-        else
-        {
-            return new VersionRange(new Version(range), true, null, false);
-        }
-    }
-
-    public boolean equals(Object obj)
-    {
-        if (obj == null)
-        {
-            return false;
-        }
-        if (getClass() != obj.getClass())
-        {
-            return false;
-        }
-        final VersionRange other = (VersionRange) obj;
-        if (m_low != other.m_low && (m_low == null || !m_low.equals(other.m_low)))
-        {
-            return false;
-        }
-        if (m_isLowInclusive != other.m_isLowInclusive)
-        {
-            return false;
-        }
-        if (m_high != other.m_high && (m_high == null || !m_high.equals(other.m_high)))
-        {
-            return false;
-        }
-        if (m_isHighInclusive != other.m_isHighInclusive)
-        {
-            return false;
-        }
-        return true;
-    }
-
-    public int hashCode()
-    {
-        int hash = 5;
-        hash = 97 * hash + (m_low != null ? m_low.hashCode() : 0);
-        hash = 97 * hash + (m_isLowInclusive ? 1 : 0);
-        hash = 97 * hash + (m_high != null ? m_high.hashCode() : 0);
-        hash = 97 * hash + (m_isHighInclusive ? 1 : 0);
-        return hash;
-    }
-
-    public String toString()
-    {
-        if (m_high != null)
-        {
-            StringBuffer sb = new StringBuffer();
-            sb.append(m_isLowInclusive ? '[' : '(');
-            sb.append(m_low.toString());
-            sb.append(',');
-            sb.append(m_high.toString());
-            sb.append(m_isHighInclusive ? ']' : ')');
-            return sb.toString();
-        }
-        else
-        {
-            return m_low.toString();
-        }
-    }
-}
\ No newline at end of file
diff --git a/karaf/features/core/pom.xml b/karaf/features/core/pom.xml
index cde5a66..c6fe665 100644
--- a/karaf/features/core/pom.xml
+++ b/karaf/features/core/pom.xml
@@ -51,12 +51,12 @@
 
         <dependency>
             <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.bundlerepository</artifactId>
+            <artifactId>org.apache.felix.utils</artifactId>
+            <scope>provided</scope>
         </dependency>
-
         <dependency>
-            <groupId>org.apache.felix.karaf</groupId>
-            <artifactId>org.apache.felix.karaf.commons</artifactId>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.bundlerepository</artifactId>
         </dependency>
 
         <dependency>
@@ -109,7 +109,11 @@
                             org.apache.felix.karaf.shell.console,
                             *
                         </Import-Package>
-                        <Private-Package>org.apache.felix.karaf.features.internal</Private-Package>
+                        <Private-Package>
+                            org.apache.felix.karaf.features.internal,
+                            org.apache.felix.utils.version,
+                            org.apache.felix.utils.manifest
+                        </Private-Package>
                         <_versionpolicy>${bnd.version.policy}</_versionpolicy>
                     </instructions>
                 </configuration>
diff --git a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
index 178a6b5..c8815df 100644
--- a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
+++ b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
@@ -22,32 +22,22 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.jar.JarInputStream;
 import java.util.jar.Manifest;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.felix.karaf.commons.osgi.VersionRange;
-import org.apache.felix.karaf.features.FeaturesService;
 import org.apache.felix.karaf.features.Feature;
-import org.apache.felix.karaf.features.Repository;
-import org.apache.felix.karaf.features.FeaturesListener;
 import org.apache.felix.karaf.features.FeatureEvent;
+import org.apache.felix.karaf.features.FeaturesListener;
+import org.apache.felix.karaf.features.FeaturesService;
+import org.apache.felix.karaf.features.Repository;
 import org.apache.felix.karaf.features.RepositoryEvent;
+import org.apache.felix.utils.manifest.Clause;
+import org.apache.felix.utils.manifest.Parser;
+import org.apache.felix.utils.version.VersionRange;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
@@ -56,10 +46,10 @@
 import org.osgi.framework.Version;
 import org.osgi.service.cm.Configuration;
 import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
 import org.osgi.service.prefs.PreferencesService;
-import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.service.startlevel.StartLevel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -406,15 +396,15 @@
         for (Bundle b : state.installed) {
             String hostHeader = (String) b.getHeaders().get(Constants.FRAGMENT_HOST);
             if (hostHeader != null) {
-                List<HeaderParser.PathElement> header = HeaderParser.parseHeader(hostHeader);
-                if (header != null && header.size() > 0) {
-                    HeaderParser.PathElement path = header.get(0);
+                Clause[] clauses = Parser.parseHeader(hostHeader);
+                if (clauses != null && clauses.length > 0) {
+                    Clause path = clauses[0];
                     for (Bundle hostBundle : state.bundles) {
                         if (hostBundle.getSymbolicName().equals(path.getName())) {
                             String ver = path.getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE);
                             if (ver != null) {
-                                VersionRange v = VersionRange.parse(ver);
-                                if (v.isInRange(hostBundle.getVersion())) {
+                                VersionRange v = VersionRange.parseVersionRange(ver);
+                                if (v.contains(hostBundle.getVersion())) {
                                     bundles.add(hostBundle);
                                 }
                             } else {
@@ -436,16 +426,16 @@
             return bundles;
         }
         // Second pass: for each bundle, check if there is any unresolved optional package that could be resolved
-        Map<Bundle, List<HeaderParser.PathElement>> imports = new HashMap<Bundle, List<HeaderParser.PathElement>>();
+        Map<Bundle, List<Clause>> imports = new HashMap<Bundle, List<Clause>>();
         for (Iterator<Bundle> it = bundles.iterator(); it.hasNext();) {
             Bundle b = it.next();
             String importsStr = (String) b.getHeaders().get(Constants.IMPORT_PACKAGE);
             if (importsStr == null) {
                 it.remove();
             } else {
-                List<HeaderParser.PathElement> importsList = HeaderParser.parseHeader(importsStr);
-                for (Iterator<HeaderParser.PathElement> itp = importsList.iterator(); itp.hasNext();) {
-                    HeaderParser.PathElement p = itp.next();
+                List<Clause> importsList = Arrays.asList(Parser.parseHeader(importsStr));
+                for (Iterator<Clause> itp = importsList.iterator(); itp.hasNext();) {
+                    Clause p = itp.next();
                     String resolution = p.getDirective(Constants.RESOLUTION_DIRECTIVE);
                     if (!Constants.RESOLUTION_OPTIONAL.equals(resolution)) {
                         itp.remove();
@@ -463,27 +453,27 @@
         }
         // Third pass: compute a list of packages that are exported by our bundles and see if
         //             some exported packages can be wired to the optional imports
-        List<HeaderParser.PathElement> exports = new ArrayList<HeaderParser.PathElement>();
+        List<Clause> exports = new ArrayList<Clause>();
         for (Bundle b : state.installed) {
             String exportsStr = (String) b.getHeaders().get(Constants.EXPORT_PACKAGE);
             if (exportsStr != null) {
-                List<HeaderParser.PathElement> exportsList = HeaderParser.parseHeader(exportsStr);
-                exports.addAll(exportsList);
+                Clause[] exportsList = Parser.parseHeader(exportsStr);
+                exports.addAll(Arrays.asList(exportsList));
             }
         }
         for (Iterator<Bundle> it = bundles.iterator(); it.hasNext();) {
             Bundle b = it.next();
-            List<HeaderParser.PathElement> importsList = imports.get(b);
-            for (Iterator<HeaderParser.PathElement> itpi = importsList.iterator(); itpi.hasNext();) {
-                HeaderParser.PathElement pi = itpi.next();
+            List<Clause> importsList = imports.get(b);
+            for (Iterator<Clause> itpi = importsList.iterator(); itpi.hasNext();) {
+                Clause pi = itpi.next();
                 boolean matching = false;
-                for (HeaderParser.PathElement pe : exports) {
+                for (Clause pe : exports) {
                     if (pi.getName().equals(pe.getName())) {
                         String evStr = pe.getAttribute(Constants.VERSION_ATTRIBUTE);
                         String ivStr = pi.getAttribute(Constants.VERSION_ATTRIBUTE);
                         Version exported = evStr != null ? Version.parseVersion(evStr) : Version.emptyVersion;
-                        VersionRange imported = ivStr != null ? VersionRange.parse(ivStr) : VersionRange.infiniteRange;
-                        if (imported.isInRange(exported)) {
+                        VersionRange imported = ivStr != null ? VersionRange.parseVersionRange(ivStr) : VersionRange.ANY_VERSION;
+                        if (imported.contains(exported)) {
                             matching = true;
                             break;
                         }
@@ -497,7 +487,7 @@
                 it.remove();
             } else {
                 LOGGER.debug("Refeshing bundle {} ({}) to solve the following optional imports", b.getSymbolicName(), b.getBundleId());
-                for (HeaderParser.PathElement p : importsList) {
+                for (Clause p : importsList) {
                     LOGGER.debug("    {}", p);
                 }
 
diff --git a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/HeaderParser.java b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/HeaderParser.java
deleted file mode 100644
index e06c636..0000000
--- a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/HeaderParser.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.karaf.features.internal;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Utility class to parse a standard OSGi header with paths.
- *
- * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
- * @version $Rev: 786132 $, $Date: 2009-06-18 17:47:58 +0200 (Thu, 18 Jun 2009) $
- */
-public final class HeaderParser  {
-
-    // Private constructor for static final class
-    private HeaderParser() {
-    }
-
-    /**
-     * Parse a given OSGi header into a list of paths
-     *
-     * @param header the OSGi header to parse
-     * @return the list of paths extracted from this header
-     */
-    public static List<PathElement> parseHeader(String header) {
-        List<PathElement> elements = new ArrayList<PathElement>();
-        if (header == null || header.trim().length() == 0) {
-            return elements;
-        }
-        String[] clauses = parseDelimitedString(header, ",");
-        for (String clause : clauses) {
-            String[] tokens = clause.split(";");
-            if (tokens.length < 1) {
-                throw new IllegalArgumentException("Invalid header clause: " + clause);
-            }
-            PathElement elem = new PathElement(tokens[0].trim());
-            elements.add(elem);
-            for (int i = 1; i < tokens.length; i++) {
-                int pos = tokens[i].indexOf('=');
-                if (pos != -1) {
-                    if (pos > 0 && tokens[i].charAt(pos - 1) == ':') {
-                        String name = tokens[i].substring(0, pos - 1).trim();
-                        String value = tokens[i].substring(pos + 1).trim();
-                        if (value.startsWith("\"") && value.endsWith("\"")) {
-                            value = value.substring(1, value.length() - 1);
-                        }
-                        elem.addDirective(name, value);
-                    } else {
-                        String name = tokens[i].substring(0, pos).trim();
-                        String value = tokens[i].substring(pos + 1).trim();
-                        if (value.startsWith("\"") && value.endsWith("\"")) {
-                            value = value.substring(1, value.length() - 1);
-                        }
-                        elem.addAttribute(name, value);
-                    }
-                } else {
-                    elem = new PathElement(tokens[i].trim());
-                    elements.add(elem);
-                }
-            }
-        }
-        return elements;
-    }
-
-    /**
-     * Parses delimited string and returns an array containing the tokens. This
-     * parser obeys quotes, so the delimiter character will be ignored if it is
-     * inside of a quote. This method assumes that the quote character is not
-     * included in the set of delimiter characters.
-     * @param value the delimited string to parse.
-     * @param delim the characters delimiting the tokens.
-     * @return an array of string tokens or null if there were no tokens.
-    **/
-    public static String[] parseDelimitedString(String value, String delim)
-    {
-        if (value == null)
-        {
-           value = "";
-        }
-
-        List list = new ArrayList();
-
-        int CHAR = 1;
-        int DELIMITER = 2;
-        int STARTQUOTE = 4;
-        int ENDQUOTE = 8;
-
-        StringBuffer sb = new StringBuffer();
-
-        int expecting = (CHAR | DELIMITER | STARTQUOTE);
-
-        for (int i = 0; i < value.length(); i++)
-        {
-            char c = value.charAt(i);
-
-            boolean isDelimiter = (delim.indexOf(c) >= 0);
-            boolean isQuote = (c == '"');
-
-            if (isDelimiter && ((expecting & DELIMITER) > 0))
-            {
-                list.add(sb.toString().trim());
-                sb.delete(0, sb.length());
-                expecting = (CHAR | DELIMITER | STARTQUOTE);
-            }
-            else if (isQuote && ((expecting & STARTQUOTE) > 0))
-            {
-                sb.append(c);
-                expecting = CHAR | ENDQUOTE;
-            }
-            else if (isQuote && ((expecting & ENDQUOTE) > 0))
-            {
-                sb.append(c);
-                expecting = (CHAR | STARTQUOTE | DELIMITER);
-            }
-            else if ((expecting & CHAR) > 0)
-            {
-                sb.append(c);
-            }
-            else
-            {
-                throw new IllegalArgumentException("Invalid delimited string: " + value);
-            }
-        }
-
-        if (sb.length() > 0)
-        {
-            list.add(sb.toString().trim());
-        }
-
-        return (String[]) list.toArray(new String[list.size()]);
-    }
-
-    public static class PathElement {
-
-        private String path;
-        private Map<String, String> attributes;
-        private Map<String, String> directives;
-
-        public PathElement(String path) {
-            this.path = path;
-            this.attributes = new HashMap<String, String>();
-            this.directives = new HashMap<String, String>();
-        }
-
-        public String getName() {
-            return this.path;
-        }
-
-        public Map<String, String> getAttributes() {
-            return attributes;
-        }
-
-        public String getAttribute(String name) {
-            return attributes.get(name);
-        }
-
-        public void addAttribute(String name, String value) {
-            attributes.put(name, value);
-        }
-
-        public Map<String, String> getDirectives() {
-            return directives;
-        }
-
-        public String getDirective(String name) {
-            return directives.get(name);
-        }
-
-        public void addDirective(String name, String value) {
-            directives.put(name, value);
-        }
-
-        public String toString() {
-            StringBuilder sb = new StringBuilder(this.path);
-            for (Map.Entry<String,String> directive : this.directives.entrySet()) {
-                sb.append(";").append(directive.getKey()).append(":=").append(directive.getValue());
-            }
-            for (Map.Entry<String,String> attribute : this.attributes.entrySet()) {
-                sb.append(";").append(attribute.getKey()).append("=").append(attribute.getValue());
-            }
-            return sb.toString(); 
-        }
-
-    }
-}
diff --git a/karaf/pom.xml b/karaf/pom.xml
index 93c7fcd..5f85582 100644
--- a/karaf/pom.xml
+++ b/karaf/pom.xml
@@ -36,7 +36,6 @@
 
     <modules>
         <module>main</module>
-        <module>commons</module>
         <module>features</module>
         <module>admin</module>
         <module>deployer</module>
@@ -84,6 +83,7 @@
         <felix.osgi.version>1.4.0</felix.osgi.version>
         <felix.plugin.version>2.1.0</felix.plugin.version>
         <felix.prefs.version>1.0.4</felix.prefs.version>
+        <felix.utils.version>1.0.0</felix.utils.version>
         <felix.webconsole.version>3.0.1-SNAPSHOT</felix.webconsole.version>
         <felix.metatype.version>1.0.2</felix.metatype.version>
         <aries.blueprint.version>0.1-incubating</aries.blueprint.version>
@@ -179,11 +179,6 @@
                 <version>${project.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.apache.felix.karaf</groupId>
-                <artifactId>org.apache.felix.karaf.commons</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
                 <groupId>org.apache.felix.karaf.deployer</groupId>
                 <artifactId>org.apache.felix.karaf.deployer.spring</artifactId>
                 <version>${project.version}</version>
@@ -398,6 +393,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.utils</artifactId>
+                <version>${felix.utils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
                 <artifactId>org.apache.felix.webconsole</artifactId>
                 <version>${felix.webconsole.version}</version>
             </dependency>
diff --git a/karaf/shell/dev/pom.xml b/karaf/shell/dev/pom.xml
index 8781ff2..15a4ca2 100644
--- a/karaf/shell/dev/pom.xml
+++ b/karaf/shell/dev/pom.xml
@@ -37,11 +37,6 @@
     </dependency>
 
     <dependency>
-        <groupId>org.apache.felix.karaf</groupId>
-        <artifactId>org.apache.felix.karaf.commons</artifactId>
-    </dependency>
-
-    <dependency>
         <groupId>org.ops4j.pax.url</groupId>
         <artifactId>pax-url-wrap</artifactId>
     </dependency>
@@ -56,7 +51,13 @@
         <groupId>org.apache.felix</groupId>
         <artifactId>org.osgi.compendium</artifactId>
         <scope>provided</scope>
-    </dependency>    
+    </dependency>
+
+    <dependency>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>org.apache.felix.utils</artifactId>
+        <scope>provided</scope>
+    </dependency>
   </dependencies>
 
   <build>
@@ -75,7 +76,10 @@
                           org.apache.felix.karaf.shell.console,
                           *
                       </Import-Package>
-                      <Private-Package>!*</Private-Package>
+                      <Private-Package>
+                          org.apache.felix.utils.version,
+                          !*
+                      </Private-Package>
                       <_versionpolicy>${bnd.version.policy}</_versionpolicy>
                   </instructions>
               </configuration>
diff --git a/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/ShowBundleTree.java b/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/ShowBundleTree.java
index c461274..5c2cbea 100644
--- a/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/ShowBundleTree.java
+++ b/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/ShowBundleTree.java
@@ -148,7 +148,7 @@
         boolean foundMatch = false;
         if (exporters != null) {
             for (ExportedPackage ep : exporters) {
-                if (i.getVersion().isInRange(ep.getVersion())) {
+                if (i.getVersion().contains(ep.getVersion())) {
                     if (bundle.equals(ep.getExportingBundle())) {
                         foundMatch = true;
                     } else {
diff --git a/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/util/Import.java b/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/util/Import.java
index 3215707..66ee9c4 100644
--- a/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/util/Import.java
+++ b/karaf/shell/dev/src/main/java/org/apache/felix/karaf/shell/dev/util/Import.java
@@ -19,7 +19,7 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.felix.karaf.commons.osgi.VersionRange;
+import org.apache.felix.utils.version.VersionRange;
 
 /**
  * Simple class to model an OSGi Import-Package
@@ -42,7 +42,7 @@
         if (value.contains("version=")) {
             this.version = extractVersion(value);
         } else {
-            this.version = VersionRange.infiniteRange;
+            this.version = VersionRange.ANY_VERSION;
         }
     }
 
@@ -53,9 +53,9 @@
         int begin = value.indexOf("version=") + 8;
         int end = value.indexOf(";", begin);
         if (end < 0) {
-            return VersionRange.parse(unquote(value.substring(begin)));
+            return VersionRange.parseVersionRange(unquote(value.substring(begin)));
         } else {
-            return VersionRange.parse(unquote(value.substring(begin, end)));
+            return VersionRange.parseVersionRange(unquote(value.substring(begin, end)));
         }
     }
 
diff --git a/karaf/shell/dev/src/test/java/org/apache/felix/karaf/shell/dev/util/ImportTest.java b/karaf/shell/dev/src/test/java/org/apache/felix/karaf/shell/dev/util/ImportTest.java
index 8a2aa14..f8edd13 100644
--- a/karaf/shell/dev/src/test/java/org/apache/felix/karaf/shell/dev/util/ImportTest.java
+++ b/karaf/shell/dev/src/test/java/org/apache/felix/karaf/shell/dev/util/ImportTest.java
@@ -21,7 +21,7 @@
 import static junit.framework.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-import org.apache.felix.karaf.commons.osgi.VersionRange;
+import org.apache.felix.utils.version.VersionRange;
 import org.junit.Test;
 
 /**
@@ -39,7 +39,7 @@
     public void createWithPackageNameAndVersion() {
         Import i = new Import("org.wip.bar;version=\"2.0.0\"");
         assertEquals("org.wip.bar", i.getPackage());
-        assertEquals(VersionRange.parse("2.0.0"), i.getVersion());
+        assertEquals(VersionRange.parseVersionRange("2.0.0"), i.getVersion());
     }
 
     @Test
