diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java
index b213968..4119428 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java
@@ -42,11 +42,10 @@
 import org.apache.felix.scrplugin.helper.ComponentContainer;
 import org.apache.felix.scrplugin.helper.DescriptionContainer;
 import org.apache.felix.scrplugin.helper.IssueLog;
+import org.apache.felix.scrplugin.helper.MetatypeAttributeDefinition;
+import org.apache.felix.scrplugin.helper.MetatypeContainer;
 import org.apache.felix.scrplugin.helper.StringUtils;
 import org.apache.felix.scrplugin.helper.Validator;
-import org.apache.felix.scrplugin.om.metatype.AttributeDefinition;
-import org.apache.felix.scrplugin.om.metatype.Designate;
-import org.apache.felix.scrplugin.om.metatype.OCD;
 import org.apache.felix.scrplugin.xml.ComponentDescriptorIO;
 import org.apache.felix.scrplugin.xml.MetaTypeIO;
 import org.osgi.service.cm.ConfigurationAdmin;
@@ -289,11 +288,11 @@
         final ComponentContainer container = new ComponentContainer(desc, componentDesc);
 
         // Create metatype (if required)
-        final OCD ocd;
+        final MetatypeContainer ocd;
         if ( !componentDesc.isAbstract() && componentDesc.isCreateMetatype() ) {
             // OCD
-            ocd = new OCD();
-            container.setOCD( ocd );
+            ocd = new MetatypeContainer();
+            container.setMetatypeContainer( ocd );
             ocd.setId( componentDesc.getName() );
             if ( componentDesc.getLabel() != null ) {
                 ocd.setName( componentDesc.getLabel() );
@@ -306,15 +305,10 @@
                 ocd.setDescription( "%" + componentDesc.getName() + ".description");
             }
 
-            // Designate
-            final Designate designate = new Designate();
-            container.setDesignate( designate );
-            designate.setPid( componentDesc.getName() );
-
             // Factory pid
             if ( componentDesc.isSetMetatypeFactoryPid() ) {
                 if ( componentDesc.getFactory() == null ) {
-                    designate.setFactoryPid( componentDesc.getName() );
+                    ocd.setFactoryPid( componentDesc.getName() );
                 } else {
                     iLog.addWarning( "Component factory " + componentDesc.getName()
                         + " should not set metatype factory pid.", desc.getSource() );
@@ -424,7 +418,7 @@
     private void processProperties(
                     final ClassDescription current,
                     final ComponentContainer component,
-                    final OCD ocd) {
+                    final MetatypeContainer ocd) {
         for(final PropertyDescription pd : current.getDescriptions(PropertyDescription.class)) {
 
             if ( this.testProperty(current, component.getProperties(), pd, current == component.getClassDescription()) && ocd != null) {
@@ -448,7 +442,7 @@
                     }
                 }
                 if ( !isPrivate ) {
-                    final AttributeDefinition ad = new AttributeDefinition();
+                    final MetatypeAttributeDefinition ad = new MetatypeAttributeDefinition();
                     ocd.getProperties().add(ad);
                     ad.setId(pd.getName());
                     ad.setType(pd.getType().name());
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ComponentContainer.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ComponentContainer.java
index cf524dc..4dc069e 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ComponentContainer.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ComponentContainer.java
@@ -26,8 +26,6 @@
 import org.apache.felix.scrplugin.description.PropertyDescription;
 import org.apache.felix.scrplugin.description.ReferenceDescription;
 import org.apache.felix.scrplugin.description.ServiceDescription;
-import org.apache.felix.scrplugin.om.metatype.Designate;
-import org.apache.felix.scrplugin.om.metatype.OCD;
 
 
 /**
@@ -56,11 +54,8 @@
     /** All properties. */
     private final Map<String, PropertyDescription> allProperties = new LinkedHashMap<String, PropertyDescription>();
 
-    /** Metatype: OCD. */
-    private OCD ocd;
-
-    /** Metatype: Designate. */
-    private Designate designate;
+    /** Metatype container. */
+    private MetatypeContainer metatype;
 
     /**
      * Create a new component container
@@ -132,19 +127,11 @@
                         + allProperties + "]";
     }
 
-    public OCD getOCD() {
-        return ocd;
+    public MetatypeContainer getMetatypeContainer() {
+        return this.metatype;
     }
 
-    public void setOCD(final OCD ocd) {
-        this.ocd = ocd;
-    }
-
-    public Designate getDesignate() {
-        return designate;
-    }
-
-    public void setDesignate(final Designate designate) {
-        this.designate = designate;
+    public void setMetatypeContainer(final MetatypeContainer ocd) {
+        this.metatype = ocd;
     }
 }
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/AttributeDefinition.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/MetatypeAttributeDefinition.java
similarity index 85%
rename from scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/AttributeDefinition.java
rename to scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/MetatypeAttributeDefinition.java
index c32ccb1..0d096fe 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/AttributeDefinition.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/MetatypeAttributeDefinition.java
@@ -16,29 +16,29 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.scrplugin.om.metatype;
+package org.apache.felix.scrplugin.helper;
 
 import java.util.Map;
 
-public class AttributeDefinition {
+public class MetatypeAttributeDefinition {
 
-    public static final String DEFAULT_TYPE = "String";
+    private static final String DEFAULT_TYPE = "String";
 
-    protected String id;
+    private String id;
 
-    protected String type = DEFAULT_TYPE;
+    private String type = DEFAULT_TYPE;
 
-    protected String defaultValue;
+    private String defaultValue;
 
-    protected String name;
+    private String name;
 
-    protected String[] defaultMultiValue;
+    private String[] defaultMultiValue;
 
-    protected String description;
+    private String description;
 
-    protected Integer cardinality;
+    private Integer cardinality;
 
-    protected Map<String, String> options;
+    private Map<String, String> options;
 
     public String getId() {
         return this.id;
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/OCD.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/MetatypeContainer.java
similarity index 72%
rename from scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/OCD.java
rename to scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/MetatypeContainer.java
index f167d49..08c18b9 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/OCD.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/MetatypeContainer.java
@@ -16,20 +16,22 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.scrplugin.om.metatype;
+package org.apache.felix.scrplugin.helper;
 
 import java.util.ArrayList;
 import java.util.List;
 
-public class OCD {
+public class MetatypeContainer {
 
-    protected String id;
+    private String id;
 
-    protected String name;
+    private String name;
 
-    protected String description;
+    private String description;
 
-    protected List<AttributeDefinition> properties = new ArrayList<AttributeDefinition>();
+    private String factoryPid;
+
+    private final List<MetatypeAttributeDefinition> properties = new ArrayList<MetatypeAttributeDefinition>();
 
     public String getId() {
         return this.id;
@@ -55,11 +57,15 @@
         this.description = description;
     }
 
-    public List<AttributeDefinition> getProperties() {
+    public List<MetatypeAttributeDefinition> getProperties() {
         return this.properties;
     }
 
-    public void setProperties(List<AttributeDefinition> properties) {
-        this.properties = properties;
+    public String getFactoryPid() {
+        return this.factoryPid;
+    }
+
+    public void setFactoryPid(String pid) {
+        this.factoryPid = pid;
     }
 }
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/Designate.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/Designate.java
deleted file mode 100644
index b2d86c4..0000000
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/metatype/Designate.java
+++ /dev/null
@@ -1,42 +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.scrplugin.om.metatype;
-
-public class Designate {
-
-    protected String pid;
-
-    protected String factoryPid;
-
-    public String getPid() {
-        return this.pid;
-    }
-
-    public void setPid(String pid) {
-        this.pid = pid;
-    }
-
-    public String getFactoryPid() {
-        return this.factoryPid;
-    }
-
-    public void setFactoryPid(String pid) {
-        this.factoryPid = pid;
-    }
-}
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/xml/MetaTypeIO.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/xml/MetaTypeIO.java
index 9d788ac..7fbe7dd 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/xml/MetaTypeIO.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/xml/MetaTypeIO.java
@@ -29,10 +29,9 @@
 import org.apache.felix.scrplugin.SCRDescriptorException;
 import org.apache.felix.scrplugin.helper.ComponentContainer;
 import org.apache.felix.scrplugin.helper.DescriptionContainer;
+import org.apache.felix.scrplugin.helper.MetatypeAttributeDefinition;
+import org.apache.felix.scrplugin.helper.MetatypeContainer;
 import org.apache.felix.scrplugin.helper.StringUtils;
-import org.apache.felix.scrplugin.om.metatype.AttributeDefinition;
-import org.apache.felix.scrplugin.om.metatype.Designate;
-import org.apache.felix.scrplugin.om.metatype.OCD;
 import org.osgi.service.metatype.MetaTypeService;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
@@ -77,7 +76,7 @@
     throws SCRDescriptorException {
         int metatypeCount = 0;
         for(final ComponentContainer component : module.getComponents()) {
-            if ( component.getOCD() != null ) {
+            if ( component.getMetatypeContainer() != null ) {
                 metatypeCount++;
             }
         }
@@ -134,9 +133,9 @@
         IOUtils.newline(contentHandler);
 
         for(final ComponentContainer comp : metaData.getComponents()) {
-            if ( comp.getOCD() != null ) {
-                generateXML(comp.getOCD(), contentHandler);
-                generateXML(comp.getDesignate(), contentHandler);
+            if ( comp.getMetatypeContainer() != null ) {
+                generateOCDXML(comp.getMetatypeContainer(), contentHandler);
+                generateDesignateXML(comp.getMetatypeContainer(), contentHandler);
             }
         }
 
@@ -147,7 +146,7 @@
         contentHandler.endDocument();
     }
 
-    private static void generateXML(OCD ocd, ContentHandler contentHandler)
+    private static void generateOCDXML(final MetatypeContainer ocd, final ContentHandler contentHandler)
     throws SAXException {
         final AttributesImpl ai = new AttributesImpl();
         IOUtils.addAttribute(ai, "id", ocd.getId());
@@ -158,10 +157,10 @@
 
         if ( ocd.getProperties().size() > 0 ) {
             IOUtils.newline(contentHandler);
-            final Iterator<AttributeDefinition> i = ocd.getProperties().iterator();
+            final Iterator<MetatypeAttributeDefinition> i = ocd.getProperties().iterator();
             while ( i.hasNext() ) {
-                final AttributeDefinition ad = i.next();
-                generateXML(ad, contentHandler);
+                final MetatypeAttributeDefinition ad = i.next();
+                generateAttributeXML(ad, contentHandler);
             }
             IOUtils.indent(contentHandler, 1);
         }
@@ -170,7 +169,7 @@
         IOUtils.newline(contentHandler);
     }
 
-    private static void generateXML(AttributeDefinition ad, ContentHandler contentHandler)
+    private static void generateAttributeXML(final MetatypeAttributeDefinition ad, final ContentHandler contentHandler)
     throws SAXException {
         final AttributesImpl ai = new AttributesImpl();
         IOUtils.addAttribute(ai, "id", ad.getId());
@@ -212,10 +211,10 @@
         IOUtils.newline(contentHandler);
     }
 
-    private static void generateXML(final Designate designate, final ContentHandler contentHandler)
+    private static void generateDesignateXML(final MetatypeContainer designate, final ContentHandler contentHandler)
     throws SAXException {
         final AttributesImpl ai = new AttributesImpl();
-        IOUtils.addAttribute(ai, "pid", designate.getPid());
+        IOUtils.addAttribute(ai, "pid", designate.getId());
         IOUtils.addAttribute(ai, "factoryPid", designate.getFactoryPid());
         IOUtils.indent(contentHandler, 1);
         contentHandler.startElement(INNER_NAMESPACE_URI, DESIGNATE_ELEMENT, DESIGNATE_ELEMENT_QNAME, ai);
@@ -228,10 +227,10 @@
         IOUtils.newline(contentHandler);
     }
 
-    private static void generateObjectXML(final Designate obj, final ContentHandler contentHandler)
+    private static void generateObjectXML(final MetatypeContainer obj, final ContentHandler contentHandler)
     throws SAXException {
         final AttributesImpl ai = new AttributesImpl();
-        IOUtils.addAttribute(ai, "ocdref", obj.getPid());
+        IOUtils.addAttribute(ai, "ocdref", obj.getId());
         IOUtils.indent(contentHandler, 2);
         contentHandler.startElement(INNER_NAMESPACE_URI, OBJECT_ELEMENT, OBJECT_ELEMENT_QNAME, ai);
         contentHandler.endElement(INNER_NAMESPACE_URI, OBJECT_ELEMENT, OBJECT_ELEMENT_QNAME);
