Merge branch 'release/3.0.0-RC2'
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index b5ac8d6..5e870a5 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -28,12 +28,12 @@
 dependencies {
   compile gradleApi()
   compile localGroovy()
-  compile 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.3.0'
+  compile 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.3.1'
   compile 'gradle.plugin.org.nosphere.honker:honker-gradle:0.3.0'
   compile 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
   compile 'org.apache.httpcomponents:httpclient:4.5.2'
   compile 'org.apache.httpcomponents:httpmime:4.5.2'
-  compile 'com.bmuschko:gradle-docker-plugin:3.0.5'
+  compile 'com.bmuschko:gradle-docker-plugin:3.0.7'
   compile 'com.moowork.gradle:gradle-node-plugin:1.1.1'
 
   testCompile 'junit:junit:4.12'
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy
index eb605c9..5653967 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy
@@ -19,14 +19,9 @@
 
 import groovy.transform.CompileStatic
 import org.apache.polygene.gradle.BasePlugin
-import org.apache.polygene.gradle.TaskGroups
 import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
 import org.apache.polygene.gradle.dependencies.DependenciesPlugin
-import org.gradle.api.Action
-import org.gradle.api.JavaVersion
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.Task
+import org.gradle.api.*
 import org.gradle.api.plugins.JavaPluginConvention
 import org.gradle.api.plugins.osgi.OsgiManifest
 import org.gradle.api.tasks.bundling.AbstractArchiveTask
@@ -35,6 +30,7 @@
 import org.gradle.api.tasks.testing.logging.TestExceptionFormat
 import org.gradle.jvm.tasks.Jar
 import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
+import org.gradle.testing.jacoco.tasks.JacocoCoverageVerification
 import org.gradle.testing.jacoco.tasks.JacocoReport
 
 @CompileStatic
@@ -175,9 +171,11 @@
     project.plugins.apply 'jacoco'
     def jacoco = project.extensions.getByType JacocoPluginExtension
     jacoco.toolVersion = dependencies.buildToolsVersions.jacoco
-    project.tasks.withType( JacocoReport ) { JacocoReport task ->
-      task.group = TaskGroups.VERIFICATION
-      task.description = 'Generates test coverage report.'
+    project.tasks.withType( JacocoReport ) { Task task ->
+      task.group = null
+    }
+    project.tasks.withType( JacocoCoverageVerification ) { Task task ->
+      task.group = null
     }
   }
 
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy
index 9277e62..2f9284a 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy
@@ -25,6 +25,7 @@
 @CompileStatic
 class DependenciesDeclarationExtension
 {
+  String gradleVersion
   final Map<String, String> repositoriesUrls = [ : ]
   final Map<String, Object> libraries = [ : ]
   final Map<String, List<Object>> defaultDependencies = [ : ]
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/ProjectGroupTasks.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/ProjectGroupTasks.groovy
new file mode 100644
index 0000000..2bc42d7
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/ProjectGroupTasks.groovy
@@ -0,0 +1,36 @@
+/*
+ *  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.polygene.gradle.structure
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.TaskGroups
+import org.gradle.api.Project
+import org.gradle.api.Task
+
+@CompileStatic
+class ProjectGroupTasks
+{
+  static void configureProjectGroupTasks( String projectGroup, Project project )
+  {
+    project.tasks.create( "check${ projectGroup.capitalize() }" ) { Task task ->
+      task.group = TaskGroups.VERIFICATION
+      task.description = "Runs the $projectGroup checks"
+      task.dependsOn( project.tasks.getByName( "check" ) )
+    }
+  }
+}
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy
index 5b0c497..3f54424 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy
@@ -19,8 +19,11 @@
 
 import groovy.transform.CompileStatic
 import org.apache.polygene.gradle.BasePlugin
+import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
 import org.gradle.api.Plugin
 import org.gradle.api.Project
+import org.gradle.api.tasks.wrapper.Wrapper
+import org.gradle.util.GradleVersion
 
 @CompileStatic
 class RootPlugin implements Plugin<Project>
@@ -34,6 +37,7 @@
   {
     project.plugins.apply BasePlugin
     applyProjectMetadata( project )
+    applyGradleWrapper( project )
   }
 
   private static void applyProjectMetadata( Project project )
@@ -42,4 +46,23 @@
     extraProperties.set 'title', PROJECT_TITLE
     extraProperties.set 'description', PROJECT_DESCRIPTION
   }
+
+  private static void applyGradleWrapper( Project project )
+  {
+    def dependencies = project.extensions.getByType( DependenciesDeclarationExtension )
+    def requiredGradleVersion = GradleVersion.version( dependencies.gradleVersion )
+    def currentGradleVersion = GradleVersion.current()
+    if( currentGradleVersion != requiredGradleVersion ) {
+      def warning = "The Apache Polygene™ build is not supported with $currentGradleVersion. " +
+                    "The only supported version is $requiredGradleVersion."
+      project.logger.error( warning )
+      project.gradle.buildFinished {
+        project.logger.error( warning )
+      }
+    }
+    project.tasks.create( 'wrapper', Wrapper) { Wrapper wrapper ->
+      wrapper.gradleVersion = dependencies.gradleVersion
+      wrapper.distributionType = Wrapper.DistributionType.ALL
+    }
+  }
 }
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy
index a07d88f..c75ec77 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy
@@ -23,6 +23,8 @@
 import org.gradle.api.Project
 import org.gradle.api.tasks.compile.JavaCompile
 
+import static org.apache.polygene.gradle.structure.ProjectGroupTasks.configureProjectGroupTasks
+
 @CompileStatic
 class CorePlugin implements Plugin<Project>
 {
@@ -31,6 +33,7 @@
   {
     project.plugins.apply PublishedCodePlugin
     configureJava( project )
+    configureProjectGroupTasks( "core", project )
   }
 
   private static void configureJava( Project project )
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy
index 46233ce..c4d9c35 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy
@@ -19,7 +19,6 @@
 
 import groovy.transform.CompileStatic
 import groovy.transform.TypeCheckingMode
-import org.apache.commons.io.FileUtils
 import org.apache.polygene.gradle.BasePlugin
 import org.apache.polygene.gradle.TaskGroups
 import org.apache.polygene.gradle.code.PublishedCodePlugin
@@ -52,6 +51,7 @@
 import org.gradle.plugins.ide.internal.resolver.model.IdeExtendedRepoFileDependency
 import org.gradle.plugins.signing.Sign
 import org.gradle.plugins.signing.SigningExtension
+import org.gradle.process.ExecSpec
 
 import java.nio.file.Files
 import java.nio.file.Path
@@ -118,6 +118,7 @@
   private static void applySourceDistribution( Project project )
   {
     def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
+    def dependenciesDeclaration = project.rootProject.extensions.getByType( DependenciesDeclarationExtension )
     def srcDistFilesCopySpec = project.copySpec { CopySpec spec ->
       spec.from project.rootProject.projectDir
       spec.include '*.txt'
@@ -133,8 +134,8 @@
       }
       spec.include 'distributions/**'
       spec.include 'reports/**'
-      spec.include 'release/**'
       spec.include 'internals/**'
+      spec.include 'release/**'
       spec.include 'manual/**'
       spec.include 'samples/**'
       spec.include 'tests/**'
@@ -147,7 +148,8 @@
       spec.exclude '**/.git*'                // Git files
       spec.exclude '**/build/**'             // Build output
       spec.exclude 'gradlew*'                // Gradle wrapper scripts
-      spec.exclude 'gradle/wrapper/*.jar'    // Gradle wrapper JAR
+      spec.exclude 'gradle/wrapper/**'       // Gradle wrapper
+      spec.exclude 'tools/generator-polygene/app/templates/buildtool/wrapper' // Project Generator Gradle wrapper
       spec.exclude '**/.gradle/**'           // Gradle caches
       spec.exclude '**/.gradletasknamecache' // Gradle shell completion cache
       spec.exclude '**/node_modules/**'      // Node's node_module dir
@@ -168,6 +170,7 @@
     def srcDistSupplementaryFilesCopySpec = project.copySpec { CopySpec spec ->
       spec.from project.file( 'src/src-dist' )
       spec.into '.'
+      spec.filter { String line -> line.replaceAll( '%REQUIRED_GRADLE_VERSION%', dependenciesDeclaration.gradleVersion ) }
     }
     def srcDistFilteredFilesTask = project.tasks.create 'srcDistFilteredFiles'
     srcDistFilteredFilesTask.description = 'Apply release specification to source distribution build scripts'
@@ -248,6 +251,9 @@
       task.group = TaskGroups.DISTRIBUTION_VERIFICATION
       task.description = 'Checks the source distribution using Apache RAT.'
       task.dependsOn TaskNames.STAGE_SOURCE_DIST
+      task.plainOutput = true
+      task.htmlOutput = true
+      task.xmlOutput = false
       task.setInputDir unpackedSrcDistDir.absolutePath
       task.onlyIf { !releaseSpec.developmentVersion }
       task.excludes = [
@@ -278,15 +284,13 @@
         // Graphic Resources
         '**/*.svg', '**/*.gif', '**/*.png', '**/*.jpg', '**/*.psd',
         // Keystores
-        '**/*.jceks',
+        '**/*.jceks', '**/*.p12',
         // Syntax Highlighter - MIT
         'manual/**/sh*.css', 'manual/**/sh*.js',
         // jQuery & plugins - MIT
         'manual/**/jquery*.js',
         // W3C XML Schemas - W3C Software License
         'samples/rental/src/main/resources/*.xsd',
-        // Polygene Generator Heroes Templates - MIT
-        'tools/generator-polygene/app/templates/Heroes/**',
       ]
     } as Action<RatTask> )
     project.tasks.create( TaskNames.INSPECT_SOURCE_DIST ) { Task task ->
@@ -302,26 +306,44 @@
         assertFileAbsent 'gradlew'
         assertFileAbsent 'gradlew.bat'
         assertFileAbsent 'gradle/wrapper/gradle-wrapper.jar'
-        assertFilePresent 'gradle/wrapper/gradle-wrapper.properties'
+        assertFileAbsent 'gradle/wrapper/gradle-wrapper.properties'
+        assertFilePresent 'gradle/wrapper-install/build.gradle'
+
+        def wrapperFiles = []
+        unpackedSrcDistDir.traverse { File file ->
+          if(file.file &&
+             (file.name.contains( 'gradle-wrapper' ) || file.name.contains('gradlew'))) {
+            wrapperFiles << file
+          }
+        }
+        assert wrapperFiles.empty
       }
     }
     project.tasks.create( TaskNames.BUILD_SOURCE_DIST, ExecLogged, { ExecLogged task ->
       task.group = TaskGroups.DISTRIBUTION_VERIFICATION
-      task.description = 'Checks the source distribution by running `gradle build` inside.'
+      task.description = 'Checks the source distribution by running `gradle check assemble` inside.'
       task.dependsOn TaskNames.STAGE_SOURCE_DIST
       task.mustRunAfter TaskNames.RAT_SOURCE_DIST
       task.mustRunAfter TaskNames.INSPECT_SOURCE_DIST
       def workDir = project.file( "$project.buildDir/tmp/${ TaskNames.BUILD_SOURCE_DIST }" )
       task.inputs.dir unpackedSrcDistDir
       task.workingDir = workDir
-      def gradlew = new File( project.rootDir, 'gradlew' ).absolutePath
+      def gradlew = new File( workDir, 'gradlew' ).absolutePath
       def settings = new File( workDir, 'settings.gradle' ).absolutePath
-      task.commandLine = [ gradlew, '-c', settings, 'build', '-u', '-s', /* '-g', workDir */ ]
+      task.commandLine = [ gradlew, '-c', settings, 'check', 'assemble', '-u', '-s', /* '-g', workDir */ ]
       task.doFirst {
         project.copy { CopySpec spec ->
           spec.from unpackedSrcDistDir
           spec.into workDir
         }
+        def logName = "${ TaskNames.BUILD_SOURCE_DIST }_installWrapper"
+        def stdout = project.file( "${ project.buildDir }/log/$logName/$logName-stdout.log" )
+        def stderr = project.file( "${ project.buildDir }/log/$logName/$logName-stderr.log" )
+        def rootGradlew = new File( project.rootDir, 'gradlew' ).absolutePath
+        ExecLogged.execLogged( project, stdout, stderr, { ExecSpec spec ->
+          spec.workingDir = workDir
+          spec.commandLine = [ rootGradlew, '-i', '-s', '-b', 'gradle/wrapper-install/build.gradle', 'install' ]
+        } as Action )
       }
       task.doLast {
         if( workDir.exists() )
@@ -359,16 +381,8 @@
       }
       spec.into '.'
     }
-    def extraDistBinCopySpec = project.copySpec { CopySpec spec ->
-      releaseSpec.publishedProjects.collect { p ->
-        spec.from "$p.projectDir/src/dist/"
-        spec.include '**/*.jar'
-        spec.include '**/*.jar_'
-      }
-      spec.into '.'
-    }
     def binDistNoticesCopySpec = project.copySpec { CopySpec spec ->
-      spec.from "$project.projectDir/LICENSE.txt"
+      spec.from "$project.rootProject.projectDir/LICENSE.txt"
       spec.from "$project.projectDir/src/bin-dist"
       spec.into '.'
     }
@@ -377,7 +391,6 @@
       spec.with binDistNoticesCopySpec
       spec.with docsCopySpec
       spec.with extraDistTextCopySpec
-      spec.with extraDistBinCopySpec
       spec.with libsCopySpec
     }
 
@@ -426,6 +439,9 @@
       task.description = "Checks the binary distribution using Apache RAT."
       task.onlyIf { !releaseSpec.developmentVersion }
       task.dependsOn TaskNames.STAGE_BINARY_DIST
+      task.plainOutput = true
+      task.htmlOutput = true
+      task.xmlOutput = false
       task.inputDir = unpackedBinDistDir.absolutePath
       task.reportDir = project.file( 'build/reports/rat-bin-dist' )
       task.excludes = [
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy
index 735952c..5bf0e66 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy
@@ -22,6 +22,8 @@
 import org.gradle.api.Plugin
 import org.gradle.api.Project
 
+import static org.apache.polygene.gradle.structure.ProjectGroupTasks.configureProjectGroupTasks
+
 @CompileStatic
 class ExtensionPlugin implements Plugin<Project>
 {
@@ -29,5 +31,6 @@
   void apply( Project project )
   {
     project.plugins.apply PublishedCodePlugin
+    configureProjectGroupTasks( "extensions", project )
   }
 }
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalDockerPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalDockerPlugin.groovy
index d9dfa93..ac22b9f 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalDockerPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalDockerPlugin.groovy
@@ -76,7 +76,7 @@
         project.rootProject.extensions.extraProperties.set( CodePlugin.DOCKER_DISABLED_EXTRA_PROPERTY, true )
         if( project.hasProperty( 'skipDocker' ) )
         {
-            project.logger.lifecycle 'skipDocker property is set, all Docker tasks will be SKIPPED'
+          project.logger.lifecycle 'skipDocker property is set, all Docker tasks will be SKIPPED'
         }
         else if( project.logger.isEnabled( LogLevel.INFO ) )
         {
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy
index baa8842..e667eb2 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy
@@ -25,9 +25,9 @@
 @CompileStatic
 class InternalPlugin implements Plugin<Project>
 {
-  @Override
-  void apply( Project project )
-  {
-    project.plugins.apply CodePlugin
-  }
+    @Override
+    void apply( Project project )
+    {
+        project.plugins.apply CodePlugin
+    }
 }
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy
index 7603e8b..0abce5d 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy
@@ -17,15 +17,20 @@
  */
 package org.apache.polygene.gradle.structure.libraries
 
+import groovy.transform.CompileStatic
 import org.apache.polygene.gradle.code.PublishedCodePlugin
 import org.gradle.api.Plugin
 import org.gradle.api.Project
 
+import static org.apache.polygene.gradle.structure.ProjectGroupTasks.configureProjectGroupTasks
+
+@CompileStatic
 class LibraryPlugin implements Plugin<Project>
 {
   @Override
   void apply( Project project )
   {
     project.plugins.apply PublishedCodePlugin
+    configureProjectGroupTasks( "libraries", project )
   }
 }
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy
index 3a9216c..b73fbb6 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy
@@ -35,7 +35,6 @@
     def task = project.tasks.create( TASK_NAME )
     task.group = TaskGroups.DOCUMENTATION
     task.description = 'Generates asciidoc artifact snippet'
-    task.inputs.properties.put 'artifactId', PublishNaming.publishedNameFor( project.path )
     task.doLast {
       buildInfoDir.mkdirs()
 
@@ -53,10 +52,9 @@
     }
 
     // Declare inputs/outputs
-    if( project.getBuildFile() != null && project.getBuildFile().exists() )
-    {
-      task.getInputs().file( project.getBuildFile() )
-    }
-    task.getOutputs().file( buildInfoDir )
+    task.inputs.property( 'groupId', project.group )
+    task.inputs.property( 'artifactId', PublishNaming.publishedNameFor( project.path ) )
+    task.inputs.property( 'version', project.version )
+    task.outputs.file( buildInfoDir )
   }
 }
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy
index a0ef741..3494cab 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy
@@ -206,6 +206,7 @@
       // TODO SVN checkout ASF distribution directory
       task.enabled = false
     }
+    // TODO Split website and javadoc copy and use Sync task instead
     def copy = project.tasks.create( TaskNames.COPY_ASF_DIST, Copy ) { Copy task ->
       task.mustRunAfter checkout
       // TODO Consume distributions through configurations
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy
index ba1b8f2..5b7232e 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy
@@ -66,7 +66,7 @@
       sourceDirs.findAll { it.directory }.collect { it.absolutePath }
     }
     def classesDirsOf = { List<SourceSet> sourceSets ->
-      def classesDirs = sourceSets.collect { it.output.classesDir } as List<File>
+      def classesDirs = sourceSets.collect { it.output.classesDirs.files }.flatten() as List<File>
       classesDirs.findAll { it.directory }.collect { it.absolutePath }
     }
 
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy
index 6970463..09094d8 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy
@@ -22,6 +22,8 @@
 import org.gradle.api.Plugin
 import org.gradle.api.Project
 
+import static org.apache.polygene.gradle.structure.ProjectGroupTasks.configureProjectGroupTasks
+
 @CompileStatic
 class SamplePlugin implements Plugin<Project>
 {
@@ -29,5 +31,6 @@
   void apply( Project project )
   {
     project.plugins.apply CodePlugin
+    configureProjectGroupTasks( "samples", project )
   }
 }
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy
index 3b10b2f..48db0ad 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy
@@ -54,7 +54,7 @@
       task.description = 'Runs performance tests.'
       task.maxParallelForks = 1
       task.forkEvery = 1L
-      task.testClassesDir = sourceSets.getByName( 'perf' ).output.classesDir
+      task.testClassesDirs = sourceSets.getByName( 'perf' ).output.classesDirs
       task.classpath = sourceSets.getByName( 'perf' ).runtimeClasspath
       task.systemProperty 'jar.path', ( project.tasks.getByName( 'jar' ) as Jar ).archivePath
     } as Action<Test> )
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy
index a57a129..eb5740b 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy
@@ -21,11 +21,14 @@
 import org.gradle.api.Plugin
 import org.gradle.api.Project
 
+import static org.apache.polygene.gradle.structure.ProjectGroupTasks.configureProjectGroupTasks
+
 class ToolPlugin implements Plugin<Project>
 {
   @Override
   void apply( Project project )
   {
     project.plugins.apply PublishedCodePlugin
+    configureProjectGroupTasks( "tools", project )
   }
 }
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy
index a831fd8..1dacd3f 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy
@@ -22,6 +22,8 @@
 import org.gradle.api.Plugin
 import org.gradle.api.Project
 
+import static org.apache.polygene.gradle.structure.ProjectGroupTasks.configureProjectGroupTasks
+
 @CompileStatic
 class TutorialPlugin implements Plugin<Project>
 {
@@ -29,5 +31,6 @@
   void apply( Project project )
   {
     project.plugins.apply CodePlugin
+    configureProjectGroupTasks( "tutorials", project )
   }
 }
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties
index 2749ce9..8741472 100644
--- a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties
@@ -15,4 +15,4 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #
-implementation-class=org.apache.polygene.gradle.structure.internals.InternalPlugin
+implementation-class=org.apache.polygene.gradle.structure.internals.InternalPlugin
\ No newline at end of file
diff --git a/core/api/build.gradle b/core/api/build.gradle
index 67c5f96..8e8cc7e 100644
--- a/core/api/build.gradle
+++ b/core/api/build.gradle
@@ -24,6 +24,7 @@
 
 dependencies {
   testImplementation polygene.core.testsupport
+  testImplementation polygene.extension( 'serialization-javaxjson' )
   testImplementation polygene.library( 'constraints' )
 
   testRuntimeOnly polygene.core.runtime
diff --git a/core/api/src/docs/api.txt b/core/api/src/docs/api.txt
index fa7188e..0523cb6 100644
--- a/core/api/src/docs/api.txt
+++ b/core/api/src/docs/api.txt
@@ -62,7 +62,7 @@
 
 :leveloffset: {level3}
 
-// include::dependency-injection.txt[]
+include::dependency-injection.txt[]
 
 :leveloffset: {level3}
 
diff --git a/core/api/src/docs/composition.txt b/core/api/src/docs/composition.txt
index 1a60a3a..895cca0 100644
--- a/core/api/src/docs/composition.txt
+++ b/core/api/src/docs/composition.txt
@@ -23,15 +23,7 @@
 Composition will allow library authors a new level of flexibility in how functionality is provided to client code. More
 on that later.
 
-== Fragments ==
-
-There are 4 types of Fragments in Polygene;
-
-    * <<core-api-mixin>> - The state carrying part of a Composite.
-    * <<core-api-constraint>> - Rules for in and out arguments, typically used for validation.
-    * <<core-api-concern>> - Interceptor of method calls. General purpose use, often for cross-cutting behaviors.
-    * <<core-api-sideeffect>> - Executed after the method call has been completed, and unable to influence the
-    outcome of the method call.
+include::fragment.txt[]
 
 == Composites ==
 
diff --git a/core/api/src/docs/dependency-injection.txt b/core/api/src/docs/dependency-injection.txt
index fc7aac6..d9fabca 100644
--- a/core/api/src/docs/dependency-injection.txt
+++ b/core/api/src/docs/dependency-injection.txt
@@ -16,3 +16,139 @@
  * specific language governing permissions and limitations
  * under the License.
 ///////////////////////////////////////////////////////////////
+
+[[core-api-dependency-injection,Dependency Injection]]
+= Dependency Injection =
+
+Polygene has a rather sophisticated dependency injection system, which is based around the <<core-api-modules>>
+and <<core-api-visibility>> concepts. The dependency injection system also need help to keep the injection scopes
+separated. The following injection scopes exists, some more common than others;
+
+    * ++@This++ - injection of fragment from the same Composite instance.
+    * ++@Structure++ - injection of <<core-api-structure>> organized types.
+    * ++@Service++ - injection of services.
+    * ++@Uses++ - injection of construction injected objects
+    * ++@Invocation++ - injection of parts related to the current method invocation.
+    * ++@State++ - injection of state of the composite instance
+    * Custom injection scopes - managed through ++@AppliesTo++ and ++AppliesToFilter++ declarations.
+
+[[core-api-this,@This]]
+== @This ==
+++@This++ is equivalent to the ++this++ pointer in the Java language, but refers to any part of the current
+<<core-api-composite>>. This can either be a declared mixin type, or if not declared will be a <<def-private-mixin>>.
+
+=== Example ===
+
+We can simply request the injection of any type of the composite that we belong to, such as;
+
+[source,java]
+--------------
+@Mixins( { OrderMixin.class, ShippingMixin.class } )
+public interface Order extends HasShippingInformation
+{
+   :
+}
+
+public abstract class OrderMixin
+    implements Order
+{
+    @This
+    private HasShippingInformation shipping;
+}
+--------------
+
+But we can have <<def-private-mixin>> instead, where the injected mixin type will be automatically added to the
+composite.
+
+[source,java]
+--------------
+@MIxins( OrderMixin.class )
+public interface Order
+{
+   :
+}
+
+public class OrderMixin
+    implements Order
+{
+    @This
+    private DiscountRate discount;
+--------------
+
+[[core-api-structure-injection,@Structure]]
+== @Structure ==
+The ++@Structure++ injection scope is all about the types involved in the Application <<core-api-structure>> system.
+The possible types are;
+
+    * Application
+    * ApplicationDescriptor
+    * Layer
+    * LayerDescriptor
+    * Module
+    * ModuleDescriptor
+    * ModuleSPI
+    * UnitOfWorkFactory
+    * EntityBuilderFactory
+    * ValueBuilderFactory
+    * TransientBuilderFactory
+    * ObjectFactory
+    * QueryBuilderFactory
+    * ServiceFinder
+    * PolygeneAPI
+    * PolygeneSPI
+
+[[core-api-service,@Service]]
+== @Service ==
+Services are injected either in a number of ways, either direct, via List or via ServiceReference types. The following
+combinations are allowed;
+
+[source,java]
+--------------
+    @Service
+    private MyService service;
+
+    @Service
+    private Iterable<MyService> services;
+
+    @Service
+    private ServiceReference<MyService> service;
+
+    @Service
+    private Iterable<ServiceReference<MyService>> services;
+--------------
+
+If service is not declared ++instantiateOnStartup++ during assembly, then the service will be activated on first
+method invocation, and not on injection. This means that any reflection on the injected instance, may result in
+unexpected behavior.
+
+[[core-api-uses,@Uses]]
+== @Uses ==
+<<def-object>> and <<def-valuecomposite>> can be created with ++uses()++ declarations. This allows injection of
+arbitrary types to these meta types. Only type matching will occur, so for instance only one String can be injected
+this way.
+
+If a ++@Uses++ declaration can not be satisfied from the injected objects via ++uses()++ builder method, then
+if the ++@Uses++ injection is not ++@Optional++ the Polygene runtime will attempt to (in this order)
+
+    * Instantiate a visible <<def-transientcomposite>>
+    * Instantiate a visible <<def-object>>
+    * Instantiate a plain object with this Composite instance as a single constructor argument.
+
+If the ++@Uses++ is ++@Optional++ then no implict object creation will take place.
+
+[[core-api-invocation,@Invocation]]
+== @Invocation ==
+++@Invocation++ injection scope is all about the current method call. It is possible to inject the following types;
+
+    * The ++Method++ being executed.
+    * Any annotation type that the method is annotated with.
+    * An ++Iterable++ of either of the above
+
+[[core-api-state,@State]]
+== @State ==
+This injection scope can inject either a ++StateHolder++ which allows inspection of current state of the Composite,
+or it can inject any declared <<def-property>>, <<def-assocation>>, <<def-manyassociation>> or
+<<def-namedassociation>>.
+
+[[core-api-custom-injection,Custom Injection Scopes]]
+== Custom Injection Scopes ==
diff --git a/core/api/src/docs/fragment.txt b/core/api/src/docs/fragment.txt
index 3edbf3b..ef68223 100644
--- a/core/api/src/docs/fragment.txt
+++ b/core/api/src/docs/fragment.txt
@@ -12,7 +12,8 @@
 //////////////////////
 
 [[core-api-fragment,Fragment]]
-= Fragment =
+== Fragment ==
+
 Composites should be perceived as single units, although they consist of many Java classes and instances. Some of
 those Java instances are not even belonging to a particular instance in runtime, but such details can and should
 be ignored by the developer. Developers should think of the Composite as a single concept, and not be concerned
@@ -21,6 +22,13 @@
 The Composite is composed by declaring the parts it forms in the Composite Type interface declaration. Technically
 speaking, Composite Type is the only Fragment that is required to exist. The other Fragments are optional.
 
+There are 4 types of Fragments in Polygene;
+
+    * <<core-api-mixin>> - The state carrying part of a Composite.
+    * <<core-api-constraint>> - Rules for in and out arguments, typically used for validation.
+    * <<core-api-concern>> - Interceptor of method calls. General purpose use, often for cross-cutting behaviors.
+    * <<core-api-sideeffect>> - Executed after the method call has been completed, and unable to influence the outcome of the method call.
+
 There are one very important thing to know about Fragments;
 
 *ONLY Mixins can maintain inter-method state.*
diff --git a/core/api/src/docs/layer.txt b/core/api/src/docs/layer.txt
new file mode 100644
index 0000000..d3484f4
--- /dev/null
+++ b/core/api/src/docs/layer.txt
@@ -0,0 +1,24 @@
+//////////////////////
+ * Licensed 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.
+//////////////////////
+
+[[core-api-layer,Layer]]
+= Layer =
+A Polygene™ Application must consist of at least one layer. More layers are common, often dividing the application along the
+common architectural diagrams used on whiteboards, perhaps with a UI layer at the top, followed by a service or application
+layer, then with a domain layer and finally some persistence layer at the bottom.
+
+Polygene™ enforces this layering by requiring the <<core-bootstrap-assembly>> to declare which layer uses which other layer. And
+<<core-api-visibility>> rules define that layers below can not locate composites in layers above. Also, defining that
+"Layer1 uses Layer2" and "Layer2 uses Layer3" does NOT imply that Layer1 has <<core-api-visibility>> to Layer3. If that
+is wanted, then it must be declared explicitly.
+
diff --git a/core/api/src/docs/module.txt b/core/api/src/docs/module.txt
index eb191a9..4fd9fbf 100644
--- a/core/api/src/docs/module.txt
+++ b/core/api/src/docs/module.txt
@@ -11,3 +11,15 @@
  * and limitations under the License.
 //////////////////////
 
+[[core-api-module,Module]]
+= Module =
+Modules are logical compartments to assist developers in creating and maintaining well modularized code. A Module only
+belongs to a single Layer, but many Modules can exist in the same Layer. Composite access is limited to;
+
+    * Composites within the same Module, with Visibility set to Visibility.module (default).
+    * Composites from Modules in the same Layer, with Visibility set to Visibility.layer
+    * Composites from Modules in Layers below, with Visibility set to Visibility.application
+
+Modules contains a lot of the Polygene™ infrastructure, which are the enforcers of these wise modularization principles.
+
+It is not possible to modify the Modules, their resolution nor binding in any way after the application starts.
diff --git a/core/api/src/docs/serialization.txt b/core/api/src/docs/serialization.txt
index 07b2459..192c276 100644
--- a/core/api/src/docs/serialization.txt
+++ b/core/api/src/docs/serialization.txt
@@ -71,6 +71,7 @@
 
     . declare a ValueComposite,
     . assemble it,
+    . assemble default services including default `Serialization`,
     . create a new Value instance,
     . use the +ValueComposite#toString()+ method to get a JSON representation of the Value,
     . and finally, use the +Module#newValueFromSerializedState()+ method to create a new Value instance from the JSON
diff --git a/core/api/src/docs/structure.txt b/core/api/src/docs/structure.txt
index 04952fe..2c91e77 100644
--- a/core/api/src/docs/structure.txt
+++ b/core/api/src/docs/structure.txt
@@ -29,38 +29,9 @@
 Each Layer has to be declared which lower Layer(s) it uses, and it is not allowed that a lower Layer uses a higher
 Layer, i.e. cyclic references.
 
-[[core-api-application,Application]]
-= Application =
-Every Polygene™ runtime has _one and only one_ Application in it. It is possible to run multiple Polygene™ runtimes in the same
-JVM, and it is even possible to embed a Polygene™ runtime within a Polygene™ Application, but there can only be one Application
-in a Polygene™ runtime.
+include::application.txt[]
 
-An Application is then broken into layers and modules are placed within those layers. Composites are placed within
-modules. This forms the Application Structure and is enforced by the Polygene™ runtime.
+include::layer.txt[]
 
-[[core-api-layer,Layer]]
-= Layer =
-A Polygene™ Application must consist of at least one layer. More layers are common, often dividing the application along the
-common architectural diagrams used on whiteboards, perhaps with a UI layer at the top, followed by a service or application
-layer, then with a domain layer and finally some persistence layer at the bottom.
+include::module.txt[]
 
-Polygene™ enforces this layering by requiring the <<core-bootstrap-assembly>> to declare which layer uses which other layer. And
-<<core-api-visibility>> rules define that layers below can not locate composites in layers above. Also, defining that
-"Layer1 uses Layer2" and "Layer2 uses Layer3" does NOT imply that Layer1 has <<core-api-visibility>> to Layer3. If that
-is wanted, then it must be declared explicitly.
-
-[[core-api-module,Module]]
-= Module =
-Modules are logical compartments to assist developers in creating and maintaining well modularized code. A Module only
-belongs to a single Layer, but many Modules can exist in the same Layer. Composite access is limited to;
-
-    * Composites within the same Module, with Visibility set to Visibility.module (default).
-    * Composites from Modules in the same Layer, with Visibility set to Visibility.layer
-    * Composites from Modules in Layers below, with Visibility set to Visibility.application
-
-Modules contains a lot of the Polygene™ infrastructure, which are the enforcers of these wise modularization principles.
-
-It is not possible to modify the Modules, their resolution nor binding in any way after the application starts.
-
-[[core-api-visibility,Visibility]]
-= Visibility =
diff --git a/core/api/src/docs/visibility.txt b/core/api/src/docs/visibility.txt
new file mode 100644
index 0000000..c0dad46
--- /dev/null
+++ b/core/api/src/docs/visibility.txt
@@ -0,0 +1,16 @@
+//////////////////////
+ * Licensed 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.
+//////////////////////
+
+[[core-api-visibility,Visibility]]
+= Visibility =
+
diff --git a/core/api/src/main/java/org/apache/polygene/api/PolygeneAPI.java b/core/api/src/main/java/org/apache/polygene/api/PolygeneAPI.java
index a9958a6..2823cb6 100644
--- a/core/api/src/main/java/org/apache/polygene/api/PolygeneAPI.java
+++ b/core/api/src/main/java/org/apache/polygene/api/PolygeneAPI.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.api;
 
 import java.lang.reflect.Field;
-import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
 import java.util.function.Function;
 import org.apache.polygene.api.association.AbstractAssociation;
@@ -28,7 +27,6 @@
 import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.composite.CompositeDescriptor;
 import org.apache.polygene.api.composite.CompositeInstance;
-import org.apache.polygene.api.composite.InvalidCompositeException;
 import org.apache.polygene.api.composite.ModelDescriptor;
 import org.apache.polygene.api.composite.TransientDescriptor;
 import org.apache.polygene.api.entity.EntityDescriptor;
@@ -139,6 +137,12 @@
      */
     AssociationDescriptor associationDescriptorFor( AbstractAssociation association );
 
+    /** Tests if the given object is a Composite
+     *
+     * @param object The Java object to be checked
+     * @return true if the given object is a Composite type.
+     */
+    boolean isComposite( Object object );
     /**
      * Function that returns the CompositeInstance of a Composite.
      */
diff --git a/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java b/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
index dbee470..2c11b63 100644
--- a/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
+++ b/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
@@ -34,18 +34,24 @@
     AssociationDescriptor getAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasAssociation( QualifiedName name );
+
     AssociationDescriptor getManyAssociationByName( String name )
         throws IllegalArgumentException;
 
     AssociationDescriptor getManyAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasManyAssociation( QualifiedName name );
+
     AssociationDescriptor getNamedAssociationByName( String name )
         throws IllegalArgumentException;
 
     AssociationDescriptor getNamedAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasNamedAssociation( QualifiedName name );
+
     Stream<? extends AssociationDescriptor> associations();
 
     Stream<? extends AssociationDescriptor> manyAssociations();
diff --git a/core/api/src/main/java/org/apache/polygene/api/association/ManyAssociation.java b/core/api/src/main/java/org/apache/polygene/api/association/ManyAssociation.java
index b7b7f7f..98f7fcf 100644
--- a/core/api/src/main/java/org/apache/polygene/api/association/ManyAssociation.java
+++ b/core/api/src/main/java/org/apache/polygene/api/association/ManyAssociation.java
@@ -28,6 +28,11 @@
 
 /**
  * Association to a collection of entities.
+ *
+ * <p>
+ * Duplication of entities (defined as Identity equality) is allowed and for each add, there will be
+ * an additional item in the collection/iterator. If de-duplication is requested, see {@link #toSet()} method.
+ * </p>
  */
 public interface ManyAssociation<T> extends Iterable<T>, AbstractAssociation
 {
@@ -40,18 +45,23 @@
      */
     boolean contains( T entity );
 
-    /** Adds an entity reference representing the given entity to the {@code index} slot of this collection.
+    /**
+     * Adds an entity reference representing the given entity to the {@code index} slot of this collection.
      * <p>
-     *     {@code index=0} represents the beginning of the collection and if the {@code index} is equal or larger
-     *     than the length of the collection, the entity reference will be added to the end.
+     * {@code index=0} represents the beginning of the collection and if the {@code index} is equal or larger
+     * than the length of the collection, the entity reference will be added to the end.
      * </p>
+     *
      * @param entity The entity whose entity reference is to be added to this collection.
-     * @param index the position for the entity to be inserted at.
+     * @param index  the position for the entity to be inserted at, starting at 0. If index is larger than number
+     *               of references present, then it will be added to the end. If index is smaller than 0, then it
+     *               will be added at the beginning, position 0.
      * @return true if the entity reference has been added, false otherwise.
      */
     boolean add( int index, T entity );
 
-    /** Adds an entity reference representing the given entity to the end of this collection.
+    /**
+     * Adds an entity reference representing the given entity to the end of this collection.
      *
      * @param entity The entity whose entity reference is to be added to this collection.
      * @return true if the entity reference has been added, false otherwise.
@@ -61,8 +71,9 @@
     /**
      * Removes the given entity from this {@code ManyAssociation}.
      * <p>
-     *     The entity reference representing the given entity is removed from this collection.
+     * The entity reference representing the given entity is removed from this collection.
      * </p>
+     *
      * @param entity The entity reference to be removed.
      * @return true if an entity reference was removed, otherwise false
      */
@@ -71,13 +82,15 @@
     /**
      * Clear all entities from this {@code ManyAssociation}.
      * <p>
-     *     All entity references present is removed from this collection.
+     * All entity references present is removed from this collection.
      * </p>
+     *
      * @return true if any entity reference was removed, otherwise false
      */
     boolean clear();
 
-    /** Fetch the entity refrence at the given index and fetch the entity from the entity store.
+    /**
+     * Fetch the entity refrence at the given index and fetch the entity from the entity store.
      *
      * @param index The index location in the collection of the entity reference to be fetched.
      * @return The retrieved entity that the entity reference of this collection represents.
@@ -86,6 +99,7 @@
 
     /**
      * Returns the number of references in this association.
+     *
      * @return the number of references in this association.
      */
     int count();
@@ -94,9 +108,10 @@
      * Fetches all entities represented by entity references in this collection and returns a List of such
      * entities.
      * <p>
-     *     Multiple references to the same entity will be present multiple times in the List, unlike {@link #toSet()}.
-     *     The order in which the entities were added to this collection is preserved.
+     * Multiple references to the same entity will be present multiple times in the List, unlike {@link #toSet()}.
+     * The order in which the entities were added to this collection is preserved.
      * </p>
+     *
      * @return a List of entities represented by the entity references in this collection.
      */
     List<T> toList();
@@ -105,15 +120,17 @@
      * Fetches all entities represented by entity references in this collection and returns a Set of such
      * entities.
      * <p>
-     *     Multiple references to the same entity will NOT be present, unlike {@link #toList()}. Sets are defined
-     *     to only contain any particular object once. Order is not preserved.
+     * Multiple references to the same entity will NOT be present, unlike {@link #toList()}. Sets are defined
+     * to only contain any particular object once. Order is not preserved.
      * </p>
+     *
      * @return a Set of entities represented by the entity references in this collection.
      */
     Set<T> toSet();
 
     /**
      * Returns a stream of the references to the associated entities.
+     *
      * @return the references to the associated entities.
      */
     Stream<EntityReference> references();
diff --git a/core/api/src/main/java/org/apache/polygene/api/association/NamedAssociation.java b/core/api/src/main/java/org/apache/polygene/api/association/NamedAssociation.java
index b8a62da..8597ba0 100644
--- a/core/api/src/main/java/org/apache/polygene/api/association/NamedAssociation.java
+++ b/core/api/src/main/java/org/apache/polygene/api/association/NamedAssociation.java
@@ -24,8 +24,15 @@
 import org.apache.polygene.api.entity.EntityReference;
 
 /**
- * Association to named Entities.
- * The Iterable&lt;String&gt; returns the names in the association set.
+ * Named Association to Entities.
+ * <p>
+ *     This works similar to a Map with a String key.
+ * </p>
+ * <p>
+ * The Iterable&lt;String&gt; returns the names in the association set. The order during iteration is random by
+ * definition, even if other behaviors can possibly be observed. The depends on the underlying entity store
+ * implementation.
+ * </p>
  * @param <T> Parameterized associatee type
  */
 public interface NamedAssociation<T>
@@ -47,7 +54,7 @@
      * Adds a named association.
      * @param name The name of the association.
      * @param entity The entity for this named association.
-     * @return true if putted, false otherwise
+     * @return true if value has been updated to a new value.
      */
     boolean put( String name, T entity );
 
diff --git a/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java b/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java
index 36bf86a..657b6de 100644
--- a/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java
+++ b/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java
@@ -238,9 +238,7 @@
         {
             return false;
         }
-
         QualifiedName that = (QualifiedName) o;
-
         return name.equals( that.name ) && typeName.equals( that.typeName );
     }
 
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeException.java b/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeException.java
deleted file mode 100644
index c3f51bb..0000000
--- a/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeException.java
+++ /dev/null
@@ -1,56 +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.polygene.api.composite;
-
-import org.apache.polygene.api.common.InvalidApplicationException;
-
-/**
- * This exception is thrown if client code tries to create a non-existing Composite type.
- */
-public class NoSuchCompositeException extends InvalidApplicationException
-{
-    private final String compositeType;
-    private final String moduleName;
-    private final String visibleTypes;
-
-    protected NoSuchCompositeException( String metaType, String compositeType, String moduleName, String visibleTypes )
-    {
-        super( "Could not find any visible " + metaType + " of type [" + compositeType + "] in module [" +
-               moduleName + "].\n" + visibleTypes );
-        this.compositeType = compositeType;
-        this.moduleName = moduleName;
-        this.visibleTypes = visibleTypes;
-    }
-
-    public String compositeType()
-    {
-        return compositeType;
-    }
-
-    public String moduleName()
-    {
-        return moduleName;
-    }
-
-    public String visibleTypes()
-    {
-        return visibleTypes;
-    }
-}
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java b/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java
new file mode 100644
index 0000000..1d6f155
--- /dev/null
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java
@@ -0,0 +1,143 @@
+/*
+ *  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.polygene.api.composite;
+
+import java.util.stream.Stream;
+import org.apache.polygene.api.common.InvalidApplicationException;
+import org.apache.polygene.api.structure.LayerDescriptor;
+import org.apache.polygene.api.structure.ModuleDescriptor;
+import org.apache.polygene.api.structure.TypeLookup;
+
+import static java.util.stream.Collectors.joining;
+
+/**
+ * This exception is thrown if client code tries to create a non-existing Composite type.
+ */
+public abstract class NoSuchCompositeTypeException extends InvalidApplicationException
+{
+    private final String compositeType;
+    private final String moduleName;
+    private final String visibleTypes;
+    private final String metaType;
+    private final String candidateTypes;
+
+    protected NoSuchCompositeTypeException( String metaType, String compositeType, ModuleDescriptor module )
+    {
+        super( "\n\tCould not find any visible " + metaType + " of type [" + compositeType + "] in module [" + module.name() + "]." );
+        this.metaType = metaType;
+        this.compositeType = compositeType;
+        this.moduleName = module.name();
+        visibleTypes = formatVisibleTypes( module.typeLookup() );
+        candidateTypes = findCandidateTypes( module );
+    }
+
+    public String compositeType()
+    {
+        return compositeType;
+    }
+
+    public String moduleName()
+    {
+        return moduleName;
+    }
+
+    public String visibleTypes()
+    {
+        return visibleTypes;
+    }
+
+    public String candidateTypes()
+    {
+        return candidateTypes;
+    }
+
+    @Override
+    public String getMessage()
+    {
+        return super.getMessage() + "\n" + candidateTypes + "\n" + visibleTypes;
+    }
+
+    private String formatVisibleTypes( TypeLookup typeLookup )
+    {
+        return descriptors( typeLookup )
+            .map( descriptor ->
+                  {
+                      String moduleName = descriptor.module().name();
+                      String typeName = descriptor.primaryType().getName();
+                      return "\t\t[" + typeName + "] in [" + moduleName + "]";
+                  } )
+            .sorted()
+            .distinct()
+            .collect( joining( "\n", "\tVisible " + metaType + " types are:\n", "" ) );
+    }
+
+    private String findCandidateTypes( ModuleDescriptor module )
+    {
+        return Stream.concat( Stream.of( module.layer() ), module.layer().usedLayers().layers() )
+                     .flatMap( LayerDescriptor::modules )
+                     .map( ModuleDescriptor::typeLookup )
+                     .flatMap( this::descriptors )
+                     .filter( type -> compositeType.equals( type.primaryType().getName() ) )
+                     .map( descriptor ->
+                           {
+                               Class<?> primarytype = descriptor.primaryType();
+                               String typeName = primarytype.getName();
+                               return "\t\t[ " + typeName + "] in [" + descriptor.module().name() + "] with visibility " + descriptor.visibility();
+                           } )
+                     .distinct()
+                     .collect( joining( "\n", "\tInvisible " + metaType + " types are:\n", "" ) );
+    }
+
+    protected abstract Stream<? extends CompositeDescriptor> descriptors( TypeLookup typeLookup );
+
+    @Override
+    public boolean equals( Object o )
+    {
+        if( this == o )
+        {
+            return true;
+        }
+        if( o == null || getClass() != o.getClass() )
+        {
+            return false;
+        }
+
+        NoSuchCompositeTypeException that = (NoSuchCompositeTypeException) o;
+
+        if( !compositeType.equals( that.compositeType ) )
+        {
+            return false;
+        }
+        if( !moduleName.equals( that.moduleName ) )
+        {
+            return false;
+        }
+        return visibleTypes.equals( that.visibleTypes );
+    }
+
+    @Override
+    public int hashCode()
+    {
+        int result = compositeType.hashCode();
+        result = 31 * result + moduleName.hashCode();
+        result = 31 * result + visibleTypes.hashCode();
+        return result;
+    }
+}
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchTransientException.java b/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchTransientTypeException.java
similarity index 65%
rename from core/api/src/main/java/org/apache/polygene/api/composite/NoSuchTransientException.java
rename to core/api/src/main/java/org/apache/polygene/api/composite/NoSuchTransientTypeException.java
index 6f6bfd7..8bc188c 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchTransientException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchTransientTypeException.java
@@ -20,23 +20,24 @@
 
 package org.apache.polygene.api.composite;
 
-import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.structure.TypeLookup;
 
+import static java.util.stream.Collectors.joining;
+
 /**
  * This exception is thrown if client code tries to create a non-existing TransientComposite type.
  */
-public class NoSuchTransientException extends NoSuchCompositeException
+public class NoSuchTransientTypeException extends NoSuchCompositeTypeException
 {
-    public NoSuchTransientException( String typeName, String moduleName, TypeLookup typeLookup )
+    public NoSuchTransientTypeException( String typeName, ModuleDescriptor module )
     {
-        super( "TransientComposite", typeName, moduleName, formatVisibleTypes( typeLookup ) );
+        super( "TransientComposite", typeName, module );
     }
 
-    private static String formatVisibleTypes( TypeLookup typeLookup )
+    protected Stream<? extends CompositeDescriptor> descriptors( TypeLookup typeLookup )
     {
-        return typeLookup.allTransients()
-            .map(descriptor -> descriptor.primaryType().getName())
-            .collect( Collectors.joining( "\n", "Visible transient types are:\n", "" ) );
+        return typeLookup.allTransients();
     }
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java b/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
index acff127..c4e13f3 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
@@ -114,7 +114,7 @@
             }
             catch( NoSuchMethodException e )
             {
-                throw new IllegalArgumentException( "Could not find any property named " + objectObjectEntry.getKey() );
+//                throw new IllegalArgumentException( "Could not find any property named " + objectObjectEntry.getKey() );
             }
             catch( IllegalAccessException e )
             {
@@ -236,7 +236,7 @@
     {
         return new Properties()
         {
-            private static final long serialVersionUID = 3550125427530538865L;
+            private static final long serialVersionUID = 1L;
 
             @Override
             public Object get( Object o )
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java b/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
index 20c07c2..8bf4738 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
@@ -35,5 +35,7 @@
     PropertyDescriptor findPropertyModelByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasProperty( QualifiedName name );
+
     Stream<? extends PropertyDescriptor> properties();
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java b/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java
index 5656c71..12f71e9 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java
@@ -39,10 +39,10 @@
      *
      * @return a TransientBuilder for creation of TransientComposites implementing the interface
      *
-     * @throws NoSuchTransientException if no composite extending the mixinType has been registered
+     * @throws NoSuchTransientTypeException if no composite extending the mixinType has been registered
      */
     <T> TransientBuilder<T> newTransientBuilder( Class<T> mixinType )
-        throws NoSuchTransientException;
+        throws NoSuchTransientTypeException;
 
     /**
      * Instantiate a TransientComposite of the given type.
@@ -53,10 +53,10 @@
      *
      * @return a new TransientComposite instance
      *
-     * @throws NoSuchTransientException if no composite extending the mixinType has been registered
+     * @throws NoSuchTransientTypeException if no composite extending the mixinType has been registered
      * @throws org.apache.polygene.api.common.ConstructionException
      *                                  if the composite could not be instantiated
      */
     <T> T newTransient( Class<T> mixinType, Object... uses )
-        throws NoSuchTransientException, ConstructionException;
+        throws NoSuchTransientTypeException, ConstructionException;
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java b/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java
index a7c4dd1..bca886f 100644
--- a/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java
+++ b/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java
@@ -23,23 +23,26 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.stream.Stream;
 import org.apache.polygene.api.PolygeneAPI;
 import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.composite.PropertyMapper;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.entity.EntityBuilder;
+import org.apache.polygene.api.entity.EntityDescriptor;
 import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
-import org.apache.polygene.api.service.ServiceDescriptor;
-import org.apache.polygene.api.service.ServiceReference;
-import org.apache.polygene.api.service.qualifier.ServiceTags;
 import org.apache.polygene.api.serialization.Deserializer;
 import org.apache.polygene.api.serialization.Serialization;
+import org.apache.polygene.api.service.ServiceComposite;
+import org.apache.polygene.api.service.ServiceDescriptor;
+import org.apache.polygene.api.service.qualifier.ServiceTags;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.NoSuchEntityException;
 import org.apache.polygene.api.unitofwork.NoSuchEntityTypeException;
@@ -178,8 +181,8 @@
         @Structure
         private UnitOfWorkFactory uowf;
 
-        @Service
-        private Iterable<ServiceReference<Deserializer>> stateDeserializers;
+        @Structure
+        private Module module;
 
         public ConfigurationMixin()
         {
@@ -194,7 +197,9 @@
                 uow = uowf.newUnitOfWork( usecase );
                 try
                 {
-                    configuration = this.findConfigurationInstanceFor( me, uow );
+                    ServiceDescriptor serviceModel = api.serviceDescriptorFor( me );
+                    Identity identity = me.identity().get();
+                    configuration = this.findConfigurationInstanceFor( serviceModel, identity, uow );
                 }
                 catch( InstantiationException e )
                 {
@@ -237,62 +242,65 @@
         }
 
         @SuppressWarnings( "unchecked" )
-        public <V> V findConfigurationInstanceFor( ServiceComposite serviceComposite, UnitOfWork uow )
+        public <V> V findConfigurationInstanceFor( ServiceDescriptor serviceModel, Identity serviceIdentity, UnitOfWork uow )
             throws InstantiationException
         {
-            ServiceDescriptor serviceModel = api.serviceDescriptorFor( serviceComposite );
-
+            Class<V> configurationType = serviceModel.configurationType();
             V configuration;
             try
             {
-                configuration = uow.get( serviceModel.<V>configurationType(), serviceComposite.identity().get() );
+                configuration = uow.get( configurationType, serviceIdentity );
                 uow.pause();
             }
             catch( NoSuchEntityException | NoSuchEntityTypeException e )
             {
-                return (V) initializeConfigurationInstance( serviceComposite, uow, serviceModel,
-                                                            serviceComposite.identity().get() );
+                EntityDescriptor entityDescriptor = module.typeLookup().lookupEntityModel( configurationType );
+                if( entityDescriptor == null )
+                {
+                    throw new NoSuchConfigurationTypeException( configurationType, module.descriptor() );
+                }
+                return (V) initializeConfigurationInstance( entityDescriptor, uow, serviceModel, serviceIdentity );
             }
             return configuration;
         }
 
         @SuppressWarnings( "unchecked" )
-        private <V extends HasIdentity> V initializeConfigurationInstance( ServiceComposite serviceComposite,
+        private <V extends HasIdentity> V initializeConfigurationInstance( EntityDescriptor entityDescriptor,
                                                                            UnitOfWork uow,
                                                                            ServiceDescriptor serviceModel,
                                                                            Identity identity
-        )
+                                                                         )
             throws InstantiationException
         {
-            Module module = api.moduleOf( serviceComposite ).instance();
             Usecase usecase = UsecaseBuilder.newUsecase( "Configuration:" + me.identity().get() );
-            UnitOfWork buildUow = module.unitOfWorkFactory().newUnitOfWork( usecase );
-
-            Class<?> type = api.serviceDescriptorFor( serviceComposite ).types().findFirst().orElse( null );
+            UnitOfWork buildUow = entityDescriptor.module().instance().unitOfWorkFactory().newUnitOfWork( usecase );
             Class<V> configType = serviceModel.configurationType();
-
             // Check for defaults
-            V config = tryLoadPropertiesFile( buildUow, type, configType, identity );
+            V config = tryLoadPropertiesFile( buildUow, entityDescriptor, identity );
             if( config == null )
             {
-                config = tryLoadJsonFile( buildUow, type, configType, identity );
+                config = tryLoadJsonFile( buildUow, entityDescriptor, identity );
                 if( config == null )
                 {
-                    config = tryLoadYamlFile( buildUow, type, configType, identity );
+                    config = tryLoadYamlFile( buildUow, entityDescriptor, identity );
                     if( config == null )
                     {
-                        config = tryLoadXmlFile( buildUow, type, configType, identity );
+                        config = tryLoadXmlFile( buildUow, entityDescriptor, identity );
                         if( config == null )
                         {
-                            try
+                            config = tryLoadSystemProperties( buildUow, entityDescriptor, identity );
+                            if( config == null )
                             {
-                                EntityBuilder<V> configBuilder = buildUow.newEntityBuilder(
-                                    serviceModel.<V>configurationType(), identity );
-                                configBuilder.newInstance();
-                            }
-                            catch( ConstraintViolationException e )
-                            {
-                                throw new NoSuchConfigurationException( configType, identity, e );
+                                try
+                                {
+                                    EntityBuilder<V> configBuilder =
+                                        buildUow.newEntityBuilder( serviceModel.<V>configurationType(), identity );
+                                    configBuilder.newInstance();
+                                }
+                                catch( ConstraintViolationException e )
+                                {
+                                    throw new NoSuchConfigurationException( configType, identity, e );
+                                }
                             }
                         }
                     }
@@ -304,7 +312,7 @@
                 buildUow.complete();
 
                 // Try again
-                return (V) findConfigurationInstanceFor( serviceComposite, uow );
+                return (V) findConfigurationInstanceFor( serviceModel, identity, uow );
             }
             catch( Exception e1 )
             {
@@ -316,16 +324,54 @@
             }
         }
 
-        private <C, V> V tryLoadPropertiesFile( UnitOfWork buildUow,
-                                                Class<C> compositeType,
-                                                Class<V> configType,
-                                                Identity identity
-        )
+        private <V> V tryLoadSystemProperties( UnitOfWork buildUow, EntityDescriptor configType, Identity identity )
             throws InstantiationException
         {
-            EntityBuilder<V> configBuilder = buildUow.newEntityBuilder( configType, identity );
+            @SuppressWarnings( "unchecked" )
+            EntityBuilder<V> configBuilder = buildUow.newEntityBuilder( (Class<V>) configType.primaryType(), identity );
+            PropertyMapper.map( systemProperties(), (Composite) configBuilder.instance() );
+            return configBuilder.newInstance();
+        }
+
+        private Properties systemProperties()
+        {
+            Stream<Map.Entry<?, ?>> allProps =
+                Stream.concat( System.getenv().entrySet().stream(), System.getProperties().entrySet().stream() );
+            Properties props = new Properties();
+            allProps.forEach( entry -> props.put( transform( (String) entry.getKey() ), entry.getValue() ) );
+            return props;
+        }
+
+        private String transform( String text )
+        {
+            boolean upper = false;
+            StringBuilder builder = new StringBuilder();
+            for( int i = 0; i < text.length(); i++ )
+            {
+                char ch = Character.toLowerCase( text.charAt( i ) );
+                if( ch == '.' )
+                {
+                    upper = true;
+                    continue;
+                }
+                if( upper )
+                {
+                    ch = Character.toUpperCase( ch );
+                    upper = false;
+                }
+                builder.append( ch );
+            }
+            return builder.toString();
+        }
+
+        private <V> V tryLoadPropertiesFile( UnitOfWork buildUow, EntityDescriptor configType, Identity identity )
+            throws InstantiationException
+        {
+            @SuppressWarnings( "unchecked" )
+            EntityBuilder<V> configBuilder = buildUow.newEntityBuilder( (Class<V>) configType.primaryType(), identity );
+
             String resourceName = identity + ".properties";
-            try( InputStream asStream = getResource( compositeType, resourceName ) )
+            try( InputStream asStream = getResource( configType.primaryType(), resourceName ) )
             {
                 if( asStream != null )
                 {
@@ -360,61 +406,67 @@
             return type.getResourceAsStream( resourceName );
         }
 
-        private <C, V extends HasIdentity> V tryLoadJsonFile( UnitOfWork uow,
-                                                              Class<C> compositeType,
-                                                              Class<V> configType,
-                                                              Identity identity
-        )
+        private <V extends HasIdentity> V tryLoadJsonFile( UnitOfWork uow,
+                                                           EntityDescriptor configType,
+                                                           Identity identity
+                                                         )
         {
-            return readConfig( uow, compositeType, configType, identity, Serialization.Format.JSON, ".json" );
+            return readConfig( uow, configType, identity, Serialization.Format.JSON, ".json" );
         }
 
-        private <C, V extends HasIdentity> V tryLoadYamlFile( UnitOfWork uow,
-                                                              Class<C> compositeType,
-                                                              Class<V> configType,
-                                                              Identity identity
-        )
+        private <V extends HasIdentity> V tryLoadYamlFile( UnitOfWork uow,
+                                                           EntityDescriptor configType,
+                                                           Identity identity
+                                                         )
         {
-            return readConfig( uow, compositeType, configType, identity, Serialization.Format.YAML, ".yaml" );
+            return readConfig( uow, configType, identity, Serialization.Format.YAML, ".yaml" );
         }
 
-        private <C, V extends HasIdentity> V tryLoadXmlFile( UnitOfWork uow,
-                                                             Class<C> compositeType,
-                                                             Class<V> configType,
-                                                             Identity identity
-        )
+        private <V extends HasIdentity> V tryLoadXmlFile( UnitOfWork uow,
+                                                          EntityDescriptor configType,
+                                                          Identity identity
+                                                        )
         {
-            return readConfig( uow, compositeType, configType, identity, Serialization.Format.XML, ".xml" );
+            return readConfig( uow, configType, identity, Serialization.Format.XML, ".xml" );
         }
 
-        private <C, V extends HasIdentity> V readConfig( UnitOfWork uow,
-                                                         Class<C> compositeType,
-                                                         Class<V> configType,
-                                                         Identity identity,
-                                                         String format,
-                                                         String extension
-        )
+        private <V extends HasIdentity> V readConfig( UnitOfWork uow,
+                                                      EntityDescriptor configType,
+                                                      Identity identity,
+                                                      String format,
+                                                      String extension
+                                                    )
         {
-            for( ServiceReference<Deserializer> serializerRef : stateDeserializers )
-            {
-                ServiceTags serviceTags = serializerRef.metaInfo( ServiceTags.class );
-                if( serviceTags.hasTag( format ) )
-                {
-                    String resourceName = identity + extension;
-                    try( InputStream asStream = getResource( compositeType, resourceName ) )
-                    {
-                        if( asStream != null )
-                        {
-                            Deserializer deserializer = serializerRef.get();
-                            V configObject = deserializer.deserialize( uow.module(), configType,
-                                                                       new InputStreamReader( asStream, UTF_8 ) );
-                            return uow.toEntity( configType, configObject );
-                        }
-                    }
-                    catch( IOException ignored ) {}
-                }
-            }
-            return null;
+            Module module = configType.module().instance();
+            return module.findServices( Deserializer.class )
+                         .filter( ref ->
+                                  {
+                                      ServiceTags serviceTags = ref.metaInfo( ServiceTags.class );
+                                      return serviceTags.hasTag( format );
+                                  } )
+                         .map( ref ->
+                               {
+                                   String resourceName = identity + extension;
+                                   try( InputStream asStream = getResource( configType.primaryType(), resourceName ) )
+                                   {
+                                       if( asStream != null )
+                                       {
+                                           Deserializer deserializer = ref.get();
+                                           V configObject = deserializer.deserialize( module.descriptor(), configType.valueType(),
+                                                                                      new InputStreamReader( asStream, UTF_8 ) );
+
+                                           @SuppressWarnings( "unchecked" )
+                                           Class<V> primaryType = (Class<V>) configType.primaryType();
+                                           return uow.toEntity( primaryType, configObject );
+                                       }
+                                   }
+                                   catch( IOException ignored )
+                                   {
+                                   }
+                                   return null;
+                               } )
+                         .filter( Objects::nonNull )
+                         .findFirst().orElse( null );
         }
     }
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/configuration/ConfigurationComposite.java b/core/api/src/main/java/org/apache/polygene/api/configuration/ConfigurationComposite.java
index 726664f..82729a9 100644
--- a/core/api/src/main/java/org/apache/polygene/api/configuration/ConfigurationComposite.java
+++ b/core/api/src/main/java/org/apache/polygene/api/configuration/ConfigurationComposite.java
@@ -21,8 +21,8 @@
 package org.apache.polygene.api.configuration;
 
 import org.apache.polygene.api.composite.Composite;
-import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.entity.Queryable;
+import org.apache.polygene.api.identity.HasIdentity;
 
 /**
  * Services that want to be configurable should have a ConfigurationComposite that contains all the settings.
diff --git a/core/api/src/main/java/org/apache/polygene/api/configuration/NoSuchConfigurationTypeException.java b/core/api/src/main/java/org/apache/polygene/api/configuration/NoSuchConfigurationTypeException.java
new file mode 100644
index 0000000..bce3b06
--- /dev/null
+++ b/core/api/src/main/java/org/apache/polygene/api/configuration/NoSuchConfigurationTypeException.java
@@ -0,0 +1,36 @@
+/*
+ *  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.polygene.api.configuration;
+
+import org.apache.polygene.api.structure.ModuleDescriptor;
+
+public class NoSuchConfigurationTypeException extends RuntimeException
+{
+    private final Class<?> configType;
+
+    public NoSuchConfigurationTypeException( Class<?> configType,
+                                             ModuleDescriptor module
+                                           )
+    {
+        super( "No configuration type " + configType.getName() + " has been registered, or is not visible from " + module.name() );
+        this.configType = configType;
+    }
+}
diff --git a/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java b/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java
index a007a11..0eecf04 100644
--- a/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java
@@ -20,23 +20,22 @@
 package org.apache.polygene.api.constraint;
 
 import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
 import java.lang.reflect.Type;
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Locale;
-import java.util.MissingResourceException;
+import java.util.Objects;
 import java.util.ResourceBundle;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
-import org.apache.polygene.api.composite.Composite;
+import org.apache.polygene.api.composite.CompositeDescriptor;
+import org.apache.polygene.api.entity.EntityDescriptor;
 import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.service.ServiceDescriptor;
 import org.apache.polygene.api.util.Classes;
 
-import static java.util.stream.Collectors.joining;
-
 /**
  * This Exception is thrown when there is one or more Constraint Violations in a method
  * call.
@@ -48,65 +47,51 @@
  */
 public class ConstraintViolationException extends IllegalArgumentException
 {
-    private final Collection<ConstraintViolation> constraintViolations;
-    private String methodName;
-    private String mixinTypeName;
-    private String instanceToString;
-    private List<? extends Type> instanceTypes;
+    private static final boolean longNames = Boolean.getBoolean( "polygene.constraints.longNames" );
+    private static final String DEFAULT_PATTERN = "\n\tConstraint Violation(s) in {0} of types [{3}].\n";
+    private static final String ENTITY_DEFAULT_PATTERN = "\n\tConstraint Violation(s) in entity {0} with id=[{2}].\n";
+    private static final String SERVICE_DEFAULT_PATTERN = "\n\tConstraint Violation(s) in service {0} with id=[{2}].\n";
+    private static final String MIXIN_DEFAULT_PATTERN = "\t\t@{2}({3}) on {0}.{1}(). Parameter [{4}] does not allow value [{5}].\n";
 
-    public ConstraintViolationException( Composite instance, Member method,
-                                         Collection<ConstraintViolation> constraintViolations
-    )
+    private String instanceToString;                              // arg {0}
+    private Class<?> primaryType;                                 // arg {1}
+    private List<? extends Type> instanceTypes;                   // arg {2}
+    private Collection<ValueConstraintViolation> constraintViolations; // arg {4} and {5}
+    private String identity;                                      // arg {6}
+    private boolean isService;
+    private boolean isEntity;
+
+    public ConstraintViolationException( Collection<ValueConstraintViolation> violations )
     {
-        this( instance.toString(), Classes.interfacesOf( instance.getClass() ), method, constraintViolations );
+        this.constraintViolations = new ArrayList<>();
+        this.constraintViolations.addAll( violations );
     }
 
-    public ConstraintViolationException( String instanceToString,
-                                         Stream<? extends Type> instanceTypes,
-                                         Member method,
-                                         Collection<ConstraintViolation> violations
-    )
-    {
-        this.instanceToString = instanceToString;
-        this.instanceTypes = instanceTypes.collect( Collectors.toList() );
-        mixinTypeName = method.getDeclaringClass().getName();
-        methodName = method.getName();
-        this.constraintViolations = violations;
-    }
-
-    public ConstraintViolationException( Identity identity,
-                                         List<? extends Type> instanceTypes,
-                                         String mixinTypeName,
-                                         String methodName,
-                                         Collection<ConstraintViolation> violations
-    )
-    {
-        this.instanceToString = identity.toString();
-        this.instanceTypes = instanceTypes;
-        this.mixinTypeName = mixinTypeName;
-        this.methodName = methodName;
-        this.constraintViolations = violations;
-    }
-
-    public Collection<ConstraintViolation> constraintViolations()
+    public Collection<ValueConstraintViolation> constraintViolations()
     {
         return constraintViolations;
     }
 
     /**
-     * Creates localized messages of all the constraint violations that has occured.
+     * Creates localized message of all the constraint violations that has occured.
      * <p>
-     * The key "<code>polygene.constraint.<i><strong>CompositeType</strong></i>.<i><strong>methodName</strong></i></code>"
-     * will be used to lookup the text formatting
-     * pattern from the ResourceBundle, where <strong><code><i>CompositeType</i></code></strong> is the
-     * class name of the Composite where the constraint was violated. If such key does not exist, then the
-     * key &nbsp;"<code>polygene.constraint</code>" will be used, and if that one also doesn't exist, or
-     * the resourceBundle argument is null, then the default patterns will be used;
+     * Each ConstraintViolationException concerns one Composite instance, but may have many violations on that
+     * instance. For the composite instance related message following entries in the ResourceBundle will be searched
+     * for a pattern in the following order;
      * </p>
-     * <table summary="Localization of constraint vioations.">
+     * <ol>
+     * <li><code>polygene.constraint.<i><strong>CompositeType</strong></i></code></li>
+     * <li><code>polygene.constraint.composite</code></li>
+     * </ol>
+     * <p>
+     * where <strong><code><i>CompositeType</i></code></strong> is the
+     * class name of the Composite instance. If such key does not exist, or if the resourceBundle argument is null,
+     * then the default patterns will be used;
+     * </p>
+     * <table summary="Default localization of constraint violations for composite.">
      * <tr><th>Type of Composite</th><th>Pattern used</th></tr>
      * <tr><td>Composite</td>
-     * <td><code>Constraint Violation in {2}.{3} with constraint {4}, in composite \n{0} of type {1}</code></td>
+     * <td><code>\tConstraint Violation(s) in {0} with types {3}\n</code></td>
      * </tr>
      * <tr><td>EntityComposite</td>
      * <td><code>Constraint Violation in {2}.{3} with constraint {4}, in entity {1}[id={0}]</code></td>
@@ -115,144 +100,213 @@
      * <td><code>Constraint Violation in {2}.{3} with constraint {4}, in service {0}</code></td>
      * </tr>
      * </table>
+     * The ResourceBundle arguments are defined as;
+     * <p>
+     * <p>
      * Then format each ConstraintViolation according to such pattern, where the following argument are passed;
      * <table summary="List of arguments available."><tr><th>Arg</th><th>Value</th></tr>
      * <tr>
      * <td>{0}</td>
-     * <td>Composite instance toString()</td>
+     * <td>Primary Type of Composite</td>
      * </tr>
      * <tr>
      * <td>{1}</td>
-     * <td>CompositeType class name</td>
+     * <td>Composite instance toString()</td>
      * </tr>
      * <tr>
      * <td>{2}</td>
-     * <td>MixinType class name</td>
+     * <td>Identity if composite implements HasIdentity</td>
      * </tr>
      * <tr>
      * <td>{3}</td>
-     * <td>MixinType method name</td>
-     * </tr>
-     * <tr>
-     * <td>{4}</td>
-     * <td>Annotation toString()</td>
-     * </tr>
-     * <tr>
-     * <td>{5}</td>
-     * <td>toString() of value passed as the argument, or "null" text if argument was null.</td>
+     * <td>Comma-separeated list of types implemented by Composite</td>
      * </tr>
      * </table>
      * <p>
-     * <b>NOTE!!!</b> This class is still under construction and will be modified further.
-     * </p>
+     * Once the message at the composite type level has been established, the message will contain each of the found
+     * violations. For each such violation, the resource bundle will be searched in the following order;
+     * <ol>
+     * <li><code>polygene.constraint.<i><strong>MixinType</strong></i>.<i><strong>member</strong></i></code></li>
+     * <li><code>polygene.constraint.<i><strong>MixinType</strong></i></code></li>
+     * <li><code>polygene.constraint.mixin</code></li>
+     * </ol>
+     * where <code><i><strong>MixinType</strong></i></code> refers to the mixin type of the member (method, field or
+     * constructor) and the <code><i><strong>member</strong></i></code> is the name of such Member.
+     * <table summary="Default localization of constraint violations for mixin.">
+     * <tr><th>Type of Composite</th><th>Pattern used</th></tr>
+     * <tr><td>Mixin</td>
+     * <td><code>\t\t@{2} {0}.{1} does not allow value [{4}]</code></td>
+     * </tr>
+     * </table>
+     * For these the ResourceBundle arguments are;
+     * <table summary="List of arguments available."><tr><th>Arg</th><th>Value</th></tr>
+     * <tr>
+     * <td>{0}</td>
+     * <td>Mixin Type Name</td>
+     * </tr>
+     * <tr>
+     * <td>{1}</td>
+     * <td>Mixin Member Name</td>
+     * </tr>
+     * <tr>
+     * <td>{2}</td>
+     * <td>Annotation type</td>
+     * </tr>
+     * <tr>
+     * <td>{3}</td>
+     * <td>Annotation toString</td>
+     * </tr>
+     * <tr>
+     * <td>{4}</td>
+     * <td>Name of the Member, see {@link Name}</td>
+     * </tr>
+     * <tr>
+     * <td>{5}</td>
+     * <td>Value attempted</td>
+     * </tr>
+     * </table>
      *
      * @param bundle The ResourceBundle for Localization, or null if default formatting and locale to be used.
-     *
      * @return An array of localized messages of the violations incurred.
      */
-    public String[] localizedMessagesFrom( ResourceBundle bundle )
+    public String localizedMessageFrom( ResourceBundle bundle )
     {
-        String pattern = "Constraint violation in {0}.{1} for method ''{3}'' with constraint \"{4}({6})\", for value ''{5}''";
-
-        ArrayList<String> list = new ArrayList<>();
-        for( ConstraintViolation violation : constraintViolations )
+        Locale locale;
+        if( bundle != null )
         {
-            Locale locale;
-            if( bundle != null )
+            locale = bundle.getLocale();
+        }
+        else
+        {
+            locale = Locale.getDefault();
+        }
+        StringBuffer message = new StringBuffer();
+        {
+            String[] searchKeys = new String[]{ "polygene.constraint." + primaryType, "polygene.constraint.composite" };
+            String compositePattern = findPattern( bundle, searchKeys, defaultPattern() );
+            String types = instanceTypes == null
+                           ? null
+                           : instanceTypes.stream()
+                                          .map( this::nameOf )
+                                          .collect( Collectors.joining( "," ) );
+            String name;
+            if( longNames )
             {
-                try
-                {
-                    pattern = bundle.getString( "polygene.constraint." + mixinTypeName + "." + methodName );
-                }
-                catch( MissingResourceException e1 )
-                {
-                    try
-                    {
-                        pattern = bundle.getString( "polygene.constraint" );
-                    }
-                    catch( MissingResourceException e2 )
-                    {
-                        // ignore. The default pattern will be used.
-                    }
-                }
-                locale = bundle.getLocale();
+                name = primaryType.getName();
             }
             else
             {
-                locale = Locale.getDefault();
+                name = primaryType.getSimpleName();
             }
-            MessageFormat format = new MessageFormat( pattern, locale );
+            Object[] args = new Object[]{ name, instanceToString, identity, types };
+            MessageFormat formatter = new MessageFormat( compositePattern, locale );
+            formatter.format( args, message, null );
+        }
+        for( ValueConstraintViolation violation : constraintViolations )
+        {
+            String[] searchKeys = new String[]{ "polygene.constraint." + primaryType, "polygene.constraint.composite" };
+            String mixinPattern = findPattern( bundle, searchKeys, MIXIN_DEFAULT_PATTERN );
 
             Annotation annotation = violation.constraint();
-            String name = violation.name();
-            Object value = violation.value();
-            String classes;
-            if( instanceTypes.size() == 1 )
-            {
-                Type type = instanceTypes.stream().findFirst().get();
-                classes = Classes.RAW_CLASS.apply( type ).getSimpleName();
-            }
-            else
-            {
-                classes = "[" + instanceTypes.stream()
-                    .map( Classes.RAW_CLASS )
-                    .map( Class::getSimpleName ).collect( joining( "," ) ) + "]";
-            }
+            Class<? extends Annotation> annotatioType = annotation.annotationType();
+            Class<?> mixinType = violation.mixinType();
             Object[] args = new Object[]
                 {
-                    instanceToString,
-                    classes,
-                    mixinTypeName,
-                    methodName,
+                    longNames ? mixinType.getName() : mixinType.getSimpleName(),
+                    violation.methodName(),
+                    longNames ? annotatioType.getName() : annotatioType.getSimpleName(),
                     annotation.toString(),
-                    "" + value,
-                    name
+                    violation.name(),
+                    violation.value()
                 };
-            StringBuffer text = new StringBuffer();
-            format.format( args, text, null );
-            list.add( text.toString() );
+            MessageFormat formatter = new MessageFormat( mixinPattern, locale );
+            formatter.format( args, message, null );
         }
-        String[] result = new String[ list.size() ];
-        list.toArray( result );
+        String result = message.toString();
+        message.setLength( 0 ); // TODO: is this still needed to avoid JVM memory leak??
         return result;
     }
 
-    public String localizedMessage()
+    private String nameOf( Type type )
     {
-        String[] messages = localizedMessagesFrom( null );
-        StringBuilder result = new StringBuilder();
-        boolean first = true;
-        for( String message : messages )
+        Class<?> clazz = Classes.RAW_CLASS.apply( type );
+        if( longNames )
         {
-            if( !first )
-            {
-                result.append( ',' );
-            }
-            first = false;
-            result.append( message );
+            return clazz.getName();
         }
-        return result.toString();
-    }
-
-    @Override
-    public String getLocalizedMessage()
-    {
-        return localizedMessage();
+        else
+        {
+            return clazz.getSimpleName();
+        }
     }
 
     @Override
     public String getMessage()
     {
-        return localizedMessage();
+        return localizedMessageFrom( null );
     }
 
-    public String methodName()
+    private String findPattern( ResourceBundle bundle, String[] searchKeys, String defaultPattern )
     {
-        return methodName;
+        String compositePattern;
+        if( bundle != null )
+        {
+            compositePattern = Stream.of( searchKeys )
+                                     .map( name -> findPattern( bundle, name ) )
+                                     .filter( Objects::nonNull )
+                                     .findFirst().orElse( defaultPattern );
+        }
+        else
+        {
+            compositePattern = defaultPattern;
+        }
+        return compositePattern;
     }
 
-    public String mixinTypeName()
+    private String findPattern( ResourceBundle bundle, String name )
     {
-        return mixinTypeName;
+        try
+        {
+            return bundle.getString( name );
+        }
+        catch( Exception e )
+        {
+            return null;
+        }
+    }
+
+    private String defaultPattern()
+    {
+        if( isEntity )
+        {
+            return ENTITY_DEFAULT_PATTERN;
+        }
+        if( isService )
+        {
+            return SERVICE_DEFAULT_PATTERN;
+        }
+        return DEFAULT_PATTERN;
+    }
+
+    public void setCompositeDescriptor( CompositeDescriptor descriptor )
+    {
+        this.primaryType = descriptor.primaryType();
+        this.instanceTypes = descriptor.mixinTypes().collect( Collectors.toList() );
+        this.isEntity = descriptor instanceof EntityDescriptor;
+        this.isService = descriptor instanceof ServiceDescriptor;
+    }
+
+    public void setIdentity( Identity identity )
+    {
+        if( identity == null )
+        {
+            return;
+        }
+        this.identity = identity.toString();
+    }
+
+    public void setInstanceString( String instanceString )
+    {
+        instanceToString = instanceString;
     }
 }
\ No newline at end of file
diff --git a/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolation.java b/core/api/src/main/java/org/apache/polygene/api/constraint/ValueConstraintViolation.java
similarity index 71%
rename from core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolation.java
rename to core/api/src/main/java/org/apache/polygene/api/constraint/ValueConstraintViolation.java
index 75bbecb..1da5a4b 100644
--- a/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolation.java
+++ b/core/api/src/main/java/org/apache/polygene/api/constraint/ValueConstraintViolation.java
@@ -21,18 +21,21 @@
 package org.apache.polygene.api.constraint;
 
 import java.lang.annotation.Annotation;
+import java.util.List;
 
 /**
  * When a constraint violation has occurred (ie Constraint.isValid has returned false) it
  * is put in a collection of all violations that have occurred for this value check.
  */
-public final class ConstraintViolation
+public final class ValueConstraintViolation
 {
-    private String name;
+    private final String name;
     private final Annotation constraint;
     private final Object value;
+    private Class<?> mixinType;
+    private String methodName;
 
-    public ConstraintViolation( String name, Annotation constraint, Object value )
+    public ValueConstraintViolation( String name, Annotation constraint, Object value )
     {
         this.name = name;
         this.constraint = constraint;
@@ -53,4 +56,24 @@
     {
         return value;
     }
+
+    public void setMixinType( Class<?> mixinType )
+    {
+        this.mixinType = mixinType;
+    }
+
+    public void setMethodName( String methodName )
+    {
+        this.methodName = methodName;
+    }
+
+    public Class<?> mixinType()
+    {
+        return mixinType;
+    }
+
+    public String methodName()
+    {
+        return methodName;
+    }
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java b/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java
index 98d1003..c2a7327 100644
--- a/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java
+++ b/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java
@@ -21,6 +21,7 @@
 package org.apache.polygene.api.entity;
 
 import java.util.Objects;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.identity.StringIdentity;
 
@@ -39,7 +40,8 @@
      */
     public static EntityReference parseEntityReference(String identityString)
     {
-        return new EntityReference( new StringIdentity( identityString ) );
+        Objects.requireNonNull( identityString, "identityString must not be null" );
+        return new EntityReference( StringIdentity.identityOf( identityString ) );
     }
 
     /**
@@ -48,7 +50,16 @@
      */
     public static EntityReference entityReferenceFor(Object object)
     {
-        return new EntityReference(((EntityComposite) object).identity().get());
+        Objects.requireNonNull( object );
+        if( object instanceof Identity )
+        {
+            return new EntityReference( ((Identity) object) );
+        }
+        if( object instanceof HasIdentity )
+        {
+            return new EntityReference( ((HasIdentity) object).identity().get() );
+        }
+        throw new IllegalArgumentException( "Can not get an entity reference for " + object.getClass() );
     }
 
     public static EntityReference create(Identity identity)
diff --git a/core/api/src/main/java/org/apache/polygene/api/identity/StringIdentity.java b/core/api/src/main/java/org/apache/polygene/api/identity/StringIdentity.java
index d5c43f9..faacf25 100644
--- a/core/api/src/main/java/org/apache/polygene/api/identity/StringIdentity.java
+++ b/core/api/src/main/java/org/apache/polygene/api/identity/StringIdentity.java
@@ -27,7 +27,7 @@
 {
     private final String value;
 
-    public StringIdentity(String value)
+    private StringIdentity(String value)
     {
         Objects.requireNonNull( value, "Identity can not be null." );
         this.value = value;
@@ -55,7 +55,7 @@
         return value;
     }
 
-    public static Identity fromString(String serializedState)
+    public static Identity identityOf( String serializedState )
     {
         return new StringIdentity( serializedState );
     }
diff --git a/core/api/src/main/java/org/apache/polygene/api/identity/UuidGeneratorMixin.java b/core/api/src/main/java/org/apache/polygene/api/identity/UuidGeneratorMixin.java
index 0add4c6..6e71bac 100644
--- a/core/api/src/main/java/org/apache/polygene/api/identity/UuidGeneratorMixin.java
+++ b/core/api/src/main/java/org/apache/polygene/api/identity/UuidGeneratorMixin.java
@@ -27,6 +27,6 @@
     @Override
     public Identity generate(Class<?> compositeType)
     {
-        return StringIdentity.fromString(UUID.randomUUID().toString());
+        return StringIdentity.identityOf( UUID.randomUUID().toString() );
     }
 }
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java b/core/api/src/main/java/org/apache/polygene/api/indexing/IndexingException.java
similarity index 68%
copy from extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java
copy to core/api/src/main/java/org/apache/polygene/api/indexing/IndexingException.java
index b792a17..d9764e8 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/indexing/IndexingException.java
@@ -14,23 +14,21 @@
  *  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.polygene.api.indexing;
+
+/**
+ * This is the exception for Indexing problems. Subtypes should be created for specific problems.
  *
  */
-package org.apache.polygene.index.elasticsearch;
-
-public class ElasticSearchIndexException
-        extends RuntimeException
+public abstract class IndexingException extends RuntimeException
 {
-
-    public ElasticSearchIndexException( String string )
+    public IndexingException( String message )
     {
-        super( string );
+        super( message );
     }
-
-    public ElasticSearchIndexException( String string, Throwable thrwbl )
+    public IndexingException( String message, Throwable cause )
     {
-        super( string, thrwbl );
+        super( message, cause );
     }
-
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/query/MissingIndexingSystemException.java b/core/api/src/main/java/org/apache/polygene/api/indexing/MissingIndexingSystemException.java
similarity index 85%
rename from core/api/src/main/java/org/apache/polygene/api/query/MissingIndexingSystemException.java
rename to core/api/src/main/java/org/apache/polygene/api/indexing/MissingIndexingSystemException.java
index e15cbee..cf0fd00 100644
--- a/core/api/src/main/java/org/apache/polygene/api/query/MissingIndexingSystemException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/indexing/MissingIndexingSystemException.java
@@ -17,17 +17,16 @@
  *
  *
  */
-package org.apache.polygene.api.query;
+package org.apache.polygene.api.indexing;
+
+import org.apache.polygene.api.query.QueryException;
 
 /**
  * This Exception is thrown in <code>QueryBuilderFactory.newQueryBuilder()</code> method if
  * no indexing subsystem has been declared in the assembly.
  */
-public final class MissingIndexingSystemException
-    extends QueryException
+public final class MissingIndexingSystemException extends IndexingException
 {
-    private static final long serialVersionUID = 5147421865890379209L;
-
     public MissingIndexingSystemException()
     {
         super( "No EntityFinder has been declared in the assembly of the application." );
diff --git a/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectException.java b/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java
similarity index 92%
rename from core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectException.java
rename to core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java
index 82b63bd..af1801f 100644
--- a/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java
@@ -26,7 +26,7 @@
 /**
  * This exception is thrown if no visible Object of the requested type can be found.
  */
-public class NoSuchObjectException
+public class NoSuchObjectTypeException
     extends InvalidApplicationException
 {
     private static final long serialVersionUID = -1121690536365682511L;
@@ -34,7 +34,7 @@
     private final String objectType;
     private final String moduleName;
 
-    public NoSuchObjectException( String type, String moduleName, Stream<Class<?>> visible )
+    public NoSuchObjectTypeException( String type, String moduleName, Stream<Class<?>> visible )
     {
         super( "Could not find any visible Object of type [" + type + "] in module ["
                + moduleName
diff --git a/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java b/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java
index fddeeb1..a13a5bf 100644
--- a/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java
@@ -36,10 +36,10 @@
      * @return new objects.
      *
      * @throws ConstructionException Thrown if instantiation fails.
-     * @throws NoSuchObjectException Thrown if {@code type} class is not an object.
+     * @throws NoSuchObjectTypeException Thrown if {@code type} class is not an object.
      */
     <T> T newObject( Class<T> type, Object... uses )
-        throws NoSuchObjectException, ConstructionException;
+        throws NoSuchObjectTypeException, ConstructionException;
 
     /**
      * Inject an existing instance. Only fields and methods will be called.
diff --git a/core/api/src/main/java/org/apache/polygene/api/property/PropertyDescriptor.java b/core/api/src/main/java/org/apache/polygene/api/property/PropertyDescriptor.java
index 47a8db1..6c7df05 100644
--- a/core/api/src/main/java/org/apache/polygene/api/property/PropertyDescriptor.java
+++ b/core/api/src/main/java/org/apache/polygene/api/property/PropertyDescriptor.java
@@ -54,8 +54,6 @@
 
     AccessibleObject accessor();
 
-    InitialValueProvider initialValueProvider();
-
     Object resolveInitialValue(ModuleDescriptor moduleDescriptor);
 
     ValueType valueType();
diff --git a/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java b/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java
index 19ee958..de1a3a1 100644
--- a/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java
@@ -19,6 +19,8 @@
  */
 package org.apache.polygene.api.query;
 
+import org.apache.polygene.api.indexing.MissingIndexingSystemException;
+
 /**
  * This is used to create QueryBuilders.
  *
diff --git a/core/api/src/main/java/org/apache/polygene/api/service/NoSuchServiceException.java b/core/api/src/main/java/org/apache/polygene/api/service/NoSuchServiceException.java
deleted file mode 100644
index 31523b5..0000000
--- a/core/api/src/main/java/org/apache/polygene/api/service/NoSuchServiceException.java
+++ /dev/null
@@ -1,54 +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.polygene.api.service;
-
-import java.util.stream.Collectors;
-import org.apache.polygene.api.composite.CompositeDescriptor;
-import org.apache.polygene.api.composite.ModelDescriptor;
-import org.apache.polygene.api.composite.NoSuchCompositeException;
-import org.apache.polygene.api.structure.TypeLookup;
-
-/**
- * Thrown when no visible service of the requested type is found.
- */
-public class NoSuchServiceException extends NoSuchCompositeException
-{
-    public NoSuchServiceException( String typeName, String moduleName, TypeLookup typeLookup )
-    {
-        super( "ServiceComposite", typeName, moduleName, formatVisibleTypes( typeLookup ) );
-    }
-
-    private static String formatVisibleTypes( TypeLookup typeLookup )
-    {
-        return typeLookup.allServices()
-            .map( NoSuchServiceException::typeOf )
-            .collect( Collectors.joining( "\n", "Visible service types are:\n", "" ) );
-    }
-
-    private static String typeOf( ModelDescriptor descriptor )
-    {
-        if( descriptor instanceof CompositeDescriptor )
-        {
-            return ( (CompositeDescriptor) descriptor ).primaryType().getName();
-        }
-        return descriptor.types().map( Class::getName ).collect( Collectors.joining( ",", "[", "]") );
-    }
-}
diff --git a/core/api/src/main/java/org/apache/polygene/api/service/NoSuchServiceTypeException.java b/core/api/src/main/java/org/apache/polygene/api/service/NoSuchServiceTypeException.java
new file mode 100644
index 0000000..b55270c
--- /dev/null
+++ b/core/api/src/main/java/org/apache/polygene/api/service/NoSuchServiceTypeException.java
@@ -0,0 +1,48 @@
+/*
+ *  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.polygene.api.service;
+
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.polygene.api.composite.CompositeDescriptor;
+import org.apache.polygene.api.composite.ModelDescriptor;
+import org.apache.polygene.api.composite.NoSuchCompositeTypeException;
+import org.apache.polygene.api.structure.ModuleDescriptor;
+import org.apache.polygene.api.structure.TypeLookup;
+
+/**
+ * Thrown when no visible service of the requested type is found.
+ */
+public class NoSuchServiceTypeException extends NoSuchCompositeTypeException
+{
+    public NoSuchServiceTypeException( String typeName, ModuleDescriptor module )
+    {
+        super( "ServiceComposite", typeName, module );
+    }
+
+    @Override
+    protected Stream<? extends CompositeDescriptor> descriptors( TypeLookup typeLookup )
+    {
+        return typeLookup.allServices()
+                         .filter( descriptor -> descriptor instanceof ServiceDescriptor )
+                         .map( descriptor -> (ServiceDescriptor) descriptor );
+    }
+}
diff --git a/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java b/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java
index 8e7e9d5..28389ae 100644
--- a/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java
@@ -50,10 +50,10 @@
      *
      * @return a ServiceReference if one is found
      *
-     * @throws NoSuchServiceException if no service of serviceType is found
+     * @throws NoSuchServiceTypeException if no service of serviceType is found
      */
     <T> ServiceReference<T> findService( Class<T> serviceType )
-        throws NoSuchServiceException;
+        throws NoSuchServiceTypeException;
 
     /**
      * Find a ServiceReference that implements the given type.
@@ -63,10 +63,10 @@
      *
      * @return a ServiceReference if one is found
      *
-     * @throws NoSuchServiceException if no service of serviceType is found
+     * @throws NoSuchServiceTypeException if no service of serviceType is found
      */
     <T> ServiceReference<T> findService( Type serviceType )
-        throws NoSuchServiceException;
+        throws NoSuchServiceTypeException;
 
     /**
      * Find ServiceReferences that implements the given type.
diff --git a/core/api/src/main/java/org/apache/polygene/api/service/importer/ServiceInstanceImporter.java b/core/api/src/main/java/org/apache/polygene/api/service/importer/ServiceInstanceImporter.java
index b0abf1b..321a31b 100644
--- a/core/api/src/main/java/org/apache/polygene/api/service/importer/ServiceInstanceImporter.java
+++ b/core/api/src/main/java/org/apache/polygene/api/service/importer/ServiceInstanceImporter.java
@@ -41,18 +41,17 @@
     implements ServiceImporter<T>
 {
     @Structure
-    ServiceFinder finder;
+    private ServiceFinder finder;
 
-    ServiceImporter<T> service;
+    private ServiceImporter<T> service;
 
-    Identity serviceId;
+    private Identity serviceId;
 
     @Override
     public T importService( ImportedServiceDescriptor importedServiceDescriptor )
         throws ServiceImporterException
     {
         serviceId = importedServiceDescriptor.metaInfo( Identity.class );
-
         return serviceImporter().importService( importedServiceDescriptor );
     }
 
diff --git a/core/api/src/main/java/org/apache/polygene/api/structure/ApplicationDescriptor.java b/core/api/src/main/java/org/apache/polygene/api/structure/ApplicationDescriptor.java
index 82d01e0..2defddf 100644
--- a/core/api/src/main/java/org/apache/polygene/api/structure/ApplicationDescriptor.java
+++ b/core/api/src/main/java/org/apache/polygene/api/structure/ApplicationDescriptor.java
@@ -40,4 +40,14 @@
      * @return the Application's name
      */
     String name();
+
+    /**
+     * @return the Application's version
+     */
+    String version();
+
+    /**
+     * @return the Application's runtime mode
+     */
+    Application.Mode mode();
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/structure/LayerDescriptor.java b/core/api/src/main/java/org/apache/polygene/api/structure/LayerDescriptor.java
index e8270ae..c68e02f 100644
--- a/core/api/src/main/java/org/apache/polygene/api/structure/LayerDescriptor.java
+++ b/core/api/src/main/java/org/apache/polygene/api/structure/LayerDescriptor.java
@@ -32,7 +32,6 @@
  */
 public interface LayerDescriptor
 {
-
     /**
      * @return the Layer's name
      */
@@ -45,6 +44,8 @@
      */
     UsedLayersDescriptor usedLayers();
 
+    Stream<? extends ModuleDescriptor> modules();
+
     Stream<? extends ObjectDescriptor> visibleObjects( Visibility visibility );
 
     Stream<? extends TransientDescriptor> visibleTransients( Visibility visibility );
diff --git a/core/api/src/main/java/org/apache/polygene/api/unitofwork/NoSuchEntityTypeException.java b/core/api/src/main/java/org/apache/polygene/api/unitofwork/NoSuchEntityTypeException.java
index bd038f2..8dd5668 100644
--- a/core/api/src/main/java/org/apache/polygene/api/unitofwork/NoSuchEntityTypeException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/unitofwork/NoSuchEntityTypeException.java
@@ -19,26 +19,28 @@
  */
 package org.apache.polygene.api.unitofwork;
 
-import java.util.stream.Collectors;
-import org.apache.polygene.api.composite.NoSuchCompositeException;
+import java.util.stream.Stream;
+import org.apache.polygene.api.composite.CompositeDescriptor;
+import org.apache.polygene.api.composite.NoSuchCompositeTypeException;
+import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.structure.TypeLookup;
 
+import static java.util.stream.Collectors.joining;
+
 /**
  * Polygene exception to be thrown in case that an entity composite
  * was not found during a lookup call.
  */
-public class NoSuchEntityTypeException
-    extends NoSuchCompositeException
+public class NoSuchEntityTypeException extends NoSuchCompositeTypeException
 {
-    public NoSuchEntityTypeException( String typeName, String moduleName, TypeLookup typeLookup )
+    public NoSuchEntityTypeException( String typeName, ModuleDescriptor module )
     {
-        super( "EntityComposite", typeName, moduleName, formatVisibleTypes( typeLookup ) );
+        super( "EntityComposite", typeName, module );
     }
 
-    private static String formatVisibleTypes( TypeLookup typeLookup )
+    @Override
+    protected Stream<? extends CompositeDescriptor> descriptors( TypeLookup typeLookup )
     {
-        return typeLookup.allEntities()
-            .map( descriptor -> descriptor.primaryType().getName() )
-            .collect( Collectors.joining( "\n", "Visible entity types are:\n", "" ) );
+        return typeLookup.allEntities();
     }
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java
index badbe4c..168a55c 100644
--- a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java
+++ b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java
@@ -23,7 +23,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.function.BiFunction;
 import java.util.function.Function;
 import java.util.stream.Stream;
 import org.apache.polygene.api.association.AssociationDescriptor;
@@ -42,7 +41,6 @@
 import org.apache.polygene.api.structure.MetaInfoHolder;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.usecase.Usecase;
-import org.apache.polygene.api.value.ValueBuilder;
 
 /**
  * All operations on entities goes through an UnitOfWork.
diff --git a/core/api/src/main/java/org/apache/polygene/api/value/NoSuchValueException.java b/core/api/src/main/java/org/apache/polygene/api/value/NoSuchValueTypeException.java
similarity index 62%
rename from core/api/src/main/java/org/apache/polygene/api/value/NoSuchValueException.java
rename to core/api/src/main/java/org/apache/polygene/api/value/NoSuchValueTypeException.java
index 4e5cb30..6538a31 100644
--- a/core/api/src/main/java/org/apache/polygene/api/value/NoSuchValueException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/value/NoSuchValueTypeException.java
@@ -19,25 +19,27 @@
  */
 package org.apache.polygene.api.value;
 
-import java.util.stream.Collectors;
-import org.apache.polygene.api.composite.NoSuchCompositeException;
+import java.util.stream.Stream;
+import org.apache.polygene.api.composite.CompositeDescriptor;
+import org.apache.polygene.api.composite.NoSuchCompositeTypeException;
+import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.structure.TypeLookup;
 
+import static java.util.stream.Collectors.joining;
+
 /**
  * Thrown when no visible value of the requested type is found.
  */
-public class NoSuchValueException
-    extends NoSuchCompositeException
+public class NoSuchValueTypeException extends NoSuchCompositeTypeException
 {
-    public NoSuchValueException( String valueType, String moduleName, TypeLookup typeLookup )
+    public NoSuchValueTypeException( String valueType, ModuleDescriptor module )
     {
-        super( "ValueComposite", valueType, moduleName, formatVisibleTypes(typeLookup) );
+        super( "ValueComposite", valueType, module );
     }
 
-    private static String formatVisibleTypes( TypeLookup typeLookup )
+    @Override
+    protected Stream<? extends CompositeDescriptor> descriptors( TypeLookup typeLookup )
     {
-        return typeLookup.allValues()
-            .map(descriptor -> descriptor.primaryType().getName())
-            .collect( Collectors.joining( "\n", "Visible value types are:\n", "" ) );
+        return typeLookup.allValues();
     }
 }
\ No newline at end of file
diff --git a/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java b/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java
index 510c373..65cce37 100644
--- a/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java
@@ -41,11 +41,11 @@
      *
      * @return a new Value instance
      *
-     * @throws NoSuchValueException if no value extending the mixinType has been registered
+     * @throws NoSuchValueTypeException if no value extending the mixinType has been registered
      * @throws ConstructionException if the value could not be instantiated
      */
     <T> T newValue( Class<T> valueType )
-        throws NoSuchValueException, ConstructionException;
+        throws NoSuchValueTypeException, ConstructionException;
 
     /**
      * Create a builder for creating new Values that implements the given Value type.
@@ -56,10 +56,10 @@
      *
      * @return a ValueBuilder for creation of ValueComposites implementing the interface
      *
-     * @throws NoSuchValueException if no value extending the mixinType has been registered
+     * @throws NoSuchValueTypeException if no value extending the mixinType has been registered
      */
     <T> ValueBuilder<T> newValueBuilder( Class<T> valueType )
-        throws NoSuchValueException;
+        throws NoSuchValueTypeException;
 
     /**
      * Create a builder for creating a new Value starting with the given prototype.
@@ -70,7 +70,7 @@
      *
      * @return a ValueBuilder for creation of ValueComposites implementing the interface of the prototype
      *
-     * @throws NoSuchValueException if no value extending the mixinType has been registered
+     * @throws NoSuchValueTypeException if no value extending the mixinType has been registered
      */
     <T> ValueBuilder<T> newValueBuilderWithPrototype( T prototype );
 
@@ -87,7 +87,7 @@
      *
      * @return a ValueBuilder for creation of ValueComposites implementing the interface
      *
-     * @throws NoSuchValueException if no value extending the mixinType has been registered
+     * @throws NoSuchValueTypeException if no value extending the mixinType has been registered
      */
     <T> ValueBuilder<T> newValueBuilderWithState( Class<T> mixinType,
                                                   Function<PropertyDescriptor, Object> propertyFunction,
@@ -104,7 +104,7 @@
      *
      * @return a new Value instance
      *
-     * @throws NoSuchValueException if no value extending the mixinType has been registered
+     * @throws NoSuchValueTypeException if no value extending the mixinType has been registered
      * @throws ConstructionException if the value could not be instantiated
      */
     <T> T newValueFromSerializedState( Class<T> valueType, String serializedState );
diff --git a/core/api/src/test/java/org/apache/polygene/api/OperatorsTest.java b/core/api/src/test/java/org/apache/polygene/api/OperatorsTest.java
index 123e726..9f3be8e 100644
--- a/core/api/src/test/java/org/apache/polygene/api/OperatorsTest.java
+++ b/core/api/src/test/java/org/apache/polygene/api/OperatorsTest.java
@@ -33,10 +33,7 @@
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.value.ValueComposite;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Assert;
 import org.junit.Test;
@@ -48,30 +45,25 @@
 {
     @Test
     public void testOperators()
-        throws UnitOfWorkCompletionException, ActivationException, AssemblyException
+        throws UnitOfWorkCompletionException, ActivationException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> {
                 new EntityTestAssembler().assemble( module );
 
                 module.entities( TestEntity.class );
                 module.values( TestValue.class );
                 module.forMixin( TestEntity.class ).declareDefaults().foo().set( "Bar" );
                 module.forMixin( TestValue.class ).declareDefaults().bar().set( "Xyz" );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
-        };
+        );
 
         UnitOfWorkFactory uowf = assembler.module().unitOfWorkFactory();
         UnitOfWork uow = uowf.newUnitOfWork();
 
         try
         {
-            EntityBuilder<TestEntity> entityBuilder = uow.newEntityBuilder( TestEntity.class, new StringIdentity( "123" ) );
+            EntityBuilder<TestEntity> entityBuilder = uow.newEntityBuilder( TestEntity.class, StringIdentity.identityOf( "123" ) );
             entityBuilder.instance().value().set( assembler.module().newValue( TestValue.class ) );
             TestEntity testEntity = entityBuilder.newInstance();
 
diff --git a/core/api/src/test/java/org/apache/polygene/api/activation/PassivationExceptionTest.java b/core/api/src/test/java/org/apache/polygene/api/activation/PassivationExceptionTest.java
index ba7bca9..3637fb9 100644
--- a/core/api/src/test/java/org/apache/polygene/api/activation/PassivationExceptionTest.java
+++ b/core/api/src/test/java/org/apache/polygene/api/activation/PassivationExceptionTest.java
@@ -22,21 +22,20 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.Arrays;
-import java.util.Collections;
-import org.junit.Test;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.Layer;
 import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.builder.ApplicationBuilder;
+import org.junit.Test;
 
-import static org.hamcrest.core.StringContains.containsString;
+import static java.util.Collections.emptyList;
+import static java.util.Collections.singletonList;
 import static org.hamcrest.core.IsEqual.equalTo;
+import static org.hamcrest.core.StringContains.containsString;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 
@@ -52,14 +51,14 @@
     @Test
     public void testEmptyPassivationException()
     {
-        PassivationException empty = new PassivationException( Collections.emptyList() );
+        PassivationException empty = new PassivationException( emptyList() );
         assertThat( empty.getMessage(), containsString( "has 0 cause" ) );
     }
 
     @Test
     public void testSinglePassivationException()
     {
-        PassivationException single = new PassivationException( Collections.singletonList( new Exception( "single" ) ) );
+        PassivationException single = new PassivationException( singletonList( new Exception( "single" ) ) );
         String stack = stack( single );
         assertThat( single.getMessage(), containsString( "has 1 cause" ) );
         assertThat( stack, containsString( "Suppressed: java.lang.Exception: single" ) );
@@ -83,30 +82,16 @@
         throws AssemblyException, ActivationException
     {
         ApplicationBuilder appBuilder = new ApplicationBuilder( "TestApplication" );
-        appBuilder.withLayer( "Layer 1" ).withModule( "Module A" ).withAssembler( new Assembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.services( TestService.class ).
-                    identifiedBy( "TestService_Module.A" ).
-                    withActivators( FailBeforePassivationServiceActivator.class ).
-                    instantiateOnStartup();
-            }
-        } );
-        appBuilder.withLayer( "Layer 2" ).withModule( "Module B" ).withAssembler( new Assembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.services( TestService.class ).
-                    identifiedBy( "TestService_Module.B" ).
-                    withActivators( FailAfterPassivationServiceActivator.class ).
-                    instantiateOnStartup();
-            }
-        } );
+        appBuilder.withLayer( "Layer 1" ).withModule( "Module A" ).withAssembler(
+            module -> module.services( TestService.class )
+                            .identifiedBy( "TestService_Module.A" )
+                            .withActivators( FailBeforePassivationServiceActivator.class )
+                            .instantiateOnStartup() );
+        appBuilder.withLayer( "Layer 2" ).withModule( "Module B" ).withAssembler(
+            module -> module.services( TestService.class )
+                            .identifiedBy( "TestService_Module.B" )
+                            .withActivators( FailAfterPassivationServiceActivator.class )
+                            .instantiateOnStartup() );
         appBuilder.registerActivationEventListener( new TestActivationEventListener() );
 
         Application app = appBuilder.newApplication();
@@ -132,12 +117,18 @@
                 assertThat( stack, containsString( "EVENT: FAIL BEFORE PASSIVATION for TestApplication" ) );
                 assertThat( stack, containsString( "EVENT: FAIL BEFORE PASSIVATION for Layer 2" ) );
                 assertThat( stack, containsString( "EVENT: FAIL BEFORE PASSIVATION for Module B" ) );
-                assertThat( stack, containsString( "ACTIVATOR: FAIL AFTER PASSIVATION for TestService_Module.B(active=false,module='Module B')" ) );
+                assertThat(
+                    stack,
+                    containsString(
+                        "ACTIVATOR: FAIL AFTER PASSIVATION for TestService_Module.B(active=false,module='Module B')" ) );
                 assertThat( stack, containsString( "EVENT: FAIL AFTER PASSIVATION for Module B" ) );
                 assertThat( stack, containsString( "EVENT: FAIL AFTER PASSIVATION for Layer 2" ) );
                 assertThat( stack, containsString( "EVENT: FAIL BEFORE PASSIVATION for Layer 1" ) );
                 assertThat( stack, containsString( "EVENT: FAIL BEFORE PASSIVATION for Module A" ) );
-                assertThat( stack, containsString( "ACTIVATOR: FAIL BEFORE PASSIVATION for TestService_Module.A(active=true,module='Module A')" ) );
+                assertThat(
+                    stack,
+                    containsString(
+                        "ACTIVATOR: FAIL BEFORE PASSIVATION for TestService_Module.A(active=true,module='Module A')" ) );
                 assertThat( stack, containsString( "EVENT: FAIL AFTER PASSIVATION for Module A" ) );
                 assertThat( stack, containsString( "EVENT: FAIL AFTER PASSIVATION for Layer 1" ) );
                 assertThat( stack, containsString( "EVENT: FAIL AFTER PASSIVATION for TestApplication" ) );
@@ -150,7 +141,7 @@
     {
         String hello();
 
-        static class Mixin
+        class Mixin
             implements TestService
         {
             @Structure
@@ -163,7 +154,6 @@
                 return "Hello Polygene!";
             }
         }
-
     }
 
     public static class FailBeforePassivationServiceActivator
@@ -210,5 +200,4 @@
             }
         }
     }
-
 }
diff --git a/core/api/src/test/java/org/apache/polygene/api/composite/PropertyMapperTest.java b/core/api/src/test/java/org/apache/polygene/api/composite/PropertyMapperTest.java
index d285102..c2b6ccb 100644
--- a/core/api/src/test/java/org/apache/polygene/api/composite/PropertyMapperTest.java
+++ b/core/api/src/test/java/org/apache/polygene/api/composite/PropertyMapperTest.java
@@ -30,6 +30,7 @@
 import java.util.Set;
 import org.junit.Test;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -41,8 +42,7 @@
     {
         try
         {
-            MAP_TO_TYPE = PropertyMapper.class.getDeclaredMethod( "mapToType", Composite.class, Type.class, Object.class );
-            MAP_TO_TYPE.setAccessible( true );
+            MAP_TO_TYPE = accessible( PropertyMapper.class.getDeclaredMethod( "mapToType", Composite.class, Type.class, Object.class ) );
         }
         catch( NoSuchMethodException e )
         {
diff --git a/core/api/src/test/java/org/apache/polygene/api/docsupport/ApplicationDocs.java b/core/api/src/test/java/org/apache/polygene/api/docsupport/ApplicationDocs.java
index c6a6e78..de60c22 100644
--- a/core/api/src/test/java/org/apache/polygene/api/docsupport/ApplicationDocs.java
+++ b/core/api/src/test/java/org/apache/polygene/api/docsupport/ApplicationDocs.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.ApplicationDescriptor;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.Assembler;
@@ -38,14 +37,9 @@
     {
         {
 // START SNIPPET: application1
-            SingletonAssembler polygene = new SingletonAssembler()
-            {
-                public void assemble( ModuleAssembly assembly )
-                    throws AssemblyException
-                {
-                    assembly.values( MyStuffValueComposite.class );
-                }
-            };
+            SingletonAssembler polygene = new SingletonAssembler(
+                module -> module.values( MyStuffValueComposite.class )
+            );
 // END SNIPPET: application1
         }
         {
@@ -82,16 +76,7 @@
                     }
                 };
             Energy4Java polygene = new Energy4Java();
-            Application app = polygene.newApplication( new ApplicationAssembler()
-            {
-
-                @Override
-                public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-                    throws AssemblyException
-                {
-                    return applicationFactory.newApplicationAssembly( assemblers );
-                }
-            } );
+            Application app = polygene.newApplication( factory -> factory.newApplicationAssembly( assemblers ) );
             app.activate();
 // END SNIPPET: application2
         }
@@ -118,15 +103,7 @@
         throws Exception
     {
         polygene = new Energy4Java();
-        ApplicationDescriptor model = polygene.newApplicationModel( new ApplicationAssembler()
-        {
-            @Override
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-                throws AssemblyException
-            {
-                return createAssembly( applicationFactory );
-            }
-        } );
+        ApplicationDescriptor model = polygene.newApplicationModel( factory -> createAssembly( factory ) );
         Application application = model.newInstance( polygene.spi() );
     }
 
diff --git a/core/api/src/test/java/org/apache/polygene/api/type/ValueTypeFactoryTest.java b/core/api/src/test/java/org/apache/polygene/api/type/ValueTypeFactoryTest.java
index 7f093af..95d328a 100644
--- a/core/api/src/test/java/org/apache/polygene/api/type/ValueTypeFactoryTest.java
+++ b/core/api/src/test/java/org/apache/polygene/api/type/ValueTypeFactoryTest.java
@@ -125,7 +125,7 @@
         try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             assertThat(
-                valueTypeFactory.valueTypeOf( module, uow.newEntity( SomeState.class, new StringIdentity( "abc" ) ) ),
+                valueTypeFactory.valueTypeOf( module, uow.newEntity( SomeState.class, StringIdentity.identityOf( "abc" ) ) ),
                 instanceOf( EntityCompositeType.class ) );
         }
     }
diff --git a/core/api/src/test/java/org/apache/polygene/api/unitofwork/RemovalTest.java b/core/api/src/test/java/org/apache/polygene/api/unitofwork/RemovalTest.java
index 87d609c..c401167 100644
--- a/core/api/src/test/java/org/apache/polygene/api/unitofwork/RemovalTest.java
+++ b/core/api/src/test/java/org/apache/polygene/api/unitofwork/RemovalTest.java
@@ -20,16 +20,16 @@
 
 package org.apache.polygene.api.unitofwork;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 public class RemovalTest
     extends AbstractPolygeneTest
@@ -49,7 +49,7 @@
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
-            EntityBuilder<TestEntity> builder = uow.newEntityBuilder( TestEntity.class, new StringIdentity( "123" ) );
+            EntityBuilder<TestEntity> builder = uow.newEntityBuilder( TestEntity.class, StringIdentity.identityOf( "123" ) );
             builder.instance().test().set( "habba" );
             TestEntity test = builder.newInstance();
             uow.remove( test );
diff --git a/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToEntityConversionTest.java b/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToEntityConversionTest.java
index 5f5a5b5..52d4901 100644
--- a/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToEntityConversionTest.java
+++ b/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToEntityConversionTest.java
@@ -65,7 +65,7 @@
     public void testPropertyConversionToEntity()
         throws Exception
     {
-        Identity identity = new StringIdentity( "Niclas" );
+        Identity identity = StringIdentity.identityOf( "Niclas" );
         ValueBuilder<SomeType> vb = valueBuilderFactory.newValueBuilder( SomeType.class );
         SomeType prototype = vb.prototype();
         prototype.identity().set( identity );
diff --git a/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToValueConversionTest.java b/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToValueConversionTest.java
index 08751d4..3b768bb 100644
--- a/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToValueConversionTest.java
+++ b/core/api/src/test/java/org/apache/polygene/api/unitofwork/ToValueConversionTest.java
@@ -73,11 +73,11 @@
         SomeType value;
         try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork(usecase) )
         {
-            SomeType entity1 = createEntity( uow, new StringIdentity( "Niclas" ) );
-            SomeType entity2 = createEntity( uow, new StringIdentity( "Paul" ) );
-            SomeType entity3 = createEntity( uow, new StringIdentity( "Jiri" ) );
-            SomeType entity4 = createEntity( uow, new StringIdentity( "Kent" ) );
-            SomeType entity5 = createEntity( uow, new StringIdentity( "Stan" ) );
+            SomeType entity1 = createEntity( uow, StringIdentity.identityOf( "Niclas" ) );
+            SomeType entity2 = createEntity( uow, StringIdentity.identityOf( "Paul" ) );
+            SomeType entity3 = createEntity( uow, StringIdentity.identityOf( "Jiri" ) );
+            SomeType entity4 = createEntity( uow, StringIdentity.identityOf( "Kent" ) );
+            SomeType entity5 = createEntity( uow, StringIdentity.identityOf( "Stan" ) );
             entity1.assoc().set( entity2 );
             entity1.many().add( entity3 );
             entity1.named().put( "kent", entity4 );
@@ -89,7 +89,7 @@
         }
         try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork(usecase) )
         {
-            assertThat( value.identity().get(), equalTo( new StringIdentity( "Niclas" ) ) );
+            assertThat( value.identity().get(), equalTo( StringIdentity.identityOf( "Niclas" ) ) );
             assertThat( value.name().get(), equalTo( "[Niclas]" ) );
 
             assertThat( uow.toValue( SomeType.class, value.assoc().get()).name().get(), equalTo( "[Paul]" ));
diff --git a/core/api/src/test/java/org/apache/polygene/api/value/DocumentationSupport.java b/core/api/src/test/java/org/apache/polygene/api/value/DocumentationSupport.java
index 245cc16..725e33e 100644
--- a/core/api/src/test/java/org/apache/polygene/api/value/DocumentationSupport.java
+++ b/core/api/src/test/java/org/apache/polygene/api/value/DocumentationSupport.java
@@ -31,6 +31,7 @@
 import org.apache.polygene.api.serialization.Deserializer;
 import org.apache.polygene.api.serialization.Serializer;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.serialization.javaxjson.assembly.JavaxJsonSerializationAssembler;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.junit.Test;
 
@@ -57,6 +58,16 @@
     public void assemble( ModuleAssembly module )
     {
         module.values( SomeValue.class ); // (2)
+        // END SNIPPET: default
+        // END SNIPPET: service
+        // START SNIPPET: default
+        module.defaultServices(); // (3)
+        // END SNIPPET: default
+        // START SNIPPET: service
+        new JavaxJsonSerializationAssembler().assemble( module ); // (3)
+        // END SNIPPET: service
+        // START SNIPPET: default
+        // START SNIPPET: service
     }
     // END SNIPPET: default
     // END SNIPPET: service
@@ -65,9 +76,9 @@
     // START SNIPPET: default
     public void defaultSerialization()
     {
-        SomeValue someValue = someNewValueInstance(); // (3)
-        String json = someValue.toString(); // (4)
-        SomeValue someNewValue = valueBuilderFactory.newValueFromSerializedState( SomeValue.class, json ); // (5)
+        SomeValue someValue = someNewValueInstance(); // (4)
+        String json = someValue.toString(); // (5)
+        SomeValue someNewValue = valueBuilderFactory.newValueFromSerializedState( SomeValue.class, json ); // (6)
         // END SNIPPET: default
 
         assertThat( json, equalTo( "{\"foo\":\"bar\"}" ) );
@@ -100,7 +111,7 @@
     }
     // END SNIPPET: service
 
-    static enum AcmeValue
+    enum AcmeValue
     {
         foo,
         bar
diff --git a/core/bootstrap/src/docs/bootstrap.txt b/core/bootstrap/src/docs/bootstrap.txt
index e20b995..6e00521 100644
--- a/core/bootstrap/src/docs/bootstrap.txt
+++ b/core/bootstrap/src/docs/bootstrap.txt
@@ -232,7 +232,7 @@
 taking the JSON document as input on +System.in+.
 
 The format of the JSON document, directly reflects the application structure, such as
-[source,json]
+[source,javascript]
 ----
 {
     "name": "Build from JSON test.",
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssembler.java
index 37f4f5b..a0593d0 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssembler.java
@@ -32,6 +32,7 @@
  * and then activate the created application, which will be the runtime
  * instance that forms your application.
  */
+@FunctionalInterface
 public interface ApplicationAssembler
 {
     ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssemblerAdapter.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssemblerAdapter.java
index 22fe614..f870ec2 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssemblerAdapter.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationAssemblerAdapter.java
@@ -42,7 +42,6 @@
 
     @Override
     public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-        throws AssemblyException
     {
         return applicationFactory.newApplicationAssembly( assemblers );
     }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationName.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationName.java
index 2e1e553..7f908cb 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationName.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ApplicationName.java
@@ -35,7 +35,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.layer().application().setName( name );
     }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java
index 901f8d9..9e0ecd3 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assembler.java
@@ -26,6 +26,7 @@
  * all configuration and additional metainfo that is needed
  * to instantiate a Polygene application.
  */
+@FunctionalInterface
 public interface Assembler
 {
     /**
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assemblers.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assemblers.java
index b24a5e6..7efcd6d 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assemblers.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Assemblers.java
@@ -117,7 +117,7 @@
      * Assembler with Visibility adapter.
      * @param <AssemblerType> Parameterized type of Assembler
      */
-    public static abstract class Visibility<AssemblerType>
+    public static abstract class Visibility<AssemblerType> extends AssembleChecker
         implements Visible<AssemblerType>
     {
         private org.apache.polygene.api.common.Visibility visibility = org.apache.polygene.api.common.Visibility.module;
@@ -141,7 +141,7 @@
      * Assembler with Identity adapter.
      * @param <AssemblerType> Parameterized type of Assembler
      */
-    public static abstract class Identity<AssemblerType>
+    public static abstract class Identity<AssemblerType> extends AssembleChecker
         implements Identifiable<AssemblerType>
     {
         private String identity;
@@ -171,7 +171,7 @@
      * Assembler with Configuration adapter.
      * @param <AssemblerType> Parameterized type of Assembler
      */
-    public static abstract class Config<AssemblerType>
+    public static abstract class Config<AssemblerType> extends AssembleChecker
         implements Configurable<AssemblerType>
     {
         private ModuleAssembly configModule = null;
@@ -210,7 +210,7 @@
      * Assembler with Visibility and Identity adapter.
      * @param <AssemblerType> Parameterized type of Assembler
      */
-    public static abstract class VisibilityIdentity<AssemblerType>
+    public static abstract class VisibilityIdentity<AssemblerType> extends AssembleChecker
         implements Visible<AssemblerType>,
                    Identifiable<AssemblerType>
     {
@@ -256,7 +256,7 @@
      * Assembler with Visibility and Configuration adapter.
      * @param <AssemblerType> Parameterized type of Assembler
      */
-    public static abstract class VisibilityConfig<AssemblerType>
+    public static abstract class VisibilityConfig<AssemblerType> extends AssembleChecker
         implements Visible<AssemblerType>,
                    Configurable<AssemblerType>
     {
@@ -311,7 +311,7 @@
      * Assembler with Identity and Configuration adapter.
      * @param <AssemblerType> Parameterized type of Assembler
      */
-    public static abstract class IdentityConfig<AssemblerType>
+    public static abstract class IdentityConfig<AssemblerType> extends AssembleChecker
         implements Identifiable<AssemblerType>,
                    Configurable<AssemblerType>
     {
@@ -372,7 +372,7 @@
      * Assembler with Visibility, Identity and Configuation adapter.
      * @param <AssemblerType> Parameterized type of Assembler
      */
-    public static abstract class VisibilityIdentityConfig<AssemblerType>
+    public static abstract class VisibilityIdentityConfig<AssemblerType> extends AssembleChecker
         implements Visible<AssemblerType>,
                    Identifiable<AssemblerType>,
                    Configurable<AssemblerType>
@@ -445,4 +445,46 @@
         }
     }
 
+    public static abstract class AssembleChecker
+        implements Assembler
+    {
+        private boolean assembled = false;
+
+        @Override
+        public void assemble( ModuleAssembly module )
+            throws AssemblyException
+        {
+            assembled = true;
+        }
+
+        @Override
+        protected void finalize()
+            throws Throwable
+        {
+            super.finalize();
+            if( !assembled )
+            {
+                System.err.println( "WARNING!!!!!" );
+                System.err.println( "############################################################################" );
+                System.err.println( "##" );
+                System.err.println( "##  The " + getClass().getName() + " assembler was not assembled." );
+                System.err.println( "##" );
+                System.err.println( "##  Expect that some functionality to be missing or incorrect." );
+                System.err.println( "##" );
+                if( getClass().getName().startsWith( "org.apache.polygene" ))
+                {
+                    System.err.println( "## When instantiating a provided Assembler, you must call the assemble(module)" );
+                    System.err.println( "## method after setting the options. This was not done." );
+                }
+                else
+                {
+                    System.err.println( "## When overriding any helper class in org.apache.polygene.bootstrap.Assemblers" );
+                    System.err.println( "## you must call super.assemble(module) in the assmeble(ModuleAssembly module)" );
+                    System.err.println( "## method. This was not done, OR that you forgot to call assemble() method " );
+                    System.err.println( "## after instantiating and setting the options." );
+                }
+                System.err.println( "############################################################################" );
+            }
+        }
+    }
 }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java
index f3c933c..4a2211e 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java
@@ -22,6 +22,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.util.List;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -29,10 +30,10 @@
  */
 public class AssemblyReportException extends AssemblyException
 {
-    private List<Throwable> problems;
+    private Set<Throwable> problems;
     private String modelReport;
 
-    public AssemblyReportException( List<Throwable> problems )
+    public AssemblyReportException( Set<Throwable> problems )
     {
         this.problems = problems;
     }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerName.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerName.java
index 36e6435..7b326ff 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerName.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/LayerName.java
@@ -35,7 +35,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.layer().setName( name );
     }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MetaInfoDeclaration.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MetaInfoDeclaration.java
index 348ac10..2967fe5 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MetaInfoDeclaration.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MetaInfoDeclaration.java
@@ -29,7 +29,6 @@
 import java.util.HashMap;
 import java.util.Map;
 import org.apache.polygene.api.common.MetaInfo;
-import org.apache.polygene.api.property.InitialValueProvider;
 import org.apache.polygene.api.property.Property;
 
 /**
@@ -218,12 +217,5 @@
             metaInfo.set( info );
             return this;
         }
-
-        @Override
-        public MixinDeclaration<T> declareInitialValueProvider(InitialValueProvider provider)
-        {
-            metaInfo.add( InitialValueProvider.class, provider);
-            return this;
-        }
     }
 }
\ No newline at end of file
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MixinDeclaration.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MixinDeclaration.java
index a50f305..90e22f4 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MixinDeclaration.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MixinDeclaration.java
@@ -20,8 +20,6 @@
 
 package org.apache.polygene.bootstrap;
 
-import org.apache.polygene.api.property.InitialValueProvider;
-
 /**
  * Fluent API for declaring information about properties
  *
@@ -32,6 +30,4 @@
     T declareDefaults();
 
     MixinDeclaration<T> setMetaInfo( Object info );
-
-    MixinDeclaration<T> declareInitialValueProvider(InitialValueProvider provider);
 }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleAssembly.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleAssembly.java
index 988ab94..9ed6402 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleAssembly.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleAssembly.java
@@ -71,6 +71,18 @@
     ModuleAssembly setMetaInfo( Object info );
 
     /**
+     * Assemble default services for {@link org.apache.polygene.api.identity.IdentityGenerator},
+     * {@link org.apache.polygene.api.serialization.Serialization} and
+     * {@link org.apache.polygene.api.metrics.MetricsProvider}.
+     *
+     * If one of this default services is already assembled on this module it is not added.
+     * The returned {@link ServiceDeclaration} only apply to effectively defaulted services.
+     *
+     * @return the declaration for assembled services
+     */
+    ServiceDeclaration defaultServices();
+
+    /**
      * Set the module activators. Activators are executed in order around the
      * Module activation and passivation.
      *
@@ -87,7 +99,7 @@
      *
      * @param transientTypes The types that specifies the Transient types.
      *
-     * @return An TransientDeclaration for the specified Transient types.
+     * @return A TransientDeclaration for the specified Transient types.
      */
     TransientDeclaration transients( Class<?>... transientTypes );
 
@@ -97,7 +109,7 @@
      *
      * @param specification The Specification that specifies the TransientComposite types of interest.
      *
-     * @return An TransientDeclaration for the specified TransientComposite types.
+     * @return A TransientDeclaration for the specified TransientComposite types.
      */
     TransientDeclaration transients( Predicate<? super TransientAssembly> specification );
 
@@ -107,7 +119,7 @@
      *
      * @param valueTypes The types that specifies the Value types.
      *
-     * @return An ValueDeclaration for the specified Value types.
+     * @return A ValueDeclaration for the specified Value types.
      */
     ValueDeclaration values( Class<?>... valueTypes );
 
@@ -117,7 +129,7 @@
      *
      * @param specification The Specification that specifies the ValueComposite types of interest.
      *
-     * @return An ValueDeclaration for the specified ValueComposite types.
+     * @return A ValueDeclaration for the specified ValueComposite types.
      */
     ValueDeclaration values( Predicate<? super ValueAssembly> specification );
 
@@ -147,7 +159,7 @@
      *
      * @param configurationTypes The types that specifies the Configuration types.
      *
-     * @return An ConfigurationDeclaration for the specified Configuration types.
+     * @return A ConfigurationDeclaration for the specified Configuration types.
      */
     ConfigurationDeclaration configurations( Class<?>... configurationTypes );
 
@@ -157,7 +169,7 @@
      *
      * @param specification The Specification that specifies the ConfigurationComposite types of interest.
      *
-     * @return An ConfigurationDeclaration for the specified EntityComposite types.
+     * @return A ConfigurationDeclaration for the specified EntityComposite types.
      */
     ConfigurationDeclaration configurations( Predicate<HasTypes> specification );
 
@@ -191,7 +203,7 @@
      *
      * @param serviceTypes The types that specifies the Service types.
      *
-     * @return An ServiceDeclaration for the specified Service types.
+     * @return A ServiceDeclaration for the specified Service types.
      */
     ServiceDeclaration addServices( Class<?>... serviceTypes );
 
@@ -201,7 +213,7 @@
      *
      * @param serviceTypes The types that specifies the Service types.
      *
-     * @return An ServiceDeclaration for the specified Service types.
+     * @return A ServiceDeclaration for the specified Service types.
      */
     ServiceDeclaration services( Class<?>... serviceTypes );
 
@@ -211,7 +223,7 @@
      *
      * @param specification The Specification that specifies the ServiceComposite types of interest.
      *
-     * @return An ServiceDeclaration for the specified ServiceComposite types.
+     * @return A ServiceDeclaration for the specified ServiceComposite types.
      */
     ServiceDeclaration services( Predicate<? super ServiceAssembly> specification );
 
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleName.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleName.java
index 72ba9ce..93ee278 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleName.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/ModuleName.java
@@ -35,7 +35,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.setName( name );
     }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
index 01673f8..7016795 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/SingletonAssembler.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.bootstrap;
 
-import java.util.function.Consumer;
 import org.apache.polygene.api.PolygeneAPI;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
@@ -45,7 +44,7 @@
     private final Energy4Java polygene;
     private final Application applicationInstance;
     private final Module moduleInstance;
-    private Consumer<ModuleAssembly> assemble;
+    private Assembler assemble;
 
     /**
      * Creates a Polygene Runtime instance containing one Layer with one Module.
@@ -58,7 +57,7 @@
      *                             the programming model makes it impossible to create it.
      * @throws ActivationException If the automatic {@code activate()} method is throwing this Exception..
      */
-    public SingletonAssembler( Consumer<ModuleAssembly> assemble )
+    public SingletonAssembler( Assembler assemble )
         throws ActivationException
     {
         this.assemble = assemble;
@@ -173,11 +172,10 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         if( assemble != null )
         {
-            assemble.accept( module );
+            assemble.assemble( module );
         }
     }
 }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ApplicationBuilder.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ApplicationBuilder.java
index 6159686..0302763 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ApplicationBuilder.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ApplicationBuilder.java
@@ -36,9 +36,7 @@
 import org.apache.polygene.api.activation.ApplicationPassivationThread;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.ApplicationDescriptor;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
@@ -103,38 +101,32 @@
         throws AssemblyException, ActivationException
     {
         Energy4Java polygene = new Energy4Java();
-        ApplicationDescriptor model = polygene.newApplicationModel( new ApplicationAssembler()
-        {
-            @Override
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory factory )
-                throws AssemblyException
+        ApplicationDescriptor model = polygene.newApplicationModel( factory -> {
+            ApplicationAssembly assembly = factory.newApplicationAssembly();
+            assembly.setName( applicationName );
+            if( applicationVersion != null )
             {
-                ApplicationAssembly assembly = factory.newApplicationAssembly();
-                assembly.setName( applicationName );
-                if( applicationVersion != null )
-                {
-                    assembly.setVersion( applicationVersion );
-                }
-                if( applicationMode != null )
-                {
-                    assembly.setMode( applicationMode );
-                }
-                for( Object metaInfo : metaInfos )
-                {
-                    assembly.setMetaInfo( metaInfo );
-                }
-                HashMap<String, LayerAssembly> createdLayers = new HashMap<>();
-                for( Map.Entry<String, LayerDeclaration> entry : layers.entrySet() )
-                {
-                    LayerAssembly layer = entry.getValue().createLayer( assembly );
-                    createdLayers.put( entry.getKey(), layer );
-                }
-                for( LayerDeclaration layer : layers.values() )
-                {
-                    layer.initialize( createdLayers );
-                }
-                return assembly;
+                assembly.setVersion( applicationVersion );
             }
+            if( applicationMode != null )
+            {
+                assembly.setMode( applicationMode );
+            }
+            for( Object metaInfo : metaInfos )
+            {
+                assembly.setMetaInfo( metaInfo );
+            }
+            HashMap<String, LayerAssembly> createdLayers = new HashMap<>();
+            for( Map.Entry<String, LayerDeclaration> entry : layers.entrySet() )
+            {
+                LayerAssembly layer = entry.getValue().createLayer( assembly );
+                createdLayers.put( entry.getKey(), layer );
+            }
+            for( LayerDeclaration layer : layers.values() )
+            {
+                layer.initialize( createdLayers );
+            }
+            return assembly;
         } );
         Application application = model.newInstance( polygene.api() );
         for( ActivationEventListener activationListener : activationListeners )
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/LayerDeclaration.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/LayerDeclaration.java
index 2bc14f0..e64acc7 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/LayerDeclaration.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/LayerDeclaration.java
@@ -25,7 +25,6 @@
 import java.util.Map;
 import java.util.stream.StreamSupport;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
@@ -96,7 +95,6 @@
     }
 
     void initialize( HashMap<String, LayerAssembly> createdLayers )
-        throws AssemblyException
     {
         for( String uses : using )
         {
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ModuleDeclaration.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ModuleDeclaration.java
index fb20c26..95f2810 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ModuleDeclaration.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/builder/ModuleDeclaration.java
@@ -116,7 +116,6 @@
     }
 
     void initialize()
-        throws AssemblyException
     {
         for( Assembler assembler : assemblers )
         {
@@ -126,7 +125,6 @@
 
     @SuppressWarnings( "unchecked" )
     private Class<? extends Assembler> loadClass( String classname )
-        throws AssemblyException
     {
         Class<?> clazz;
         try
@@ -148,7 +146,6 @@
     }
 
     private Assembler createAssemblerInstance( Class<?> assemblerClass )
-        throws AssemblyException
     {
         if( !Assembler.class.isAssignableFrom( assemblerClass ) )
         {
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/identity/DefaultIdentityGeneratorAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultIdentityGeneratorAssembler.java
similarity index 78%
rename from core/bootstrap/src/main/java/org/apache/polygene/bootstrap/identity/DefaultIdentityGeneratorAssembler.java
rename to core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultIdentityGeneratorAssembler.java
index e50ec45..5462b2b 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/identity/DefaultIdentityGeneratorAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultIdentityGeneratorAssembler.java
@@ -17,22 +17,23 @@
  *
  *
  */
-package org.apache.polygene.bootstrap.identity;
+package org.apache.polygene.bootstrap.defaults;
 
 import org.apache.polygene.api.identity.IdentityGenerator;
 import org.apache.polygene.api.identity.UuidGeneratorMixin;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
 public class DefaultIdentityGeneratorAssembler
     implements Assembler
 {
+    public static final String IDENTITY = "default-identity-generator";
 
     @Override
-    public void assemble(ModuleAssembly module)
-            throws AssemblyException
+    public void assemble( ModuleAssembly module )
     {
-        module.services(IdentityGenerator.class).withMixins(UuidGeneratorMixin.class);
+        module.services( IdentityGenerator.class )
+              .withMixins( UuidGeneratorMixin.class )
+              .identifiedBy( IDENTITY );
     }
 }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/identity/DefaultIdentityGeneratorAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultMetricsProviderAssembler.java
similarity index 66%
copy from core/bootstrap/src/main/java/org/apache/polygene/bootstrap/identity/DefaultIdentityGeneratorAssembler.java
copy to core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultMetricsProviderAssembler.java
index e50ec45..e20f190 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/identity/DefaultIdentityGeneratorAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultMetricsProviderAssembler.java
@@ -14,25 +14,24 @@
  *  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.polygene.bootstrap.identity;
+package org.apache.polygene.bootstrap.defaults;
 
-import org.apache.polygene.api.identity.IdentityGenerator;
-import org.apache.polygene.api.identity.UuidGeneratorMixin;
+import org.apache.polygene.api.metrics.MetricsProvider;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.spi.metrics.MetricsProviderAdapter;
 
-public class DefaultIdentityGeneratorAssembler
+public class DefaultMetricsProviderAssembler
     implements Assembler
 {
+    public static final String IDENTITY = "default-metrics-provider";
 
     @Override
-    public void assemble(ModuleAssembly module)
-            throws AssemblyException
+    public void assemble( ModuleAssembly module )
     {
-        module.services(IdentityGenerator.class).withMixins(UuidGeneratorMixin.class);
+        module.services( MetricsProvider.class )
+              .withMixins( MetricsProviderAdapter.class )
+              .identifiedBy( IDENTITY );
     }
 }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/serialization/DefaultSerializationAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultSerializationAssembler.java
similarity index 91%
rename from core/bootstrap/src/main/java/org/apache/polygene/bootstrap/serialization/DefaultSerializationAssembler.java
rename to core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultSerializationAssembler.java
index db9d0a6..fee17e2 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/serialization/DefaultSerializationAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultSerializationAssembler.java
@@ -15,14 +15,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.polygene.bootstrap.serialization;
+package org.apache.polygene.bootstrap.defaults;
 
 import org.apache.polygene.api.serialization.Converters;
 import org.apache.polygene.api.serialization.Deserializer;
 import org.apache.polygene.api.serialization.Serialization;
 import org.apache.polygene.api.serialization.Serializer;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.serialization.javaxjson.JavaxJsonAdapters;
 import org.apache.polygene.serialization.javaxjson.JavaxJsonFactories;
@@ -34,8 +33,10 @@
 public class DefaultSerializationAssembler
     implements Assembler
 {
+    public static final String IDENTITY = "default-serialization";
+
     @Override
-    public void assemble( ModuleAssembly module ) throws AssemblyException
+    public void assemble( ModuleAssembly module )
     {
         module.services( JavaxJsonSerialization.class )
               .withTypes( Serialization.class,
@@ -45,6 +46,7 @@
                           JsonSerializer.class, JsonDeserializer.class,
                           JavaxJsonAdapters.class,
                           JavaxJsonFactories.class )
+              .identifiedBy( IDENTITY )
               .taggedWith( Serialization.Format.JSON );
     }
 }
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/unitofwork/DefaultUnitOfWorkAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultUnitOfWorkAssembler.java
similarity index 84%
rename from core/bootstrap/src/main/java/org/apache/polygene/bootstrap/unitofwork/DefaultUnitOfWorkAssembler.java
rename to core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultUnitOfWorkAssembler.java
index 6383b75..31f51ec 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/unitofwork/DefaultUnitOfWorkAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/DefaultUnitOfWorkAssembler.java
@@ -18,7 +18,7 @@
  *
  */
 
-package org.apache.polygene.bootstrap.unitofwork;
+package org.apache.polygene.bootstrap.defaults;
 
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
@@ -29,19 +29,22 @@
 public class DefaultUnitOfWorkAssembler
     implements Assembler
 {
+    public static final String IDENTITY = "default-uow-factory";
+
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         Class factoryMixin = loadMixinClass( "org.apache.polygene.runtime.unitofwork.UnitOfWorkFactoryMixin" );
-        module.services( UnitOfWorkFactory.class ).withMixins( factoryMixin );
+        module.services( UnitOfWorkFactory.class )
+              .withMixins( factoryMixin )
+              .identifiedBy( IDENTITY );
 
         Class uowMixin = loadMixinClass( "org.apache.polygene.runtime.unitofwork.ModuleUnitOfWork" );
-        module.transients( UnitOfWork.class ).withMixins( uowMixin );
+        module.transients( UnitOfWork.class )
+              .withMixins( uowMixin );
     }
 
     private Class<?> loadMixinClass( String name )
-        throws AssemblyException
     {
         try
         {
diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/package.html b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/package.html
similarity index 90%
copy from internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/package.html
copy to core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/package.html
index 6288f30..c4c5d09 100644
--- a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/package.html
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/defaults/package.html
@@ -17,9 +17,8 @@
   ~
   ~
   -->
-
 <html>
-<body>
-<h1>Polygene Internal TestSupport.</h1>
-</body>
-</html>
\ No newline at end of file
+    <body>
+        <h2>Assemblers for required and default services.</h2>
+    </body>
+</html>
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredApplicationAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredApplicationAssembler.java
index d5edba0..3ed2e9f 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredApplicationAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredApplicationAssembler.java
@@ -36,6 +36,8 @@
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
+
 public abstract class LayeredApplicationAssembler
     implements ApplicationAssembler
 {
@@ -131,14 +133,18 @@
 
     @Override
     public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-        throws AssemblyException
     {
         assembly = applicationFactory.newApplicationAssembly();
+        assembleApplication();
+        return assembly;
+    }
+
+    protected void assembleApplication()
+    {
         assembly.setName( name );
         assembly.setVersion( version );
         assembly.setMode( mode );
         assembleLayers( assembly );
-        return assembly;
     }
 
     protected LayerAssembly createLayer( Class<? extends LayerAssembler> layerAssemblerClass )
@@ -196,8 +202,7 @@
     {
         try
         {
-            Method factoryMethod = layerAssemblerClass.getDeclaredMethod( "create", LayerAssembly.class );
-            factoryMethod.setAccessible( true );
+            Method factoryMethod = accessible( layerAssemblerClass.getDeclaredMethod( "create", LayerAssembly.class ) );
             int modifiers = factoryMethod.getModifiers();
             if( Modifier.isStatic( modifiers ) && LayerAssembler.class.isAssignableFrom( factoryMethod.getReturnType() ) )
             {
@@ -208,8 +213,7 @@
         {
             try
             {
-                Method factoryMethod = layerAssemblerClass.getDeclaredMethod( "create" );
-                factoryMethod.setAccessible( true );
+                Method factoryMethod = accessible( layerAssemblerClass.getDeclaredMethod( "create" ) );
                 int modifiers = factoryMethod.getModifiers();
                 if( Modifier.isStatic( modifiers ) && LayerAssembler.class.isAssignableFrom( factoryMethod.getReturnType() ) )
                 {
@@ -233,8 +237,7 @@
             Constructor<? extends LayerAssembler> constructor = layerAssemblerClass.getConstructor( LayerAssembly.class );
             if( constructor != null )
             {
-                constructor.setAccessible( true );
-                return constructor.newInstance( assembly );
+                return accessible( constructor ).newInstance( assembly );
             }
         }
         catch( NoSuchMethodException e )
@@ -244,9 +247,7 @@
                 Constructor<? extends LayerAssembler> constructor = layerAssemblerClass.getDeclaredConstructor();
                 if( constructor != null )
                 {
-                    constructor.setAccessible( true );
-                    System.out.println(constructor);
-                    return constructor.newInstance();
+                    return accessible( constructor ).newInstance();
                 }
             }
             catch( NoSuchMethodException e1 )
@@ -265,8 +266,7 @@
             Field field = clazz.getDeclaredField( "NAME" );
             if( Modifier.isStatic( field.getModifiers() ) )
             {
-                field.setAccessible( true );
-                field.set( null, classname );
+                accessible( field ).set( null, classname );
             }
         }
         catch( Exception e )
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredLayerAssembler.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredLayerAssembler.java
index 9783de5..0f0b624 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredLayerAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayeredLayerAssembler.java
@@ -24,6 +24,8 @@
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
+
 public abstract class LayeredLayerAssembler
     implements LayerAssembler
 {
@@ -31,10 +33,16 @@
 
     protected ModuleAssembly createModule( LayerAssembly layer, Class<? extends ModuleAssembler> moduleAssemblerClass )
     {
+        return createModule( layer, moduleAssemblerClass, null );
+    }
+
+    protected ModuleAssembly createModule( LayerAssembly layer, Class<? extends ModuleAssembler> moduleAssemblerClass, ModuleAssembly constructorArgumentModule )
+    {
         try
         {
-            ModuleAssembler moduleAssembler = instantiateAssembler( layer, moduleAssemblerClass );
             String moduleName = createModuleName( moduleAssemblerClass );
+            ModuleAssembly moduleAssembly = layer.module( moduleName );
+            ModuleAssembler moduleAssembler = instantiateModuleAssembler( moduleAssemblerClass, constructorArgumentModule );
             LayeredApplicationAssembler.setNameIfPresent( moduleAssemblerClass, moduleName );
             ModuleAssembly module = layer.module( moduleName );
             assemblers.put( moduleAssemblerClass, moduleAssembler );
@@ -61,23 +69,21 @@
         return moduleName;
     }
 
-    protected ModuleAssembler instantiateAssembler( LayerAssembly layer,
-                                                  Class<? extends ModuleAssembler> modulerAssemblerClass
-    )
+    protected ModuleAssembler instantiateModuleAssembler( Class<? extends ModuleAssembler> modulerAssemblerClass,
+                                                          ModuleAssembly constructorArgument
+                                                        )
         throws InstantiationException, IllegalAccessException, java.lang.reflect.InvocationTargetException, NoSuchMethodException
     {
         ModuleAssembler moduleAssembler;
         try
         {
             Constructor<? extends ModuleAssembler> assemblyConstructor = modulerAssemblerClass.getDeclaredConstructor( ModuleAssembly.class );
-            assemblyConstructor.setAccessible( true );
-            moduleAssembler = assemblyConstructor.newInstance( layer );
+            moduleAssembler = accessible( assemblyConstructor ).newInstance( constructorArgument );
         }
         catch( NoSuchMethodException e )
         {
             Constructor<? extends ModuleAssembler> assemblyConstructor = modulerAssemblerClass.getDeclaredConstructor();
-            assemblyConstructor.setAccessible( true );
-            moduleAssembler = assemblyConstructor.newInstance();
+            moduleAssembler = accessible( assemblyConstructor ).newInstance();
         }
         return moduleAssembler;
     }
diff --git a/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/ClassScannerTest.java b/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/ClassScannerTest.java
index f257aad..49697ca 100644
--- a/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/ClassScannerTest.java
+++ b/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/ClassScannerTest.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.bootstrap.somepackage.Test2Value;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -37,19 +36,13 @@
     public void testClassScannerFiles()
         throws ActivationException, AssemblyException
     {
-        SingletonAssembler singleton = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                new DefaultUnitOfWorkAssembler().assemble( module );
-
+        SingletonAssembler singleton = new SingletonAssembler(
+            module -> {
                 // Find all classes starting from TestValue, but include only the ones that are named *Value
                 findClasses( TestValue.class ).filter( matches( ".*Value" ) )
                                               .forEach( module::values );
             }
-        };
+        );
 
         singleton.module().newValueBuilder( TestValue.class );
         singleton.module().newValueBuilder( Test2Value.class );
diff --git a/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/DocumentationSupport.java b/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/DocumentationSupport.java
index a89629a..9df51c3 100644
--- a/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/DocumentationSupport.java
+++ b/core/bootstrap/src/test/java/org/apache/polygene/bootstrap/DocumentationSupport.java
@@ -19,6 +19,8 @@
  */
 package org.apache.polygene.bootstrap;
 
+import java.util.Arrays;
+import java.util.List;
 import java.util.function.Predicate;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.common.Visibility;
@@ -29,256 +31,227 @@
 import org.apache.polygene.api.structure.ApplicationDescriptor;
 import org.apache.polygene.api.structure.Module;
 
-@SuppressWarnings( "ALL" )
+@SuppressWarnings( { "unused", "ConstantConditionalExpression", "MethodNameSameAsClassName" } )
 public class DocumentationSupport
 {
+    public static Predicate<ObjectAssembly> hasMyTypeSpecification =
+        item -> item.types().anyMatch( type -> type.equals( String.class ) );
 
-    public static Predicate<ObjectAssembly> hasMyTypeSpecification = new Predicate<ObjectAssembly>()
+    public static class declarations
     {
+        static class MyObject {}
 
-        public boolean test( ObjectAssembly item )
+        interface MyTransient {}
+
+        interface MyValue {}
+
+        interface MyEntity {}
+
+        class MyService {}
+
+        void declaration()
         {
-            return item.types().anyMatch( type -> type.equals(String.class) );
+            Assembler objects =
+                // START SNIPPET: objects
+                ( ModuleAssembly module ) -> module.objects( MyObject.class ).visibleIn( Visibility.layer )
+                // END SNIPPET: objects
+                ;
+            Assembler transients =
+                // START SNIPPET: transients
+                ( ModuleAssembly module ) -> module.transients( MyTransient.class ).visibleIn( Visibility.layer )
+                // END SNIPPET: transients
+                ;
+            Assembler values =
+                // START SNIPPET: values
+                ( ModuleAssembly module ) -> module.values( MyValue.class ).visibleIn( Visibility.layer )
+                // END SNIPPET: values
+                ;
+            Assembler entities =
+                // START SNIPPET: entities
+                ( ModuleAssembly module ) -> module.entities( MyEntity.class ).visibleIn( Visibility.layer )
+                // END SNIPPET: entities
+                ;
+            Assembler services =
+                // START SNIPPET: services
+                ( ModuleAssembly module ) -> module.services( MyService.class ).visibleIn( Visibility.layer )
+                // END SNIPPET: services
+                ;
+            Assembler taggedServices =
+                // START SNIPPET: tagged-services
+                ( ModuleAssembly module ) -> module.services( MyService.class ).taggedWith( "foo", "bar" )
+                // END SNIPPET: tagged-services
+                ;
+            List<Assembler> importedServices = Arrays.asList(
+                // START SNIPPET: imported-services
+                ( ModuleAssembly module ) -> module.importedServices( MyService.class )
+                                                   .importedBy( InstanceImporter.class )
+                                                   .setMetaInfo( new MyService() ),
+
+                // OR
+
+                ( ModuleAssembly module ) -> {
+                    module.objects( MyService.class );
+                    module.importedServices( MyService.class ).importedBy( NewObjectImporter.class );
+                }
+                // END SNIPPET: imported-services
+            );
         }
-
-    };
-
-    public static class objects
-            implements Assembler
-    {
-
-        public static class MyObject {}
-
-        // START SNIPPET: objects
-        @Override
-        public void assemble( ModuleAssembly module )
-                throws AssemblyException
-        {
-            module.objects( MyObject.class ).visibleIn( Visibility.layer );
-        }
-        // END SNIPPET: objects
-
     }
 
-    public static class transients
-            implements Assembler
+    static class defaultPropertyValues
     {
-
-        public static interface MyTransient {}
-
-        // START SNIPPET: transients
-        @Override
-        public void assemble( ModuleAssembly module )
-                throws AssemblyException
+        interface MyValue
         {
-            module.transients( MyTransient.class ).visibleIn( Visibility.layer );
+            Property<String> foo();
         }
-        // END SNIPPET: transients
 
-    }
-
-    public static class values
-            implements Assembler
-    {
-
-        public static interface MyValue {}
-
-        // START SNIPPET: values
-        @Override
-        public void assemble( ModuleAssembly module )
-                throws AssemblyException
+        interface MyEntity
         {
-            module.values( MyValue.class ).visibleIn( Visibility.layer );
+            Property<String> cathedral();
         }
-        // END SNIPPET: values
 
-    }
-
-    public static class entities
-            implements Assembler
-    {
-
-        public static interface MyEntity {}
-
-        // START SNIPPET: entities
-        @Override
-        public void assemble( ModuleAssembly module )
-                throws AssemblyException
+        void defaultPropertyValues()
         {
-            module.entities( MyEntity.class ).visibleIn( Visibility.layer );
+            Assembler assembler =
+                // START SNIPPET: properties-defaults
+                ( ModuleAssembly module ) -> {
+                    module.values( MyValue.class );
+                    MyValue myValueDefaults = module.forMixin( MyValue.class ).declareDefaults();
+                    myValueDefaults.foo().set( "bar" );
+
+                    module.entities( MyEntity.class );
+                    MyEntity myEntityDefaults = module.forMixin( MyEntity.class ).declareDefaults();
+                    myEntityDefaults.cathedral().set( "bazar" );
+                }
+                // END SNIPPET: properties-defaults
+                ;
         }
-        // END SNIPPET: entities
-
-    }
-
-    public static class services
-            implements Assembler
-    {
-
-        public static interface MyService {}
-
-        // START SNIPPET: services
-        @Override
-        public void assemble( ModuleAssembly module )
-                throws AssemblyException
-        {
-            module.services( MyService.class ).visibleIn( Visibility.layer );
-        }
-        // END SNIPPET: services
-
-    }
-
-    public static class taggedServices
-        implements Assembler
-    {
-
-        public static interface MyService {}
-
-        // START SNIPPET: tagged-services
-        @Override
-        public void assemble( ModuleAssembly module )
-            throws AssemblyException
-        {
-            module.services( MyService.class ).taggedWith( "foo", "bar" );
-        }
-        // END SNIPPET: tagged-services
-    }
-
-    public static class importedServices
-        implements Assembler
-    {
-
-        public static class MyService {}
-
-        // START SNIPPET: imported-services
-        @Override
-        public void assemble( ModuleAssembly module )
-            throws AssemblyException
-        {
-            module.importedServices( MyService.class ).
-                importedBy( InstanceImporter.class ).
-                setMetaInfo( new MyService() );
-
-            // OR
-
-            module.objects( MyService.class );
-            module.importedServices( MyService.class ).
-                importedBy( NewObjectImporter.class );
-        }
-        // END SNIPPET: imported-services
-    }
-
-    public static class defaultPropertyValues
-        implements Assembler
-    {
-
-        public interface MyValue { Property<String> foo(); }
-        public interface MyEntity { Property<String> cathedral(); }
-
-        // START SNIPPET: properties-defaults
-        @Override
-        public void assemble( ModuleAssembly module )
-            throws AssemblyException
-        {
-            module.values( MyValue.class );
-            MyValue myValueDefaults = module.forMixin( MyValue.class ).declareDefaults();
-            myValueDefaults.foo().set( "bar" );
-
-            module.entities( MyEntity.class );
-            MyEntity myEntityDefaults = module.forMixin( MyEntity.class ).declareDefaults();
-            myEntityDefaults.cathedral().set( "bazar" );
-        }
-        // END SNIPPET: properties-defaults
     }
 
     public static class singleton
     {
+        interface MyService {}
 
-        public interface MyService { }
-        public interface Stuff { }
+        interface Stuff {}
 
         void singleton()
             throws ActivationException, AssemblyException
         {
             // START SNIPPET: singleton
-            SingletonAssembler assembler = new SingletonAssembler()
-            {
-
-                @Override
-                public void assemble( ModuleAssembly module )
-                        throws AssemblyException
-                {
+            SingletonAssembler assembler = new SingletonAssembler(
+                module -> {
                     module.services( MyService.class ).identifiedBy( "Foo" );
                     module.services( MyService.class ).identifiedBy( "Bar" );
                     module.objects( Stuff.class );
                 }
-
-            };
+            );
             Module module = assembler.module();
             Stuff stuff = module.newObject( Stuff.class );
             // END SNIPPET: singleton
         }
-
     }
 
     public static class pancake
     {
 
-        public static class LoginAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class MenuAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class PerspectivesAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class ViewsAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class ReportingAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class PdfAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class BookkeepingAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class CashFlowAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class BalanceSheetAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class PricingAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class ProductAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
+        public static class LoginAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class MenuAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class PerspectivesAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class ViewsAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class ReportingAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class PdfAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class BookkeepingAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class CashFlowAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class BalanceSheetAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class PricingAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
+
+        public static class ProductAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) { }
+        }
 
         private static Energy4Java polygene;
 
         // START SNIPPET: pancake
         public static void main( String[] args )
-                throws Exception
+            throws Exception
         {
             polygene = new Energy4Java();
-            Assembler[][][] assemblers = new Assembler[][][]{
+            Assembler[][][] assemblers = new Assembler[][][] {
                 { // View Layer
-                    { // Login Module
-                        new LoginAssembler()
+                  { // Login Module
+                    new LoginAssembler()
                     // :
-                    },
-                    { // Main Workbench Module
-                        new MenuAssembler(),
-                        new PerspectivesAssembler(),
-                        new ViewsAssembler()
+                  },
+                  { // Main Workbench Module
+                    new MenuAssembler(),
+                    new PerspectivesAssembler(),
+                    new ViewsAssembler()
                     // :
-                    },
-                    { // Printing Module
-                        new ReportingAssembler(),
-                        new PdfAssembler()
+                  },
+                  { // Printing Module
+                    new ReportingAssembler(),
+                    new PdfAssembler()
                     // :
-                    }
+                  }
                 },
                 { // Application Layer
-                    { // Accounting Module
-                        new BookkeepingAssembler(),
-                        new CashFlowAssembler(),
-                        new BalanceSheetAssembler()
+                  { // Accounting Module
+                    new BookkeepingAssembler(),
+                    new CashFlowAssembler(),
+                    new BalanceSheetAssembler()
                     // :
-                    },
-                    { // Inventory Module
-                        new PricingAssembler(),
-                        new ProductAssembler()
+                  },
+                  { // Inventory Module
+                    new PricingAssembler(),
+                    new ProductAssembler()
                     // :
-                    }
+                  }
                 },
                 { // Domain Layer
-                // :
+                  // :
                 },
                 { // Infrastructure Layer
-                // :
+                  // :
                 }
             };
             ApplicationDescriptor model = newApplication( assemblers );
@@ -287,38 +260,51 @@
         }
 
         private static ApplicationDescriptor newApplication( final Assembler[][][] assemblers )
-                throws AssemblyException
+            throws AssemblyException
         {
-            return polygene.newApplicationModel( new ApplicationAssembler()
-            {
-
-                @Override
-                public ApplicationAssembly assemble( ApplicationAssemblyFactory appFactory )
-                        throws AssemblyException
-                {
-                    return appFactory.newApplicationAssembly( assemblers );
-                }
-
-            } );
+            return polygene.newApplicationModel( factory -> factory.newApplicationAssembly( assemblers ) );
         }
         // END SNIPPET: pancake
-
     }
 
     public static class full
     {
 
-        public static class CustomerViewComposite{}
-        public static class CustomerEditComposite{}
-        public static class CustomerListViewComposite{}
-        public static class CustomerSearchComposite{}
-        public static class CustomerEntity{}
-        public static class CountryEntity{}
-        public static class AddressValue{}
-        public static class LdapAuthenticationAssembler implements Assembler{ public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class ThrinkAuthorizationAssembler implements Assembler{ public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class UserTrackingAuditAssembler implements Assembler{ public void assemble( ModuleAssembly module ) throws AssemblyException { } }
-        public static class NeoAssembler implements Assembler{ NeoAssembler( String path ) {} public void assemble( ModuleAssembly module ) throws AssemblyException { } }
+        static class CustomerViewComposite {}
+
+        static class CustomerEditComposite {}
+
+        static class CustomerListViewComposite {}
+
+        static class CustomerSearchComposite {}
+
+        static class CustomerEntity {}
+
+        static class CountryEntity {}
+
+        public static class AddressValue {}
+
+        public static class LdapAuthenticationAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) throws AssemblyException { }
+        }
+
+        public static class ThrinkAuthorizationAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) throws AssemblyException { }
+        }
+
+        public static class UserTrackingAuditAssembler implements Assembler
+        {
+            public void assemble( ModuleAssembly module ) throws AssemblyException { }
+        }
+
+        public static class NeoAssembler implements Assembler
+        {
+            NeoAssembler( String path ) {}
+
+            public void assemble( ModuleAssembly module ) throws AssemblyException { }
+        }
 
         // START SNIPPET: full
         private static Energy4Java polygene;
@@ -326,28 +312,17 @@
         private static Application application;
 
         public static void main( String[] args )
-                throws Exception
+            throws Exception
         {
             // Create a Polygene Runtime
             polygene = new Energy4Java();
-            application = polygene.newApplication( new ApplicationAssembler()
-            {
-
-                @Override
-                public ApplicationAssembly assemble( ApplicationAssemblyFactory appFactory )
-                        throws AssemblyException
-                {
-                    ApplicationAssembly assembly = appFactory.newApplicationAssembly();
-                    buildAssembly( assembly );
-                    return assembly;
-                }
-
-            } );
-            // activate the application
+            // Create the application
+            application = polygene.newApplication( factory -> buildAssembly( factory.newApplicationAssembly() ) );
+            // Activate the application
             application.activate();
         }
 
-        static void buildAssembly( ApplicationAssembly app ) throws AssemblyException
+        static ApplicationAssembly buildAssembly( ApplicationAssembly app ) throws AssemblyException
         {
             LayerAssembly webLayer = createWebLayer( app );
             LayerAssembly domainLayer = createDomainLayer( app );
@@ -359,6 +334,8 @@
             domainLayer.uses( authLayer );
             domainLayer.uses( persistenceLayer );
             domainLayer.uses( messagingLayer );
+
+            return app;
         }
 
         static LayerAssembly createWebLayer( ApplicationAssembly app ) throws AssemblyException
@@ -436,7 +413,5 @@
         private static void createMessagingPersistenceModule( LayerAssembly layer ) throws AssemblyException
         {
         }
-
     }
-
 }
diff --git a/core/runtime/src/docs/runtime.txt b/core/runtime/src/docs/runtime.txt
index b0ceea0..ee8f79c 100644
--- a/core/runtime/src/docs/runtime.txt
+++ b/core/runtime/src/docs/runtime.txt
@@ -46,7 +46,7 @@
 
 Fictitious example of using a hypothetical Dalvik capable classloader;
 
-[source,java]
+[snippet,java]
 --------------
 source=core/runtime/src/test/java/org/apache/polygene/runtime/bootstrap/docs/DocumentationSupport.java
 tag=customAssemblyHelper
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/PolygeneRuntimeImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/PolygeneRuntimeImpl.java
index 405ade0..9e3bf2d 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/PolygeneRuntimeImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/PolygeneRuntimeImpl.java
@@ -20,6 +20,7 @@
 package org.apache.polygene.runtime;
 
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
 import java.util.Arrays;
 import java.util.Map;
 import java.util.stream.Stream;
@@ -312,6 +313,18 @@
         return (AssociationDescriptor) ( (AbstractAssociationInstance) association ).associationInfo();
     }
 
+    @Override
+    public boolean isComposite( Object object )
+    {
+        return isCompositeType( object );
+    }
+
+    public static boolean isCompositeType( Object object )
+    {
+        return Proxy.isProxyClass( object.getClass() )
+               && Proxy.getInvocationHandler( object ) instanceof CompositeInstance;
+    }
+
     // SPI
     @Override
     public EntityState entityStateOf( EntityComposite composite )
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AbstractAssociationModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AbstractAssociationModel.java
index 052ba02..166c601 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AbstractAssociationModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AbstractAssociationModel.java
@@ -123,19 +123,13 @@
     public void checkConstraints( Object value )
         throws ConstraintViolationException
     {
-        if( constraints != null )
-        {
-            constraints.checkConstraints( value, accessor );
-        }
+        constraints.checkConstraints( value, accessor );
     }
 
     public void checkAssociationConstraints( AbstractAssociation association )
         throws ConstraintViolationException
     {
-        if( associationConstraints != null )
-        {
-            associationConstraints.checkConstraints( association, accessor );
-        }
+        associationConstraints.checkConstraints( association, accessor );
     }
 
     public AssociationInfo builderInfo()
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationInstance.java
index 6d5f6fe..551bce7 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationInstance.java
@@ -27,6 +27,7 @@
 import org.apache.polygene.api.association.AssociationWrapper;
 import org.apache.polygene.api.entity.EntityReference;
 import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.property.Property;
 
 /**
@@ -64,7 +65,10 @@
         associationInfo.checkConstraints( newValue );
 
         // Change association
-        associationState.set( EntityReference.create( ((HasIdentity) newValue ).identity().get()));
+        Identity identity = newValue != null
+                            ? ( (HasIdentity) newValue ).identity().get()
+                            : null;
+        associationState.set( EntityReference.create( identity ) );
     }
 
     @Override
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
index a9a53a0..e47adcc 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
@@ -38,6 +38,7 @@
     implements VisitableHierarchy<AssociationsModel, AssociationModel>
 {
     private final Map<AccessibleObject, AssociationModel> mapAccessorAssociationModel = new LinkedHashMap<>();
+    private final Map<QualifiedName, AssociationModel> mapNameAssociationModel = new LinkedHashMap<>();
 
     public AssociationsModel()
     {
@@ -51,6 +52,7 @@
     public void addAssociation( AssociationModel associationModel )
     {
         mapAccessorAssociationModel.put( associationModel.accessor(), associationModel );
+        mapNameAssociationModel.put( associationModel.qualifiedName(), associationModel );
     }
 
     @Override
@@ -97,16 +99,19 @@
     public AssociationDescriptor getAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( AssociationModel associationModel : mapAccessorAssociationModel.values() )
+        AssociationModel associationModel = mapNameAssociationModel.get( name );
+        if( associationModel != null )
         {
-            if( associationModel.qualifiedName().equals( name ) )
-            {
-                return associationModel;
-            }
+            return associationModel;
         }
         throw new IllegalArgumentException( "No association found with qualified name:" + name );
     }
 
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return mapNameAssociationModel.containsKey( name );
+    }
+
     public void checkConstraints( AssociationStateHolder state )
     {
         for( AssociationModel associationModel : mapAccessorAssociationModel.values() )
@@ -116,5 +121,4 @@
             associationModel.checkConstraints( association.get() );
         }
     }
-
 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
index 8765f42..96c51b2 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
@@ -40,6 +40,7 @@
     implements VisitableHierarchy<ManyAssociationsModel, ManyAssociationModel>
 {
     private final Map<AccessibleObject, ManyAssociationModel> mapAccessorAssociationModel = new LinkedHashMap<>();
+    private final Map<QualifiedName, ManyAssociationModel> mapNameAssociationModel = new LinkedHashMap<>();
 
     public ManyAssociationsModel()
     {
@@ -53,6 +54,7 @@
     public void addManyAssociation( ManyAssociationModel model )
     {
         mapAccessorAssociationModel.put( model.accessor(), model );
+        mapNameAssociationModel.put( model.qualifiedName(), model );
     }
 
     @Override
@@ -106,16 +108,20 @@
     public AssociationDescriptor getManyAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( ManyAssociationModel associationModel : mapAccessorAssociationModel.values() )
+
+        ManyAssociationModel associationModel = mapNameAssociationModel.get( name );
+        if( associationModel != null )
         {
-            if( associationModel.qualifiedName().equals( name ) )
-            {
-                return associationModel;
-            }
+            return associationModel;
         }
         throw new IllegalArgumentException( "No many-association found with qualified name:" + name );
     }
 
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return mapNameAssociationModel.containsKey( name );
+    }
+
     public void checkConstraints( ValueStateInstance state )
     {
         for( ManyAssociationModel manyAssociationModel : mapAccessorAssociationModel.values() )
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationInstance.java
index e855c57..fffc760 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationInstance.java
@@ -74,7 +74,14 @@
     {
         Objects.requireNonNull( entity, "entity" );
         checkImmutable();
-        checkType( entity );
+        try
+        {
+            checkType( entity );
+        }
+        catch( IllegalArgumentException e )
+        {
+            throw new IllegalArgumentException( "Named association [" + name +"] must have Identity: " + entity );
+        }
         associationInfo.checkConstraints( entity );
         return namedAssociationState.put( name, EntityReference.create( ( (HasIdentity) entity ).identity().get() ) );
     }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
index 9007abf..c21b3d6 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
@@ -40,6 +40,7 @@
     implements VisitableHierarchy<NamedAssociationsModel, NamedAssociationModel>
 {
     private final Map<AccessibleObject, NamedAssociationModel> mapAccessorAssociationModel = new LinkedHashMap<>();
+    private final Map<QualifiedName, NamedAssociationModel> mapNameAssociationModel = new LinkedHashMap<>();
 
     public NamedAssociationsModel()
     {
@@ -53,6 +54,7 @@
     public void addNamedAssociation( NamedAssociationModel model )
     {
         mapAccessorAssociationModel.put( model.accessor(), model );
+        mapNameAssociationModel.put( model.qualifiedName(), model );
     }
 
     @Override
@@ -83,11 +85,11 @@
         throws IllegalArgumentException
     {
         NamedAssociationModel namedAssociationModel = mapAccessorAssociationModel.get( accessor );
-        if( namedAssociationModel == null )
+        if( namedAssociationModel != null )
         {
-            throw new IllegalArgumentException( "No named-association found with name:" + ( (Member) accessor ).getName() );
+            return namedAssociationModel;
         }
-        return namedAssociationModel;
+        throw new IllegalArgumentException( "No named-association found with name:" + ( (Member) accessor ).getName() );
     }
 
     public AssociationDescriptor getNamedAssociationByName( String name )
@@ -106,16 +108,19 @@
     public AssociationDescriptor getNamedAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( NamedAssociationModel associationModel : mapAccessorAssociationModel.values() )
+        NamedAssociationModel associationModel = mapNameAssociationModel.get( name );
+        if( associationModel != null )
         {
-            if( associationModel.qualifiedName().equals( name ) )
-            {
-                return associationModel;
-            }
+            return associationModel;
         }
         throw new IllegalArgumentException( "No named-association found with qualified name:" + name );
     }
 
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return mapNameAssociationModel.containsKey( name );
+    }
+
     public void checkConstraints( ValueStateInstance state )
     {
         for( NamedAssociationModel associationModel : mapAccessorAssociationModel.values() )
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationAssemblyFactoryImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationAssemblyFactoryImpl.java
index 46c8cee..d55ffd3 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationAssemblyFactoryImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationAssemblyFactoryImpl.java
@@ -23,7 +23,6 @@
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
@@ -35,14 +34,12 @@
 {
     @Override
     public ApplicationAssembly newApplicationAssembly( Assembler assembler )
-        throws AssemblyException
     {
         return newApplicationAssembly( new Assembler[][][]{ { { assembler } } } );
     }
 
     @Override
     public ApplicationAssembly newApplicationAssembly( Assembler[][][] assemblers )
-        throws AssemblyException
     {
         ApplicationAssembly applicationAssembly = newApplicationAssembly();
 
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationModelFactoryImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationModelFactoryImpl.java
index 5d3b000..d2c788c 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationModelFactoryImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ApplicationModelFactoryImpl.java
@@ -26,7 +26,6 @@
 import java.util.Map;
 import java.util.Set;
 import org.apache.polygene.api.composite.ModelDescriptor;
-import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.ApplicationDescriptor;
 import org.apache.polygene.api.structure.Layer;
 import org.apache.polygene.api.util.HierarchicalVisitor;
@@ -53,71 +52,19 @@
 {
     @Override
     public ApplicationDescriptor newApplicationModel( ApplicationAssembly assembly )
-        throws AssemblyException
     {
         AssemblyHelper helper = createAssemblyHelper( assembly );
-
+        AssemblyMaps maps = new AssemblyMaps();
         ApplicationAssemblyImpl applicationAssembly = (ApplicationAssemblyImpl) assembly;
-        ActivatorsModel<Application> applicationActivators = new ActivatorsModel<>( applicationAssembly.activators() );
-        List<LayerModel> layerModels = new ArrayList<>();
-        final ApplicationModel applicationModel = new ApplicationModel( applicationAssembly.name(),
-                                                                        applicationAssembly.version(),
-                                                                        applicationAssembly.mode(),
-                                                                        applicationAssembly.metaInfo(),
-                                                                        applicationActivators,
-                                                                        layerModels );
-        Map<LayerAssembly, LayerModel> mapAssemblyModel = new HashMap<>();
-        Map<LayerAssembly, List<LayerModel>> mapUsedLayers = new HashMap<>();
 
-        // Build all layers
         List<LayerAssemblyImpl> layerAssemblies = new ArrayList<>( applicationAssembly.layerAssemblies() );
-        for( LayerAssemblyImpl layerAssembly : layerAssemblies )
-        {
-            List<LayerModel> usedLayers = new ArrayList<>();
-            mapUsedLayers.put( layerAssembly, usedLayers );
+        List<LayerModel> layerModels = new ArrayList<>();
 
-            UsedLayersModel usedLayersModel = new UsedLayersModel( usedLayers );
-            List<ModuleModel> moduleModels = new ArrayList<>();
-            String name = layerAssembly.name();
-            if( name == null )
-            {
-                throw new AssemblyException( "Layer must have name set" );
-            }
-            ActivatorsModel<Layer> layerActivators = new ActivatorsModel<>( layerAssembly.activators() );
-            LayerModel layerModel = new LayerModel( name, layerAssembly.metaInfo(), usedLayersModel, layerActivators, moduleModels );
+        buildAllLayers( helper, maps, layerAssemblies, layerModels );
+        populateUsedLayerModels( maps, layerAssemblies );
 
-            for( ModuleAssemblyImpl moduleAssembly : layerAssembly.moduleAssemblies() )
-            {
-                moduleModels.add( moduleAssembly.assembleModule( layerModel, helper ) );
-            }
-            mapAssemblyModel.put( layerAssembly, layerModel );
-            layerModels.add( layerModel );
-        }
-
-        // Populate used layer lists
-        for( LayerAssemblyImpl layerAssembly : layerAssemblies )
-        {
-            Set<LayerAssembly> usesLayers = layerAssembly.uses();
-            List<LayerModel> usedLayers = mapUsedLayers.get( layerAssembly );
-            for( LayerAssembly usesLayer : usesLayers )
-            {
-                LayerModel layerModel = mapAssemblyModel.get( usesLayer );
-                usedLayers.add( layerModel );
-            }
-        }
-
-        // Bind model
-        // This will resolve all dependencies
-        try
-        {
-//            applicationModel.bind();
-            applicationModel.accept( new BindingVisitor( applicationModel ) );
-        }
-        catch( BindingException e )
-        {
-            throw new AssemblyException( "Unable to bind: " + applicationModel, e );
-        }
-
+        ApplicationModel applicationModel = buildApplicationModel( applicationAssembly, layerModels );
+        bindApplicationModel( applicationModel );
         return applicationModel;
     }
 
@@ -135,6 +82,105 @@
         return new AssemblyHelper();
     }
 
+    private void buildAllLayers( AssemblyHelper helper, AssemblyMaps maps,
+                                 List<LayerAssemblyImpl> layerAssemblies, List<LayerModel> layerModels )
+    {
+        for( LayerAssemblyImpl layerAssembly : layerAssemblies )
+        {
+            UsedLayersModel usedLayersModel = new UsedLayersModel( maps.usedLayersOf( layerAssembly ) );
+            List<ModuleModel> moduleModels = new ArrayList<>();
+            String name = layerAssembly.name();
+            if( name == null )
+            {
+                throw new AssemblyException( "Layer must have name set" );
+            }
+            ActivatorsModel<Layer> layerActivators = new ActivatorsModel<>( layerAssembly.activators() );
+            LayerModel layerModel = new LayerModel( name,
+                                                    layerAssembly.metaInfo(),
+                                                    usedLayersModel,
+                                                    layerActivators,
+                                                    moduleModels );
+
+            for( ModuleAssemblyImpl moduleAssembly : layerAssembly.moduleAssemblies() )
+            {
+                moduleModels.add( moduleAssembly.assembleModule( layerModel, helper ) );
+            }
+            maps.addModel( layerAssembly, layerModel );
+            layerModels.add( layerModel );
+        }
+    }
+
+    private void populateUsedLayerModels( AssemblyMaps maps, List<LayerAssemblyImpl> layerAssemblies )
+    {
+        for( LayerAssemblyImpl layerAssembly : layerAssemblies )
+        {
+            Set<LayerAssembly> usesLayers = layerAssembly.uses();
+            List<LayerModel> usedLayers = maps.usedLayersOf( layerAssembly );
+            for( LayerAssembly usesLayer : usesLayers )
+            {
+                usedLayers.add( maps.modelOf( usesLayer ) );
+            }
+        }
+    }
+
+
+    private ApplicationModel buildApplicationModel( ApplicationAssemblyImpl applicationAssembly,
+                                                    List<LayerModel> layerModels )
+    {
+        return new ApplicationModel( applicationAssembly.name(),
+                                     applicationAssembly.version(),
+                                     applicationAssembly.mode(),
+                                     applicationAssembly.metaInfo(),
+                                     new ActivatorsModel<>( applicationAssembly.activators() ),
+                                     layerModels );
+    }
+
+    private void bindApplicationModel( ApplicationModel applicationModel )
+    {
+        // This will resolve all dependencies
+        try
+        {
+            applicationModel.accept( new BindingVisitor( applicationModel ) );
+        }
+        catch( BindingException e )
+        {
+            throw new AssemblyException( "Unable to bind: " + applicationModel, e );
+        }
+    }
+
+    private static class AssemblyMaps
+    {
+        private final Map<LayerAssembly, LayerModel> mapAssemblyModel = new HashMap<>();
+        private final Map<LayerModel, LayerAssembly> mapModelAssembly = new HashMap<>();
+        private final Map<LayerAssembly, List<LayerModel>> mapUsedLayers = new HashMap<>();
+
+        void addModel( LayerAssembly assembly, LayerModel model )
+        {
+            mapAssemblyModel.put( assembly, model );
+            mapModelAssembly.put( model, assembly );
+            usedLayersOf( assembly );
+        }
+
+        LayerAssembly assemblyOf( LayerModel model )
+        {
+            return mapModelAssembly.get( model );
+        }
+
+        LayerModel modelOf( LayerAssembly assembly )
+        {
+            return mapAssemblyModel.get( assembly );
+        }
+
+        List<LayerModel> usedLayersOf( LayerAssembly assembly )
+        {
+            if( !mapUsedLayers.containsKey( assembly ) )
+            {
+                mapUsedLayers.put( assembly, new ArrayList<>() );
+            }
+            return mapUsedLayers.get( assembly );
+        }
+    }
+
     private static class BindingVisitor
         implements HierarchicalVisitor<Object, Object, BindingException>
     {
@@ -165,12 +211,14 @@
             else if( visited instanceof CompositeMethodModel )
             {
                 compositeMethodModel = (CompositeMethodModel) visited;
-                resolution = new Resolution( applicationModel, layer, module, objectDescriptor, compositeMethodModel, null );
+                resolution = new Resolution( applicationModel, layer, module,
+                                             objectDescriptor, compositeMethodModel, null );
             }
             else if( visited instanceof ModelDescriptor )
             {
                 objectDescriptor = (ModelDescriptor) visited;
-                resolution = new Resolution( applicationModel, layer, module, objectDescriptor, null, null );
+                resolution = new Resolution( applicationModel, layer, module,
+                                             objectDescriptor, null, null );
             }
             else if( visited instanceof InjectedFieldModel )
             {
@@ -191,7 +239,6 @@
 
         @Override
         public boolean visitLeave( Object visited )
-            throws BindingException
         {
             return true;
         }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/AssemblyHelper.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/AssemblyHelper.java
index b456a1e..206289a 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/AssemblyHelper.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/AssemblyHelper.java
@@ -38,6 +38,8 @@
 import org.apache.polygene.runtime.composite.MixinModel;
 import org.apache.polygene.runtime.composite.SideEffectModel;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
+
 /**
  * This helper is used when building the application model. It keeps track
  * of already created classloaders and various models
@@ -147,8 +149,7 @@
                     {
                         @SuppressWarnings("unchecked")
                         Constructor<AppliesToFilter> cons = (Constructor<AppliesToFilter>) appliesToClass.getDeclaredConstructor();
-                        cons.setAccessible(true);
-                        filter = cons.newInstance();
+                        filter = accessible( cons ).newInstance();
                     }
                     catch( Exception e )
                     {
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java
index 543e8cd..7f69916 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java
@@ -26,6 +26,7 @@
 import java.lang.reflect.Member;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.lang.reflect.Parameter;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.Type;
 import java.util.ArrayList;
@@ -59,7 +60,6 @@
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.GenericPropertyInfo;
 import org.apache.polygene.api.property.Immutable;
-import org.apache.polygene.api.property.InitialValueProvider;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.sideeffect.SideEffects;
 import org.apache.polygene.api.type.HasTypes;
@@ -211,7 +211,7 @@
                                      List<Class<?>> mixinClasses
                                    )
     {
-        List<Throwable> exceptions = new ArrayList<>();
+        Set<Throwable> exceptions = new HashSet<>();
         Set<Class<?>> thisDependencies = new HashSet<>();
         types.stream()
              .peek( mixinType -> mixinsModel.addMixinType( mixinType ) )
@@ -260,7 +260,7 @@
                                        List<Class<?>> constraintClasses,
                                        List<Class<?>> concernClasses,
                                        List<Class<?>> sideEffectClasses,
-                                       List<Throwable> exceptions,
+                                       Set<Throwable> exceptions,
                                        Set<Class<?>> thisDependencies )
     {
         try
@@ -477,11 +477,7 @@
             optional,
             constraintClasses,
             accessor );
-        ValueConstraintsInstance valueConstraintsInstance = null;
-        if( valueConstraintsModel.isConstrained() )
-        {
-            valueConstraintsInstance = valueConstraintsModel.newInstance();
-        }
+        ValueConstraintsInstance valueConstraintsInstance = valueConstraintsModel.newInstance();
         MetaInfo metaInfo = stateDeclarations.metaInfoFor( accessor );
         UseDefaults useDefaultsDeclaration = metaInfo.get( UseDefaults.class );
         Object initialValue = stateDeclarations.initialValueOf( accessor );
@@ -491,15 +487,13 @@
         }
         boolean useDefaults = useDefaultsDeclaration != null || stateDeclarations.useDefaults( accessor );
         boolean immutable = this.immutable || metaInfo.get( Immutable.class ) != null;
-        InitialValueProvider initialValueProvider = metaInfo.get( InitialValueProvider.class );
         return new PropertyModel(
             accessor,
             immutable,
             useDefaults,
             valueConstraintsInstance,
             metaInfo,
-            initialValue,
-            initialValueProvider
+            initialValue
         );
     }
 
@@ -509,17 +503,19 @@
                                            )
     {
         List<ValueConstraintsModel> parameterConstraintModels = Collections.emptyList();
-        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
+
+        Parameter[] parameters = method.getParameters();
         Type[] parameterTypes = method.getGenericParameterTypes();
         boolean constrained = false;
-        for( int i = 0; i < parameterAnnotations.length; i++ )
+        for( int i = 0; i < parameters.length; i++ )
         {
-            Annotation[] parameterAnnotation = parameterAnnotations[ i ];
+            Parameter param = parameters[i];
+
+            Annotation[] parameterAnnotation = param.getAnnotations();
 
             Name nameAnnotation = (Name) of( parameterAnnotation ).filter( isType( Name.class ) )
                                                                   .findFirst().orElse( null );
-            String name = nameAnnotation == null ? "param" + ( i + 1 ) : nameAnnotation.value();
-
+            String name = nameAnnotation == null ? param.getName() : nameAnnotation.value();
             boolean optional = of( parameterAnnotation )
                 .anyMatch( isType( Optional.class ) );
             ValueConstraintsModel parameterConstraintsModel = constraintsFor(
@@ -600,8 +596,7 @@
 
             // No implementation found!
             // Check if if it's a composite constraints
-            if( Arrays.stream( annotationType.getAnnotations() )
-                      .anyMatch( typeHasAnnotation( ConstraintDeclaration.class ) ) )
+            if( typeHasAnnotation( ConstraintDeclaration.class ).test( constraintAnnotation ) )
             {
                 ValueConstraintsModel valueConstraintsModel = constraintsFor(
                     Arrays.stream( annotationType.getAnnotations() ),
@@ -868,29 +863,23 @@
         boolean optional = annotations.stream().anyMatch( isType( Optional.class ) );
 
         // Constraints for Association references
-        ValueConstraintsModel constraintsModel = constraintsFor( annotations.stream(), GenericAssociationInfo
-            .associationTypeOf( accessor ), ( (Member) accessor ).getName(), optional, constraintClasses, accessor );
-        ValueConstraintsInstance valueConstraintsInstance;
-        if( constraintsModel.isConstrained() )
-        {
-            valueConstraintsInstance = constraintsModel.newInstance();
-        }
-        else
-        {
-            valueConstraintsInstance = new ValueConstraintsInstance( Collections.emptyList(), ( (Member) accessor ).getName(), true );
-        }
+        ValueConstraintsModel constraintsModel =
+            constraintsFor( annotations.stream(),
+                            GenericAssociationInfo.associationTypeOf( accessor ),
+                            ( (Member) accessor ).getName(),
+                            optional,
+                            constraintClasses,
+                            accessor );
+        ValueConstraintsInstance valueConstraintsInstance = constraintsModel.newInstance();
 
         // Constraints for the Association itself
-        constraintsModel = constraintsFor( annotations.stream(), Association.class, ( (Member) accessor ).getName(), optional, constraintClasses, accessor );
-        ValueConstraintsInstance associationValueConstraintsInstance;
-        if( constraintsModel.isConstrained() )
-        {
-            associationValueConstraintsInstance = constraintsModel.newInstance();
-        }
-        else
-        {
-            associationValueConstraintsInstance = new ValueConstraintsInstance( Collections.emptyList(), ( (Member) accessor ).getName(), true );
-        }
+        constraintsModel = constraintsFor( annotations.stream(),
+                                           Association.class,
+                                           ( (Member) accessor ).getName(),
+                                           optional,
+                                           constraintClasses,
+                                           accessor );
+        ValueConstraintsInstance associationValueConstraintsInstance = constraintsModel.newInstance();
 
         MetaInfo metaInfo = stateDeclarations.metaInfoFor( accessor );
         return new AssociationModel( accessor, valueConstraintsInstance, associationValueConstraintsInstance, metaInfo );
@@ -904,21 +893,24 @@
         boolean optional = annotations.stream().anyMatch( isType( Optional.class ) );
 
         // Constraints for entities in ManyAssociation
-        ValueConstraintsModel valueConstraintsModel = constraintsFor( annotations.stream(), GenericAssociationInfo
-            .associationTypeOf( accessor ), ( (Member) accessor ).getName(), optional, constraintClasses, accessor );
-        ValueConstraintsInstance valueConstraintsInstance = null;
-        if( valueConstraintsModel.isConstrained() )
-        {
-            valueConstraintsInstance = valueConstraintsModel.newInstance();
-        }
+        ValueConstraintsModel valueConstraintsModel =
+            constraintsFor( annotations.stream(),
+                            GenericAssociationInfo.associationTypeOf( accessor ),
+                            ( (Member) accessor ).getName(),
+                            optional,
+                            constraintClasses,
+                            accessor );
+        ValueConstraintsInstance valueConstraintsInstance = valueConstraintsModel.newInstance();
 
         // Constraints for the ManyAssociation itself
-        valueConstraintsModel = constraintsFor( annotations.stream(), ManyAssociation.class, ( (Member) accessor ).getName(), optional, constraintClasses, accessor );
-        ValueConstraintsInstance manyValueConstraintsInstance = null;
-        if( valueConstraintsModel.isConstrained() )
-        {
-            manyValueConstraintsInstance = valueConstraintsModel.newInstance();
-        }
+        valueConstraintsModel = constraintsFor( annotations.stream(),
+                                                ManyAssociation.class,
+                                                ( (Member) accessor ).getName(),
+                                                optional,
+                                                constraintClasses,
+                                                accessor );
+        ValueConstraintsInstance manyValueConstraintsInstance = valueConstraintsModel.newInstance();
+
         MetaInfo metaInfo = stateDeclarations.metaInfoFor( accessor );
         return new ManyAssociationModel( accessor, valueConstraintsInstance, manyValueConstraintsInstance, metaInfo );
     }
@@ -931,21 +923,24 @@
         boolean optional = annotations.stream().anyMatch( isType( Optional.class ) );
 
         // Constraints for entities in NamedAssociation
-        ValueConstraintsModel valueConstraintsModel = constraintsFor( annotations.stream(), GenericAssociationInfo
-            .associationTypeOf( accessor ), ( (Member) accessor ).getName(), optional, constraintClasses, accessor );
-        ValueConstraintsInstance valueConstraintsInstance = null;
-        if( valueConstraintsModel.isConstrained() )
-        {
-            valueConstraintsInstance = valueConstraintsModel.newInstance();
-        }
+        ValueConstraintsModel valueConstraintsModel =
+            constraintsFor( annotations.stream(),
+                            GenericAssociationInfo.associationTypeOf( accessor ),
+                            ( (Member) accessor ).getName(),
+                            optional,
+                            constraintClasses,
+                            accessor );
+        ValueConstraintsInstance valueConstraintsInstance = valueConstraintsModel.newInstance();
 
         // Constraints for the NamedAssociation itself
-        valueConstraintsModel = constraintsFor( annotations.stream(), NamedAssociation.class, ( (Member) accessor ).getName(), optional, constraintClasses, accessor );
-        ValueConstraintsInstance namedValueConstraintsInstance = null;
-        if( valueConstraintsModel.isConstrained() )
-        {
-            namedValueConstraintsInstance = valueConstraintsModel.newInstance();
-        }
+        valueConstraintsModel = constraintsFor( annotations.stream(),
+                                                NamedAssociation.class,
+                                                ( (Member) accessor ).getName(),
+                                                optional,
+                                                constraintClasses,
+                                                accessor );
+        ValueConstraintsInstance namedValueConstraintsInstance = valueConstraintsModel.newInstance();
+
         MetaInfo metaInfo = stateDeclarations.metaInfoFor( accessor );
         return new NamedAssociationModel( accessor, valueConstraintsInstance, namedValueConstraintsInstance, metaInfo );
     }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ImportedServiceAssemblyImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ImportedServiceAssemblyImpl.java
index c455aed..8319f32 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ImportedServiceAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ImportedServiceAssemblyImpl.java
@@ -78,7 +78,7 @@
             }
             else
             {
-                id = new StringIdentity( identity );
+                id = StringIdentity.identityOf( identity );
             }
 
             ImportedServiceModel serviceModel = new ImportedServiceModel( module,
@@ -103,7 +103,7 @@
     {
         // Find reference that is not yet used
         int idx = 0;
-        Identity id = new StringIdentity( serviceType.getSimpleName() );
+        Identity id = StringIdentity.identityOf( serviceType.getSimpleName() );
         boolean invalid;
         do
         {
@@ -113,7 +113,7 @@
                 if( serviceModel.identity().equals( id ) )
                 {
                     idx++;
-                    id = new StringIdentity( serviceType.getSimpleName() + "_" + idx );
+                    id = StringIdentity.identityOf( serviceType.getSimpleName() + "_" + idx );
                     invalid = true;
                     break;
                 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
index 011da1b..d4cfa29 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ModuleAssemblyImpl.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.runtime.bootstrap;
 
-import java.lang.reflect.UndeclaredThrowableException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -41,6 +40,7 @@
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.identity.IdentityGenerator;
 import org.apache.polygene.api.identity.StringIdentity;
+import org.apache.polygene.api.metrics.MetricsProvider;
 import org.apache.polygene.api.serialization.Serialization;
 import org.apache.polygene.api.service.DuplicateServiceIdentityException;
 import org.apache.polygene.api.structure.Module;
@@ -70,9 +70,10 @@
 import org.apache.polygene.bootstrap.TransientDeclaration;
 import org.apache.polygene.bootstrap.ValueAssembly;
 import org.apache.polygene.bootstrap.ValueDeclaration;
-import org.apache.polygene.bootstrap.identity.DefaultIdentityGeneratorAssembler;
-import org.apache.polygene.bootstrap.serialization.DefaultSerializationAssembler;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
+import org.apache.polygene.bootstrap.defaults.DefaultIdentityGeneratorAssembler;
+import org.apache.polygene.bootstrap.defaults.DefaultMetricsProviderAssembler;
+import org.apache.polygene.bootstrap.defaults.DefaultSerializationAssembler;
+import org.apache.polygene.bootstrap.defaults.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.runtime.activation.ActivatorsModel;
 import org.apache.polygene.runtime.composite.TransientModel;
 import org.apache.polygene.runtime.composite.TransientsModel;
@@ -103,7 +104,26 @@
 final class ModuleAssemblyImpl
         implements ModuleAssembly
 {
-    private static HashMap<Class, Assembler> defaultAssemblers;
+    /**
+     * Assemblers required on all modules, keyed by service type, assembled by {@link #addRequiredAssemblers()}.
+     */
+    private static final Map<Class, Assembler> REQUIRED_ASSEMBLERS;
+
+    /**
+     * Assemblers for default services, keyed by service type, assembled if {@link #defaultServices()} is called.
+     */
+    private static final Map<Class, Assembler> DEFAULT_ASSEMBLERS;
+
+    static
+    {
+        REQUIRED_ASSEMBLERS = new HashMap<>( 1 );
+        REQUIRED_ASSEMBLERS.put( UnitOfWorkFactory.class, new DefaultUnitOfWorkAssembler() );
+
+        DEFAULT_ASSEMBLERS = new HashMap<>( 3 );
+        DEFAULT_ASSEMBLERS.put( IdentityGenerator.class, new DefaultIdentityGeneratorAssembler() );
+        DEFAULT_ASSEMBLERS.put( Serialization.class, new DefaultSerializationAssembler() );
+        DEFAULT_ASSEMBLERS.put( MetricsProvider.class, new DefaultMetricsProviderAssembler() );
+    }
 
     private final LayerAssembly layerAssembly;
     private String name;
@@ -120,14 +140,6 @@
 
     private final MetaInfoDeclaration metaInfoDeclaration = new MetaInfoDeclaration();
 
-    static
-    {
-        defaultAssemblers = new HashMap<>();
-        defaultAssemblers.put( UnitOfWorkFactory.class, new DefaultUnitOfWorkAssembler() );
-        defaultAssemblers.put( IdentityGenerator.class, new DefaultIdentityGeneratorAssembler() );
-        defaultAssemblers.put( Serialization.class, new DefaultSerializationAssembler() );
-    }
-
     ModuleAssemblyImpl(LayerAssembly layerAssembly, String name)
     {
         this.layerAssembly = layerAssembly;
@@ -166,6 +178,21 @@
     }
 
     @Override
+    public ServiceDeclaration defaultServices()
+    {
+        Class[] assembledServicesTypes = DEFAULT_ASSEMBLERS
+            .entrySet()
+            .stream()
+            .filter(
+                entry -> serviceAssemblies.stream().noneMatch(
+                    serviceAssembly -> serviceAssembly.hasType( entry.getKey() ) ) )
+            .peek( entry -> entry.getValue().assemble( this ) )
+            .map( Map.Entry::getKey )
+            .toArray( Class[]::new );
+        return services( assembledServicesTypes );
+    }
+
+    @Override
     @SafeVarargs
     public final ModuleAssembly withActivators(Class<? extends Activator<Module>>... activators)
     {
@@ -337,7 +364,6 @@
 
     @Override
     public ObjectDeclaration objects(Class<?>... objectTypes)
-            throws AssemblyException
     {
         List<ObjectAssemblyImpl> assemblies = new ArrayList<>();
 
@@ -498,8 +524,8 @@
     ModuleModel assembleModule(LayerModel layerModel, AssemblyHelper helper)
             throws AssemblyException
     {
-        addDefaultAssemblers();
-        List<Throwable> exceptions = new ArrayList<>();
+        addRequiredAssemblers();
+        Set<Throwable> exceptions = new HashSet<>();
         List<TransientModel> transientModels = new ArrayList<>();
         List<ObjectModel> objectModels = new ArrayList<>();
         List<ValueModel> valueModels = new ArrayList<>();
@@ -665,29 +691,15 @@
         throw new AssemblyReportException( exceptions );
     }
 
-    private void addDefaultAssemblers()
-            throws AssemblyException
+    private void addRequiredAssemblers()
     {
-        try
-        {
-            defaultAssemblers.entrySet().stream()
-                    .filter(entry -> serviceAssemblies.stream().noneMatch(serviceAssembly -> serviceAssembly.hasType(entry.getKey())))
-                    .forEach(entry ->
-                    {
-                        try
-                        {
-                            entry.getValue().assemble(this);
-                        }
-                        catch (AssemblyException e)
-                        {
-                            throw new UndeclaredThrowableException(e);
-                        }
-                    });
-        }
-        catch (UndeclaredThrowableException e)
-        {
-            throw (AssemblyException) e.getUndeclaredThrowable();
-        }
+        REQUIRED_ASSEMBLERS
+            .entrySet()
+            .stream()
+            .filter(
+                entry -> serviceAssemblies.stream().noneMatch(
+                    serviceAssembly -> serviceAssembly.hasType( entry.getKey() ) ) )
+            .forEach( entry -> entry.getValue().assemble( this ) );
     }
 
     private Identity generateId(Stream<Class<?>> serviceTypes)
@@ -696,7 +708,7 @@
         Class<?> serviceType = serviceTypes.findFirst()
                 .orElse(null); // Use the first, which *SHOULD* be the main serviceType
         int idx = 0;
-        Identity id = new StringIdentity(serviceType.getSimpleName());
+        Identity id = StringIdentity.identityOf( serviceType.getSimpleName() );
         boolean invalid;
         do
         {
@@ -706,7 +718,7 @@
                 if (serviceAssembly.identity() != null && serviceAssembly.identity().equals(id))
                 {
                     idx++;
-                    id = new StringIdentity(serviceType.getSimpleName() + "_" + idx);
+                    id = StringIdentity.identityOf( serviceType.getSimpleName() + "_" + idx );
                     invalid = true;
                     break;
                 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java
index 7740d37..beb3480 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java
@@ -59,7 +59,7 @@
         for( ServiceAssemblyImpl serviceAssembly : serviceAssemblies )
         {
             if( identity != null ) {
-                serviceAssembly.identity = new StringIdentity( identity );
+                serviceAssembly.identity = StringIdentity.identityOf( identity );
             }
         }
         return this;
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/AbstractModifierModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/AbstractModifierModel.java
index 4a00359..2b2f3d5 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/AbstractModifierModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/AbstractModifierModel.java
@@ -17,7 +17,6 @@
  *
  *
  */
-
 package org.apache.polygene.runtime.composite;
 
 import java.lang.reflect.Array;
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
index d290f97..ec6de3b 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodModel.java
@@ -52,7 +52,7 @@
     private final ConcernsModel concerns;
     private final SideEffectsModel sideEffects;
     private final MixinsModel mixins;
-    private AnnotatedElement annotations;
+    private final AnnotatedElement annotations;
 
     // Context
 //    private final SynchronizedCompositeMethodInstancePool instancePool = new SynchronizedCompositeMethodInstancePool();
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeModel.java
index be159bc..72ab757 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeModel.java
@@ -32,6 +32,7 @@
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.composite.CompositeDescriptor;
+import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.util.AccessibleObjects;
 import org.apache.polygene.api.util.HierarchicalVisitor;
@@ -68,7 +69,7 @@
                               final MixinsModel mixinsModel,
                               final StateModel stateModel,
                               final CompositeMethodsModel compositeMethodsModel
-    )
+                            )
     {
         this.module = module;
         this.types = new LinkedHashSet<>( types );
@@ -105,7 +106,6 @@
             } );
     }
 
-    // Model
     @Override
     public Stream<Class<?>> types()
     {
@@ -185,10 +185,10 @@
     }
 
     @SuppressWarnings( { "raw", "unchecked" } )
-    private Class<? extends Composite>  createProxyClass( Class<?> mainType )
+    private Class<? extends Composite> createProxyClass( Class<?> mainType )
         throws ClassNotFoundException, NoSuchMethodException
     {
-        Class<? extends Composite>  proxyClass;
+        Class<? extends Composite> proxyClass;
         if( mainType.isInterface() )
         {
             ClassLoader proxyClassloader = mainType.getClassLoader();
@@ -224,10 +224,42 @@
                                 Object proxy,
                                 Method method,
                                 Object[] args
-    )
+                              )
         throws Throwable
     {
-        return compositeMethodsModel.invoke( mixins, proxy, method, args, module );
+        try
+        {
+            try
+            {
+                return compositeMethodsModel.invoke( mixins, proxy, method, args, module );
+            }
+            catch( ConstraintViolationException e )
+            {
+                e.setCompositeDescriptor(this);
+                throw e;
+            }
+        }
+        catch( Throwable throwable )
+        {
+            decorateModuleInfo( throwable, method.getName() );
+            throw throwable;
+        }
+    }
+
+    private void decorateModuleInfo( Throwable throwable, String methodName )
+    {
+        StackTraceElement[] trace = throwable.getStackTrace();
+        // Only add originating Module/Layer/
+        if( trace[0].getClassName().startsWith( "method " ))
+        {
+            return;
+        }
+        StackTraceElement[] newTrace = new StackTraceElement[ trace.length + 1 ];
+        String message = "method \"" + methodName + "\" of " + this.toString() + " in module [" + module.name() + "] of layer [" + module.layer().name() + "]";
+        String compositeName = this.toString();
+        newTrace[ 0 ] = new StackTraceElement( message, "", "", 0 );
+        System.arraycopy( trace, 0, newTrace, 1, trace.length );
+        throwable.setStackTrace( newTrace );
     }
 
     @Override
@@ -272,7 +304,6 @@
         throws IllegalArgumentException
     {
 
-//        if (!matchesAny( isAssignableFrom( mixinType ), types ))
         if( !mixinsModel.isImplemented( mixinType ) )
         {
             String message = "Composite " + primaryType().getName() + " does not implement type " + mixinType.getName();
@@ -286,6 +317,6 @@
     @Override
     public String toString()
     {
-        return types.toString();
+        return primaryType.getSimpleName();
     }
 }
\ No newline at end of file
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstraintsInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstraintsInstance.java
index 23e8f98..efa9521 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstraintsInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstraintsInstance.java
@@ -23,11 +23,11 @@
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.stream.Stream;
-import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.composite.CompositeInstance;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.identity.Identity;
 
 /**
  * JAVADOC
@@ -51,11 +51,11 @@
         }
 
         // Check constraints
-        List<ConstraintViolation> violations = null;
+        List<ValueConstraintViolation> violations = null;
         for( int i = 0; i < params.length; i++ )
         {
             Object param = params[ i ];
-            List<ConstraintViolation> paramViolations = valueConstraintsInstances.get( i ).checkConstraints( param );
+            List<ValueConstraintViolation> paramViolations = valueConstraintsInstances.get( i ).checkConstraints( param );
             if( !paramViolations.isEmpty() )
             {
                 if( violations == null )
@@ -69,16 +69,20 @@
         // Check if any constraint failed
         if( violations != null )
         {
-            if( instance instanceof Composite )
+            for( ValueConstraintViolation violation : violations )
             {
-                throw new ConstraintViolationException( (Composite) instance, method, violations );
+                violation.setMixinType( method.getDeclaringClass() );
+                violation.setMethodName( method.getName() );
             }
+            ConstraintViolationException exception = new ConstraintViolationException( violations );
+            Identity identity = instance instanceof HasIdentity ? ( (HasIdentity) instance ).identity().get() : null;
+            exception.setIdentity( identity );
             if( instance instanceof CompositeInstance )
             {
-                throw new ConstraintViolationException( ( (CompositeInstance) instance ).proxy(), method, violations );
+                instance = ( (CompositeInstance) instance ).proxy();
             }
-            Stream<Class<?>> types = Stream.of( instance.getClass() );
-            throw new ConstraintViolationException( instance.toString(), types, method, violations );
+            exception.setInstanceString( instance.toString() );
+            throw exception;
         }
     }
 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java
index 427cff0..026a4e1 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java
@@ -27,13 +27,14 @@
 import org.apache.polygene.api.common.ConstructionException;
 import org.apache.polygene.api.composite.ConstructorDescriptor;
 import org.apache.polygene.api.composite.InvalidCompositeException;
-import org.apache.polygene.api.util.AccessibleObjects;
 import org.apache.polygene.api.util.HierarchicalVisitor;
 import org.apache.polygene.api.util.VisitableHierarchy;
 import org.apache.polygene.runtime.injection.DependencyModel;
 import org.apache.polygene.runtime.injection.InjectedParametersModel;
 import org.apache.polygene.runtime.injection.InjectionContext;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
+
 /**
  * JAVADOC
  */
@@ -46,7 +47,7 @@
 
     public ConstructorModel( Constructor<?> constructor, InjectedParametersModel parameters )
     {
-        this.constructor = AccessibleObjects.accessible( constructor );
+        this.constructor = accessible( constructor );
         this.parameters = parameters;
     }
 
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/FragmentInvocationHandler.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/FragmentInvocationHandler.java
index f0dfca6..936db3c 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/FragmentInvocationHandler.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/FragmentInvocationHandler.java
@@ -84,7 +84,7 @@
                     // Stop removing if the originating method call has been located in the stack.
                     // For 'semi' and 'extensive' compaction, we don't and do the entire stack instead.
                     trace[ i ] = new StackTraceElement( proxy.getClass()
-                                                            .getInterfaces()[ 0 ].getName(), method.getName(), null, -1 );
+                                                             .getInterfaces()[ 0 ].getName(), method.getName(), null, -1 );
                     break; // Stop compacting this trace
                 }
             }
@@ -118,19 +118,22 @@
 
     private boolean isApplicationClass( String className )
     {
+        boolean jdkInternals = isJdkInternals( className );
         if( compactLevel == CompactLevel.semi )
         {
-            return !isJdkInternals( className );
+            return !jdkInternals;
         }
-        return !( className.endsWith( FragmentClassLoader.GENERATED_POSTFIX ) ||
-                  className.startsWith( "org.apache.polygene.runtime" ) ||
-                  isJdkInternals( className ) );
+        boolean polygeneRuntime = className.startsWith( "org.apache.polygene.runtime" );
+        boolean stubClass = className.endsWith( FragmentClassLoader.GENERATED_POSTFIX );
+        return !( stubClass ||
+                  polygeneRuntime ||
+                  jdkInternals );
     }
 
     private boolean isJdkInternals( String className )
     {
         return className.startsWith( "java.lang.reflect" )
-               || className.startsWith( "jdk.internal.reflect" )
+               || className.startsWith( "reflect" )
                || className.startsWith( "com.sun.proxy" )
                || className.startsWith( "sun.reflect" );
     }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/GenericFragmentInvocationHandler.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/GenericFragmentInvocationHandler.java
index 44259e8..13c0741 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/GenericFragmentInvocationHandler.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/GenericFragmentInvocationHandler.java
@@ -29,8 +29,6 @@
 public final class GenericFragmentInvocationHandler
     extends FragmentInvocationHandler
 {
-    // InvocationHandler implementation ------------------------------
-
     @Override
     public Object invoke( Object proxy, Method method, Object[] args )
         throws Throwable
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsMixin.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsMixin.java
index cb2875f..938cde8 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsMixin.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsMixin.java
@@ -30,6 +30,8 @@
 import org.apache.polygene.api.composite.DefaultMethodsFilter;
 import org.apache.polygene.api.injection.scope.This;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
+
 @AppliesTo( { DefaultMethodsFilter.class } )
 public class InterfaceDefaultMethodsMixin
     implements InvocationHandler
@@ -65,8 +67,7 @@
         try
         {
             Constructor<MethodHandles.Lookup> constructor = MethodHandles.Lookup.class.getDeclaredConstructor( Class.class, int.class );
-            constructor.setAccessible( true );
-            MethodHandles.Lookup lookup = constructor.newInstance( declaringClass, MethodHandles.Lookup.PRIVATE );
+            MethodHandles.Lookup lookup = accessible( constructor ).newInstance( declaringClass, MethodHandles.Lookup.PRIVATE );
             MethodHandle handle = lookup.unreflectSpecial( method, declaringClass );
             return ( proxy, args ) -> handle.bindTo( proxy ).invokeWithArguments( args );
         }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
index 9995d1b..e330d6b 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
@@ -67,6 +67,12 @@
     }
 
     @Override
+    public boolean hasProperty( QualifiedName name )
+    {
+        return propertiesModel.hasProperty( name );
+    }
+
+    @Override
     public <ThrowableType extends Throwable> boolean accept( HierarchicalVisitor<? super Object, ? super Object, ThrowableType> visitor )
         throws ThrowableType
     {
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TransientModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TransientModel.java
index 4aedb47..5cf9a71 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TransientModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TransientModel.java
@@ -27,6 +27,7 @@
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.runtime.injection.InjectionContext;
+import org.apache.polygene.runtime.property.PropertyModel;
 
 /**
  * Model for Transient Composites
@@ -67,8 +68,18 @@
     public void checkConstraints( TransientStateInstance instanceState )
         throws ConstraintViolationException
     {
-        stateModel.properties().forEach( propertyModel ->
-            propertyModel.checkConstraints( instanceState.propertyFor( propertyModel.accessor() ).get() )
+        stateModel.properties().forEach( ( PropertyModel propertyModel ) ->
+                                         {
+                                             try
+                                             {
+                                                 propertyModel.checkConstraints( instanceState.propertyFor( propertyModel.accessor() ).get() );
+                                             }
+                                             catch( ConstraintViolationException e )
+                                             {
+                                                 e.setCompositeDescriptor( this );
+                                                 throw e;
+                                             }
+                                         }
         );
     }
 }
\ No newline at end of file
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TypedModifierInvocationHandler.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TypedModifierInvocationHandler.java
index 7d96abf..bf750e9 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TypedModifierInvocationHandler.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/TypedModifierInvocationHandler.java
@@ -21,6 +21,7 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 
 /**
  * JAVADOC
@@ -38,7 +39,21 @@
         }
         catch( InvocationTargetException e )
         {
-            throw cleanStackTrace( e.getTargetException(), proxy, method );
+            Throwable targetException = e.getTargetException();
+            if( targetException instanceof IllegalAccessError )
+            {
+                // We get here if any of the return types or parameters are not public. This is probably due to
+                // the _Stub class ends up in a different classpace than the original mixin. We intend to fix this in
+                // 3.1 or 3.2
+                if( !Modifier.isPublic( method.getReturnType().getModifiers() ) )
+                {
+                    String message = "Return types must be public: " + method.getReturnType().getName();
+                    IllegalAccessException illegalAccessException = new IllegalAccessException( message );
+                    illegalAccessException.initCause( e.getTargetException() );
+                    throw cleanStackTrace( illegalAccessException, proxy, method );
+                }
+            }
+            throw cleanStackTrace( targetException, proxy, method );
         }
         catch( Throwable e )
         {
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UsesInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UsesInstance.java
index 0fc8eb3..25cdefe 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UsesInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/UsesInstance.java
@@ -45,6 +45,7 @@
 
     public UsesInstance use( Object... objects )
     {
+        // There is some case where we get here with only partially initialized composite as "objects". That fails with NPE in useObjects.addAll() below. Should be figured out when this happens and prevent it.
         HashSet<Object> useObjects = new HashSet<>();
         if( !uses.isEmpty() )
         {
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsInstance.java
index ff53af8..98f6ab9 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsInstance.java
@@ -26,14 +26,10 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.stream.Stream;
 import org.apache.polygene.api.common.Optional;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 
-/**
- * JAVADOC
- */
 public final class ValueConstraintsInstance
 {
     private static final Optional OPTIONAL;
@@ -43,7 +39,6 @@
         OPTIONAL = new OptionalDummy();
     }
 
-    @SuppressWarnings( "raw" )
     private final List<ConstraintInstance> constraints;
     private String name;
     private boolean optional;
@@ -60,9 +55,9 @@
     }
 
     @SuppressWarnings( { "raw", "unchecked" } )
-    public List<ConstraintViolation> checkConstraints( Object value )
+    public List<ValueConstraintViolation> checkConstraints( Object value )
     {
-        List<ConstraintViolation> violations = null;
+        List<ValueConstraintViolation> violations = null;
 
         // Check optional first - this avoids NPE's in constraints
         if( optional )
@@ -77,11 +72,11 @@
             if( value == null )
             {
                 violations = new ArrayList<>();
-                violations.add( new ConstraintViolation( name, OPTIONAL, null ) );
+                violations.add( new ValueConstraintViolation( name, OPTIONAL, null ) );
             }
         }
 
-        if( violations == null && value != null )
+        if( violations == null )
         {
             for( ConstraintInstance constraint : constraints )
             {
@@ -102,7 +97,7 @@
                     {
                         violations = new ArrayList<>();
                     }
-                    ConstraintViolation violation = new ConstraintViolation( name, constraint.annotation(), value );
+                    ValueConstraintViolation violation = new ValueConstraintViolation( name, constraint.annotation(), value );
                     violations.add( violation );
                 }
             }
@@ -116,11 +111,21 @@
 
     public void checkConstraints( Object value, AccessibleObject accessor )
     {
-        List<ConstraintViolation> violations = checkConstraints( value );
+        List<ValueConstraintViolation> violations = checkConstraints( value );
         if( !violations.isEmpty() )
         {
-            Stream<Class<?>> empty = Stream.empty();
-            throw new ConstraintViolationException( "", empty, (Member) accessor, violations );
+            for( ValueConstraintViolation violation : violations )
+            {
+                if( accessor instanceof Member )
+                {
+                    Member member = (Member) accessor;
+                    String methodName =  member.getName();
+                    violation.setMixinType( member.getDeclaringClass() );
+                    violation.setMethodName( methodName );
+                }
+
+            }
+            throw new ConstraintViolationException( violations );
         }
     }
 
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsModel.java
index 5568881..3e95209 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ValueConstraintsModel.java
@@ -20,13 +20,11 @@
 
 package org.apache.polygene.runtime.composite;
 
+import java.util.Collections;
 import java.util.List;
 import org.apache.polygene.api.util.HierarchicalVisitor;
 import org.apache.polygene.api.util.VisitableHierarchy;
 
-/**
- * JAVADOC
- */
 public final class ValueConstraintsModel
     implements VisitableHierarchy<Object, Object>
 {
@@ -43,17 +41,13 @@
 
     public ValueConstraintsInstance newInstance()
     {
-        return new ValueConstraintsInstance( constraintModels, name, optional );
+        List<AbstractConstraintModel> models = isConstrained() ? this.constraintModels : Collections.emptyList();
+        return new ValueConstraintsInstance( models, name, optional );
     }
 
     public boolean isConstrained()
     {
-        if( !constraintModels.isEmpty() )
-        {
-            return true;
-        }
-
-        return !optional;
+        return !constraintModels.isEmpty() || !optional;
     }
 
     @Override
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityInstance.java
index 6893225..386a592 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityInstance.java
@@ -20,8 +20,6 @@
 package org.apache.polygene.runtime.entity;
 
 import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.List;
 import java.util.Objects;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -299,12 +297,11 @@
         }
         catch( ConstraintViolationException e )
         {
-            List<? extends Type> entityModelList = entityModel.types().collect( toList() );
-            throw new ConstraintViolationException( reference.identity(),
-                                                    entityModelList,
-                                                    e.mixinTypeName(),
-                                                    e.methodName(),
-                                                    e.constraintViolations() );
+            e.setCompositeDescriptor( descriptor() );
+            e.setIdentity( entityState.entityReference().identity() );
+            e.setInstanceString( proxy.toString() );
+            e.setCompositeDescriptor( entityModel );
+            throw e;
         }
     }
 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityModel.java
index 5fc00f5..bc2390e 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityModel.java
@@ -134,6 +134,12 @@
         {
             throw new ConstructionException( "Could not create new entity in store", e );
         }
+        catch( ConstraintViolationException e )
+        {
+            e.setCompositeDescriptor( this );
+            e.setIdentity( reference.identity() );
+            throw e;
+        }
     }
 
     public void initState( ModuleDescriptor module, EntityState entityState )
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
index 7601b4e..7ed42e4 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
@@ -38,8 +38,7 @@
 /**
  * Model for EntityComposite state.
  */
-public final class EntityStateModel
-    extends StateModel
+public final class EntityStateModel extends StateModel
     implements AssociationStateDescriptor
 {
     private final AssociationsModel associationsModel;
@@ -77,6 +76,12 @@
         return associationsModel.getAssociationByQualifiedName( name );
     }
 
+    @Override
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return associationsModel.hasAssociation( name );
+    }
+
     public ManyAssociationModel getManyAssociation( AccessibleObject accessor )
         throws IllegalArgumentException
     {
@@ -97,6 +102,12 @@
         return manyAssociationsModel.getManyAssociationByQualifiedName( name );
     }
 
+    @Override
+    public boolean hasManyAssociation( QualifiedName name )
+    {
+        return manyAssociationsModel.hasAssociation( name );
+    }
+
     public NamedAssociationModel getNamedAssociation( AccessibleObject accessor )
         throws IllegalArgumentException
     {
@@ -118,6 +129,12 @@
     }
 
     @Override
+    public boolean hasNamedAssociation( QualifiedName name )
+    {
+        return namedAssociationsModel.hasAssociation( name );
+    }
+
+    @Override
     public Stream<AssociationModel> associations()
     {
         return associationsModel.associations();
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/ServiceInjectionProviderFactory.java b/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/ServiceInjectionProviderFactory.java
index f3dc70c..f6542e5 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/ServiceInjectionProviderFactory.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/ServiceInjectionProviderFactory.java
@@ -27,7 +27,7 @@
 import java.util.function.Function;
 import java.util.function.Predicate;
 import java.util.stream.Stream;
-import org.apache.polygene.api.service.NoSuchServiceException;
+import org.apache.polygene.api.service.NoSuchServiceTypeException;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.service.qualifier.Qualifier;
 import org.apache.polygene.api.util.Classes;
@@ -203,7 +203,7 @@
                                   .filter( serviceQualifier ).findFirst().orElse( null );
                 }
             }
-            catch( NoSuchServiceException e )
+            catch( NoSuchServiceTypeException e )
             {
                 return null;
             }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/UsesInjectionProviderFactory.java b/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/UsesInjectionProviderFactory.java
index 6b21d29..0ebf7e2 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/UsesInjectionProviderFactory.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/injection/provider/UsesInjectionProviderFactory.java
@@ -20,8 +20,8 @@
 package org.apache.polygene.runtime.injection.provider;
 
 import java.lang.reflect.Constructor;
-import org.apache.polygene.api.composite.NoSuchTransientException;
-import org.apache.polygene.api.object.NoSuchObjectException;
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
+import org.apache.polygene.api.object.NoSuchObjectTypeException;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.util.AccessibleObjects;
 import org.apache.polygene.bootstrap.InvalidInjectionException;
@@ -83,13 +83,13 @@
                     }
                     usesObject = moduleInstance.newTransient( injectionType, uses.toArray() );
                 }
-                catch( NoSuchTransientException e )
+                catch( NoSuchTransientTypeException e )
                 {
                     try
                     {
                         usesObject = moduleInstance.newObject( injectionType, uses.toArray() );
                     }
-                    catch( NoSuchObjectException e1 )
+                    catch( NoSuchObjectTypeException e1 )
                     {
                         // Could not instantiate an instance - to try instantiate as plain class
                         try
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
index cfcfcb5..ef1f831 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
@@ -34,7 +34,8 @@
 public class PropertiesModel
     implements VisitableHierarchy<Object, Object>
 {
-    protected final Map<AccessibleObject, PropertyModel> mapAccessiblePropertyModel = new LinkedHashMap<>();
+    private final Map<AccessibleObject, PropertyModel> mapAccessiblePropertyModel = new LinkedHashMap<>();
+    private final Map<QualifiedName, PropertyModel> mapNamePropertyModel = new LinkedHashMap<>();
 
     public PropertiesModel()
     {
@@ -43,6 +44,7 @@
     public void addProperty( PropertyModel property )
     {
         mapAccessiblePropertyModel.put( property.accessor(), property );
+        mapNamePropertyModel.put( property.qualifiedName(), property );
     }
 
     @Override
@@ -75,7 +77,6 @@
         {
             throw new IllegalArgumentException( "No property found with name: " + ( (Member) accessor ).getName() );
         }
-
         return propertyModel;
     }
 
@@ -95,13 +96,16 @@
     public PropertyModel getPropertyByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( PropertyModel propertyModel : mapAccessiblePropertyModel.values() )
+        PropertyModel propertyModel = mapNamePropertyModel.get( name );
+        if( propertyModel != null )
         {
-            if( propertyModel.qualifiedName().equals( name ) )
-            {
-                return propertyModel;
-            }
+            return propertyModel;
         }
         throw new IllegalArgumentException( "No property found with qualified name: " + name );
     }
+
+    public boolean hasProperty( QualifiedName name )
+    {
+        return mapNamePropertyModel.containsKey( name );
+    }
 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertyModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertyModel.java
index 79f7ae9..7ca4395 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertyModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertyModel.java
@@ -27,15 +27,15 @@
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 import java.util.List;
+import java.util.function.BiFunction;
 import java.util.stream.Stream;
 import org.apache.polygene.api.common.MetaInfo;
 import org.apache.polygene.api.common.QualifiedName;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.entity.Queryable;
 import org.apache.polygene.api.property.DefaultValues;
 import org.apache.polygene.api.property.GenericPropertyInfo;
-import org.apache.polygene.api.property.InitialValueProvider;
 import org.apache.polygene.api.property.InvalidPropertyTypeException;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.property.PropertyDescriptor;
@@ -87,8 +87,7 @@
                           boolean useDefaults,
                           ValueConstraintsInstance constraints,
                           MetaInfo metaInfo,
-                          Object initialValue,
-                          InitialValueProvider initialValueProvider
+                          Object initialValue
                         )
     {
         if( accessor instanceof Method )
@@ -105,14 +104,7 @@
         type = GenericPropertyInfo.propertyTypeOf( accessor );
         checkTypeValidity( type );
         qualifiedName = QualifiedName.fromAccessor( accessor );
-        if( initialValueProvider != null )
-        {
-            this.initialValueProvider = initialValueProvider;
-        }
-        else
-        {
-            this.initialValueProvider = new DefaultInitialValueProvider( useDefaults, initialValue );
-        }
+        initialValueProvider = new DefaultInitialValueProvider( useDefaults, initialValue );
         this.constraints = constraints;
         final Queryable queryable = accessor.getAnnotation( Queryable.class );
         this.queryable = queryable == null || queryable.value();
@@ -195,12 +187,6 @@
     }
 
     @Override
-    public InitialValueProvider initialValueProvider()
-    {
-        return initialValueProvider;
-    }
-
-    @Override
     public Object resolveInitialValue( ModuleDescriptor moduleDescriptor )
     {
         return initialValueProvider.apply( moduleDescriptor.instance(), this );
@@ -300,16 +286,15 @@
         {
             if( constraints != null )
             {
-                List<ConstraintViolation> violations = constraints.checkConstraints( value );
-                if( !violations.isEmpty() )
-                {
-                    Stream<Class<?>> empty = Stream.empty();
-                    throw new ConstraintViolationException( "", empty, (Member) accessor, violations );
-                }
+                constraints.checkConstraints( value, accessor );
             }
         }
     }
 
+    private interface InitialValueProvider extends BiFunction<Module, PropertyDescriptor, Object>
+    {
+    }
+
     private class DefaultInitialValueProvider
         implements InitialValueProvider
     {
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/query/QueryBuilderFactoryImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/query/QueryBuilderFactoryImpl.java
index 0f572ea..e01af28 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/query/QueryBuilderFactoryImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/query/QueryBuilderFactoryImpl.java
@@ -23,7 +23,7 @@
 import org.apache.polygene.api.query.NotQueryableException;
 import org.apache.polygene.api.query.QueryBuilder;
 import org.apache.polygene.api.query.QueryBuilderFactory;
-import org.apache.polygene.api.service.NoSuchServiceException;
+import org.apache.polygene.api.service.NoSuchServiceTypeException;
 import org.apache.polygene.api.service.ServiceFinder;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.spi.query.EntityFinder;
@@ -61,7 +61,7 @@
             serviceReference = finder.findService( EntityFinder.class );
             return new QueryBuilderImpl<>( serviceReference.get(), resultType, null );
         }
-        catch( NoSuchServiceException e )
+        catch( NoSuchServiceTypeException e )
         {
             return new QueryBuilderImpl<>( null, resultType, null );
         }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/service/ServiceModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/service/ServiceModel.java
index 74dd852..e45f22d 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/service/ServiceModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/service/ServiceModel.java
@@ -70,7 +70,7 @@
                          CompositeMethodsModel compositeMethodsModel,
                          Identity identity,
                          boolean instantiateOnStartup
-    )
+                       )
     {
         super( module, types, visibility, metaInfo, mixinsModel, stateModel, compositeMethodsModel );
 
@@ -133,16 +133,17 @@
         Object[] mixins = mixinsModel.newMixinHolder();
 
         Map<AccessibleObject, Property<?>> properties = new HashMap<>();
-        stateModel.properties().forEach( propertyModel -> {
-            Object initialValue = propertyModel.resolveInitialValue(module);
-            if( propertyModel.accessor().equals( HasIdentity.IDENTITY_METHOD ) )
-            {
-                initialValue = identity;
-            }
+        stateModel.properties().forEach( propertyModel ->
+                                         {
+                                             Object initialValue = propertyModel.resolveInitialValue( module );
+                                             if( propertyModel.accessor().equals( HasIdentity.IDENTITY_METHOD ) )
+                                             {
+                                                 initialValue = identity;
+                                             }
 
-            Property<?> property = new PropertyInstance<>( propertyModel, initialValue );
-            properties.put( propertyModel.accessor(), property );
-        } );
+                                             Property<?> property = new PropertyInstance<>( propertyModel, initialValue );
+                                             properties.put( propertyModel.accessor(), property );
+                                         } );
 
         TransientStateInstance state = new TransientStateInstance( properties );
         ServiceInstance compositeInstance = new ServiceInstance( this, mixins, state );
@@ -170,11 +171,13 @@
     {
         DependencyModel.ScopeSpecification thisSpec = new DependencyModel.ScopeSpecification( This.class );
         Predicate<DependencyModel> configurationCheck = item -> item.rawInjectionType().equals( Configuration.class );
-        return dependencies().filter( thisSpec.and( configurationCheck ) )
+        return dependencies()
+            .filter( thisSpec.and( configurationCheck ) )
             .filter( dependencyModel -> dependencyModel.rawInjectionType().equals( Configuration.class ) )
             .filter( dependencyModel -> dependencyModel.injectionType() instanceof ParameterizedType )
             .map( dependencyModel -> Classes.RAW_CLASS.apply( ( (ParameterizedType) dependencyModel.injectionType() ).getActualTypeArguments()[ 0 ] ) )
-            .reduce( null, ( injectionClass, type ) -> {
+            .reduce( null, ( injectionClass, type ) ->
+            {
                 if( injectionClass == null )
                 {
                     injectionClass = type;
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/LayerModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/LayerModel.java
index 04ca846..488283b 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/LayerModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/LayerModel.java
@@ -30,6 +30,7 @@
 import org.apache.polygene.api.object.ObjectDescriptor;
 import org.apache.polygene.api.structure.Layer;
 import org.apache.polygene.api.structure.LayerDescriptor;
+import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.util.HierarchicalVisitor;
 import org.apache.polygene.api.util.VisitableHierarchy;
 import org.apache.polygene.api.value.ValueDescriptor;
@@ -75,9 +76,9 @@
         return metaInfo.get( infoType );
     }
 
-    public Iterable<ModuleModel> modules()
+    public Stream<? extends ModuleDescriptor> modules()
     {
-        return modules;
+        return modules.stream();
     }
 
     @Override
@@ -147,14 +148,12 @@
         return modules.stream().flatMap( module -> module.visibleEntities( visibility ) );
     }
 
-    /* package */
     @Override
     public Stream<? extends ValueDescriptor> visibleValues( final Visibility visibility )
     {
         return modules.stream().flatMap( module -> module.visibleValues( visibility ) );
     }
 
-    /* package */
     @Override
     public Stream<? extends ModelDescriptor> visibleServices( final Visibility visibility )
     {
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleInstance.java
index 955df41..969ae18 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleInstance.java
@@ -37,14 +37,14 @@
 import org.apache.polygene.api.common.ConstructionException;
 import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.composite.ModelDescriptor;
-import org.apache.polygene.api.composite.NoSuchTransientException;
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
 import org.apache.polygene.api.composite.TransientDescriptor;
 import org.apache.polygene.api.entity.EntityReference;
 import org.apache.polygene.api.identity.IdentityGenerator;
 import org.apache.polygene.api.metrics.MetricsProvider;
-import org.apache.polygene.api.object.NoSuchObjectException;
+import org.apache.polygene.api.object.NoSuchObjectTypeException;
 import org.apache.polygene.api.object.ObjectDescriptor;
 import org.apache.polygene.api.object.ObjectFactory;
 import org.apache.polygene.api.property.Property;
@@ -53,7 +53,7 @@
 import org.apache.polygene.api.query.QueryBuilderFactory;
 import org.apache.polygene.api.serialization.Serialization;
 import org.apache.polygene.api.serialization.SerializationException;
-import org.apache.polygene.api.service.NoSuchServiceException;
+import org.apache.polygene.api.service.NoSuchServiceTypeException;
 import org.apache.polygene.api.service.ServiceFinder;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.structure.LayerDescriptor;
@@ -63,7 +63,7 @@
 import org.apache.polygene.api.type.HasTypes;
 import org.apache.polygene.api.unitofwork.UnitOfWorkException;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.api.value.NoSuchValueException;
+import org.apache.polygene.api.value.NoSuchValueTypeException;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 import org.apache.polygene.api.value.ValueDescriptor;
@@ -88,7 +88,6 @@
 import org.apache.polygene.runtime.value.ValueBuilderWithState;
 import org.apache.polygene.runtime.value.ValueInstance;
 import org.apache.polygene.spi.entitystore.EntityStore;
-import org.apache.polygene.spi.metrics.MetricsProviderAdapter;
 import org.apache.polygene.spi.module.ModuleSpi;
 
 import static java.util.Arrays.asList;
@@ -119,8 +118,8 @@
 
     @SuppressWarnings( "LeakingThisInConstructor" )
     ModuleInstance( ModuleModel moduleModel, LayerDescriptor layer, TypeLookup typeLookup,
-                           ServicesModel servicesModel, ImportedServicesModel importedServicesModel
-    )
+                    ServicesModel servicesModel, ImportedServicesModel importedServicesModel
+                  )
     {
         // Constructor parameters
         model = moduleModel;
@@ -167,15 +166,15 @@
     // Implementation of ObjectFactory
     @Override
     public <T> T newObject( Class<T> mixinType, Object... uses )
-        throws NoSuchObjectException
+        throws NoSuchObjectTypeException
     {
         Objects.requireNonNull( mixinType, "mixinType" );
         ObjectDescriptor model = typeLookup.lookupObjectModel( mixinType );
 
         if( model == null )
         {
-            throw new NoSuchObjectException( mixinType.getName(), name(),
-                                             typeLookup.allObjects().flatMap( HasTypes::types ) );
+            throw new NoSuchObjectTypeException( mixinType.getName(), name(),
+                                                 typeLookup.allObjects().flatMap( HasTypes::types ) );
         }
 
         InjectionContext injectionContext = new InjectionContext( model.module(), UsesInstance.EMPTY_USES.use( uses ) );
@@ -191,8 +190,8 @@
 
         if( model == null )
         {
-            throw new NoSuchObjectException( instance.getClass().getName(), name(),
-                                             typeLookup.allObjects().flatMap( HasTypes::types ) );
+            throw new NoSuchObjectTypeException( instance.getClass().getName(), name(),
+                                                 typeLookup.allObjects().flatMap( HasTypes::types ) );
         }
 
         InjectionContext injectionContext = new InjectionContext( model.module(), UsesInstance.EMPTY_USES.use( uses ) );
@@ -202,14 +201,14 @@
     // Implementation of TransientBuilderFactory
     @Override
     public <T> TransientBuilder<T> newTransientBuilder( Class<T> mixinType )
-        throws NoSuchTransientException
+        throws NoSuchTransientTypeException
     {
         Objects.requireNonNull( mixinType, "mixinType" );
         TransientDescriptor model = typeLookup.lookupTransientModel( mixinType );
 
         if( model == null )
         {
-            throw new NoSuchTransientException( mixinType.getName(), name(), typeLookup );
+            throw new NoSuchTransientTypeException( mixinType.getName(), descriptor() );
         }
 
         Map<AccessibleObject, Property<?>> properties = new HashMap<>();
@@ -229,7 +228,7 @@
 
     @Override
     public <T> T newTransient( final Class<T> mixinType, Object... uses )
-        throws NoSuchTransientException, ConstructionException
+        throws NoSuchTransientTypeException, ConstructionException
     {
         return newTransientBuilder( mixinType ).use( uses ).newInstance();
     }
@@ -237,21 +236,21 @@
     // Implementation of ValueBuilderFactory
     @Override
     public <T> T newValue( Class<T> mixinType )
-        throws NoSuchValueException, ConstructionException
+        throws NoSuchValueTypeException, ConstructionException
     {
         return newValueBuilder( mixinType ).newInstance();
     }
 
     @Override
     public <T> ValueBuilder<T> newValueBuilder( Class<T> mixinType )
-        throws NoSuchValueException
+        throws NoSuchValueTypeException
     {
         Objects.requireNonNull( mixinType, "mixinType" );
         ValueDescriptor compositeModelModule = typeLookup.lookupValueModel( mixinType );
 
         if( compositeModelModule == null )
         {
-            throw new NoSuchValueException( mixinType.getName(), name(), typeLookup );
+            throw new NoSuchValueTypeException( mixinType.getName(), descriptor() );
         }
 
         StateResolver stateResolver = new InitialStateResolver( compositeModelModule.module() );
@@ -264,7 +263,7 @@
                                                          Function<AssociationDescriptor, EntityReference> associationFunction,
                                                          Function<AssociationDescriptor, Stream<EntityReference>> manyAssociationFunction,
                                                          Function<AssociationDescriptor, Stream<Map.Entry<String, EntityReference>>> namedAssociationFunction
-    )
+                                                       )
     {
         Objects.requireNonNull( propertyFunction, "propertyFunction" );
         Objects.requireNonNull( associationFunction, "associationFunction" );
@@ -275,7 +274,7 @@
 
         if( compositeModelModule == null )
         {
-            throw new NoSuchValueException( mixinType.getName(), name(), typeLookup );
+            throw new NoSuchValueTypeException( mixinType.getName(), descriptor() );
         }
 
         StateResolver stateResolver = new FunctionStateResolver(
@@ -333,7 +332,7 @@
 
         if( model == null )
         {
-            throw new NoSuchValueException( valueType.getName(), name(), typeLookup );
+            throw new NoSuchValueTypeException( valueType.getName(), descriptor() );
         }
 
         return new ValueBuilderWithPrototype<>( model, this, prototype );
@@ -341,14 +340,14 @@
 
     @Override
     public <T> T newValueFromSerializedState( Class<T> mixinType, String serializedState )
-        throws NoSuchValueException, ConstructionException
+        throws NoSuchValueTypeException, ConstructionException
     {
         Objects.requireNonNull( mixinType, "mixinType" );
         ValueDescriptor model = typeLookup.lookupValueModel( mixinType );
 
         if( model == null )
         {
-            throw new NoSuchValueException( mixinType.getName(), name(), typeLookup );
+            throw new NoSuchValueTypeException( mixinType.getName(), descriptor() );
         }
 
         try
@@ -370,7 +369,7 @@
 
     @Override
     public <T> ServiceReference<T> findService( Class<T> serviceType )
-        throws NoSuchServiceException
+        throws NoSuchServiceTypeException
     {
         return findService( (Type) serviceType );
     }
@@ -381,7 +380,7 @@
         ModelDescriptor serviceModel = typeLookup.lookupServiceModel( serviceType );
         if( serviceModel == null )
         {
-            throw new NoSuchServiceException( serviceType.getTypeName(), name(), typeLookup );
+            throw new NoSuchServiceTypeException( serviceType.getTypeName(), descriptor() );
         }
         return findServiceReferenceInstance( serviceModel );
     }
@@ -481,10 +480,9 @@
                 {
                     try
                     {
-                        ServiceReference<EntityStore> service = findService( EntityStore.class );
-                        store = service.get();
+                        store = findService( EntityStore.class ).get();
                     }
-                    catch( NoSuchServiceException e )
+                    catch( NoSuchServiceTypeException e )
                     {
                         throw new UnitOfWorkException( "No EntityStore service available in module " + name() );
                     }
@@ -505,10 +503,9 @@
                 {
                     try
                     {
-                        ServiceReference<UnitOfWorkFactory> service = findService( UnitOfWorkFactory.class );
-                        uowf = service.get();
+                        uowf = findService( UnitOfWorkFactory.class ).get();
                     }
-                    catch( NoSuchServiceException e )
+                    catch( NoSuchServiceTypeException e )
                     {
                         throw new UnitOfWorkException( "No UnitOfWorkFactory service available in module " + name() );
                     }
@@ -551,8 +548,7 @@
             {
                 if( generator == null )
                 {
-                    ServiceReference<IdentityGenerator> service = findService( IdentityGenerator.class );
-                    generator = service.get();
+                    generator = findService( IdentityGenerator.class ).get();
                 }
             }
         }
@@ -568,8 +564,7 @@
             {
                 if( serialization == null )
                 {
-                    ServiceReference<Serialization> service = findService( Serialization.class );
-                    serialization = service.get();
+                    serialization = findService( Serialization.class ).get();
                 }
             }
         }
@@ -585,15 +580,7 @@
             {
                 if( metrics == null )
                 {
-                    try
-                    {
-                        ServiceReference<MetricsProvider> service = findService( MetricsProvider.class );
-                        metrics = service.get();
-                    }
-                    catch( NoSuchServiceException e )
-                    {
-                        metrics = new MetricsProviderAdapter();
-                    }
+                    metrics = findService( MetricsProvider.class ).get();
                 }
             }
         }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleModel.java
index 6b556a5..e873952 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleModel.java
@@ -256,6 +256,7 @@
         return objectsModel.models();
     }
 
+    @Override
     public Stream<? extends ValueDescriptor> findVisibleValueTypes()
     {
         return concat( visibleValues( module ),
@@ -269,6 +270,7 @@
         );
     }
 
+    @Override
     public Stream<? extends EntityDescriptor> findVisibleEntityTypes()
     {
         return concat( visibleEntities( module ),
@@ -282,6 +284,7 @@
         );
     }
 
+    @Override
     public Stream<? extends TransientDescriptor> findVisibleTransientTypes()
     {
         return concat( visibleTransients( module ),
@@ -310,6 +313,7 @@
         );
     }
 
+    @Override
     public Stream<? extends ObjectDescriptor> findVisibleObjectTypes()
     {
         return concat( visibleObjects( module ),
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/UsedLayersModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/UsedLayersModel.java
index c5bcd1a..94d5414 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/structure/UsedLayersModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/structure/UsedLayersModel.java
@@ -68,4 +68,10 @@
     {
         return new UsedLayersInstance( usedLayerInstances );
     }
+
+    @Override
+    public String toString()
+    {
+        return usedLayers.toString();
+    }
 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/ModuleUnitOfWork.java b/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/ModuleUnitOfWork.java
index 7f4dedf..f72cb37 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/ModuleUnitOfWork.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/ModuleUnitOfWork.java
@@ -55,7 +55,6 @@
 import org.apache.polygene.api.query.QueryBuilder;
 import org.apache.polygene.api.query.QueryExecutionException;
 import org.apache.polygene.api.query.grammar.OrderBy;
-import org.apache.polygene.api.service.NoSuchServiceException;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.unitofwork.ConcurrentEntityModificationException;
 import org.apache.polygene.api.unitofwork.NoSuchEntityException;
@@ -182,7 +181,7 @@
 
         if( model == null )
         {
-            throw new NoSuchEntityTypeException( type.getName(), module.name(), module.typeLookup() );
+            throw new NoSuchEntityTypeException( type.getName(), module );
         }
 
         ModuleDescriptor modelModule = model.module();
@@ -192,11 +191,6 @@
         if( identity == null )
         {
             IdentityGenerator idGen = ( (ModuleSpi) modelModule.instance() ).identityGenerator();
-            if( idGen == null )
-            {
-                throw new NoSuchServiceException( IdentityGenerator.class.getName(), modelModule
-                    .name(), modelModule.typeLookup() );
-            }
             identity = idGen.generate( model.types().findFirst().orElse( null ) );
         }
         EntityBuilder<T> builder;
@@ -244,7 +238,7 @@
 
         if( model == null )
         {
-            throw new NoSuchEntityTypeException( type.getName(), module.name(), module.typeLookup() );
+            throw new NoSuchEntityTypeException( type.getName(), module );
         }
 
         ModuleDescriptor modelModule = model.module();
@@ -266,16 +260,11 @@
             {
                 // Generate reference
                 IdentityGenerator idGen = moduleSpi.identityGenerator();
-                if( idGen == null )
-                {
-                    String typeName = IdentityGenerator.class.getName();
-                    throw new NoSuchServiceException( typeName, modelModule.name(), modelModule.typeLookup() );
-                }
                 identity = idGen.generate( model.types().findFirst().orElse( null ) );
             }
             else
             {
-                identity = new StringIdentity( propertyState );
+                identity = StringIdentity.identityOf( propertyState );
             }
         }
 
@@ -294,7 +283,7 @@
 
         if( !models.iterator().hasNext() )
         {
-            throw new NoSuchEntityTypeException( type.getName(), module.name(), module.typeLookup() );
+            throw new NoSuchEntityTypeException( type.getName(), module );
         }
 
         return uow.get( EntityReference.create( identity ), this, models, type );
@@ -558,7 +547,8 @@
         return ( (EntityInstance) compositeInstanceOf( (Composite) entity ) ).entityState();
     }
 
-    private static class UoWQuerySource implements QuerySource
+    private static class UoWQuerySource
+        implements QuerySource
     {
         private final ModuleUnitOfWork moduleUnitOfWork;
 
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/UnitOfWorkInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/UnitOfWorkInstance.java
index 927f04b..33745f7 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/UnitOfWorkInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/unitofwork/UnitOfWorkInstance.java
@@ -157,7 +157,7 @@
                 }
                 else
                 {
-                    throw new NoSuchEntityTypeException( mixinType.getName(), module.name(), module.typeLookup() );
+                    throw new NoSuchEntityTypeException( mixinType.getName(), module );
                 }
             }
             // Create instance
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueBuilderInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueBuilderInstance.java
index 91f975d..6789d95 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueBuilderInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueBuilderInstance.java
@@ -22,7 +22,7 @@
 import org.apache.polygene.api.association.AssociationStateHolder;
 import org.apache.polygene.api.common.ConstructionException;
 import org.apache.polygene.api.composite.Composite;
-import org.apache.polygene.api.value.NoSuchValueException;
+import org.apache.polygene.api.value.NoSuchValueTypeException;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueDescriptor;
 import org.apache.polygene.runtime.composite.StateResolver;
@@ -86,7 +86,7 @@
 
         if( valueModel == null )
         {
-            throw new NoSuchValueException( valueType.getName(), currentModule.name(), currentModule.typeLookup() );
+            throw new NoSuchValueTypeException( valueType.getName(), currentModule.descriptor() );
         }
         return new ValueBuilderWithPrototype<>( valueModel, currentModule, prototype() ).newInstance();
     }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueInstance.java b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueInstance.java
index 5e678c5..79deff9 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueInstance.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueInstance.java
@@ -20,6 +20,7 @@
 package org.apache.polygene.runtime.value;
 
 import java.lang.reflect.Proxy;
+import java.util.Arrays;
 import org.apache.polygene.api.composite.CompositeInstance;
 import org.apache.polygene.api.serialization.Serializer;
 import org.apache.polygene.runtime.composite.MixinsInstance;
@@ -144,10 +145,28 @@
         return hash + state.hashCode() * 5; // State
     }
 
+    public String toJsonString()
+    {
+        Serializer serialization = ( (ModuleSpi) module().instance() ).serialization();
+        if( serialization != null )
+        {
+            return serialization.serialize( Serializer.Options.NO_TYPE_INFO, proxy() );
+        }
+        return null;
+    }
+
     @Override
     public String toString()
     {
-        Serializer serialization = ( (ModuleSpi) module().instance() ).serialization();
-        return serialization.serialize( Serializer.Options.NO_TYPE_INFO, proxy() );
+        String json = toJsonString();
+        if( json != null )
+        {
+            return json;
+        }
+        return "ValueInstance{" +
+               "mixins=" + Arrays.toString( mixins ) +
+               ", state=" + state +
+               ", compositeModel=" + compositeModel +
+               '}';
     }
 }
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueModel.java
index b79b298..3f9703e 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueModel.java
@@ -20,15 +20,20 @@
 
 package org.apache.polygene.runtime.value;
 
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
+import java.util.ArrayList;
 import java.util.List;
-import java.util.stream.Stream;
+import org.apache.polygene.api.association.AssociationDescriptor;
 import org.apache.polygene.api.common.MetaInfo;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
+import org.apache.polygene.api.entity.EntityDescriptor;
+import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.structure.ModuleDescriptor;
+import org.apache.polygene.api.structure.TypeLookup;
 import org.apache.polygene.api.type.ValueCompositeType;
+import org.apache.polygene.api.unitofwork.NoSuchEntityTypeException;
 import org.apache.polygene.api.util.Classes;
 import org.apache.polygene.api.value.ValueDescriptor;
 import org.apache.polygene.runtime.composite.CompositeMethodsModel;
@@ -37,6 +42,7 @@
 import org.apache.polygene.runtime.composite.MixinsModel;
 import org.apache.polygene.runtime.composite.UsesInstance;
 import org.apache.polygene.runtime.injection.InjectionContext;
+import org.apache.polygene.runtime.property.PropertyInstance;
 import org.apache.polygene.runtime.unitofwork.UnitOfWorkInstance;
 
 /**
@@ -54,10 +60,11 @@
                        final MixinsModel mixinsModel,
                        final ValueStateModel stateModel,
                        final CompositeMethodsModel compositeMethodsModel
-    )
+                     )
     {
         super( module, types, visibility, metaInfo, mixinsModel, stateModel, compositeMethodsModel );
-
+// TODO: When TypeLookup's lazy loading can be disabled during Model building, then uncomment the following line.
+//        checkAssociationVisibility();
         valueType = ValueCompositeType.of( this );
     }
 
@@ -77,6 +84,8 @@
     void checkConstraints( ValueStateInstance state )
         throws ConstraintViolationException
     {
+        List<ValueConstraintViolation> violations = new ArrayList<>();
+
         stateModel.properties().forEach(
             propertyModel ->
             {
@@ -86,11 +95,10 @@
                 }
                 catch( ConstraintViolationException e )
                 {
-                    throw new ConstraintViolationException( "<builder>", propertyModel.valueType()
-                        .types(), (Member) propertyModel.accessor(), e.constraintViolations() );
+                    violations.addAll( e.constraintViolations() );
                 }
             }
-        );
+                                       );
 
         // IF no UnitOfWork is active, then the Association checks shouldn't be done.
         if( UnitOfWorkInstance.getCurrent().empty() )
@@ -106,21 +114,59 @@
                 }
                 catch( ConstraintViolationException e )
                 {
-                    Stream<? extends Type> types = Classes.interfacesOf( associationModel.type() );
-                    throw new ConstraintViolationException( "<builder>", types,
-                                                            (Member) associationModel.accessor(),
-                                                            e.constraintViolations() );
+                    violations.addAll( e.constraintViolations() );
                 }
             }
-        );
+                                                               );
 
         ( (ValueStateModel) stateModel ).manyAssociations().forEach(
-            model -> model.checkAssociationConstraints( state.manyAssociationFor( model.accessor() ) )
-        );
+            model ->
+            {
+                try
+                {
+                    model.checkAssociationConstraints( state.manyAssociationFor( model.accessor() ) );
+                }
+                catch( ConstraintViolationException e )
+                {
+                    violations.addAll( e.constraintViolations() );
+                }
+            }
+                                                                   );
 
         ( (ValueStateModel) stateModel ).namedAssociations().forEach(
-            model -> model.checkAssociationConstraints( state.namedAssociationFor( model.accessor() ) )
-        );
+            model ->
+            {
+                try
+                {
+                    model.checkAssociationConstraints( state.namedAssociationFor( model.accessor() ) );
+                }
+                catch( ConstraintViolationException e )
+                {
+                    violations.addAll( e.constraintViolations() );
+                }
+            }
+                                                                    );
+        if( !violations.isEmpty() )
+        {
+            ConstraintViolationException exception = new ConstraintViolationException( violations );
+            exception.setCompositeDescriptor( this );
+            exception.setIdentity( extractIdentity( state, exception ) );
+            throw exception;
+        }
+    }
+
+    private Identity extractIdentity( ValueStateInstance state, ConstraintViolationException e )
+    {
+        try
+        {
+            PropertyInstance<Identity> identityProperty = state.propertyFor( HasIdentity.IDENTITY_METHOD );
+            return identityProperty.get();
+        }
+        catch( IllegalArgumentException e1 )
+        {
+            // ignore. is not a HasIdentity value
+        }
+        return null;
     }
 
     public ValueInstance newValueInstance( ValueStateInstance state )
@@ -140,4 +186,24 @@
         // Return
         return instance;
     }
+
+    private void checkAssociationVisibility()
+    {
+        // All referenced entity types in any Associations must be visible from the module of this ValueModel.
+        TypeLookup lookup = module.typeLookup();
+        ValueStateModel stateModel = (ValueStateModel) this.stateModel;
+        stateModel.associations().forEach( model -> checkModel( lookup, model ) );
+        stateModel.manyAssociations().forEach( model -> checkModel( lookup, model ) );
+        stateModel.namedAssociations().forEach( model -> checkModel( lookup, model ) );
+    }
+
+    private void checkModel( TypeLookup lookup, AssociationDescriptor model )
+    {
+        Class<?> rawClass = Classes.RAW_CLASS.apply( model.type() );
+        List<EntityDescriptor> descriptors = lookup.lookupEntityModels( rawClass );
+        if( descriptors.size() == 0 )
+        {
+            throw new NoSuchEntityTypeException( rawClass.getName(), module );
+        }
+    }
 }
\ No newline at end of file
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
index 73c6a17..f8ef350 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
@@ -70,6 +70,12 @@
     }
 
     @Override
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return associationsModel.hasAssociation( name );
+    }
+
+    @Override
     public AssociationDescriptor getManyAssociationByName( String name )
     {
         return manyAssociationsModel.getManyAssociationByName( name );
@@ -82,6 +88,12 @@
     }
 
     @Override
+    public boolean hasManyAssociation( QualifiedName name )
+    {
+        return manyAssociationsModel.hasAssociation( name );
+    }
+
+    @Override
     public AssociationDescriptor getNamedAssociationByName( String name )
     {
         return namedAssociationsModel.getNamedAssociationByName( name );
@@ -94,6 +106,12 @@
     }
 
     @Override
+    public boolean hasNamedAssociation( QualifiedName name )
+    {
+        return namedAssociationsModel.hasAssociation( name );
+    }
+
+    @Override
     public Stream<AssociationModel> associations()
     {
         return associationsModel.associations();
diff --git a/core/runtime/src/test/java/org/apache/polygene/api/common/RemovalTest.java b/core/runtime/src/test/java/org/apache/polygene/api/common/RemovalTest.java
index a900a4f..b58c6c9 100644
--- a/core/runtime/src/test/java/org/apache/polygene/api/common/RemovalTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/api/common/RemovalTest.java
@@ -20,10 +20,9 @@
 
 package org.apache.polygene.api.common;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
@@ -31,6 +30,7 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 public class RemovalTest
     extends AbstractPolygeneTest
@@ -48,7 +48,7 @@
         throws Exception
     {
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
-        EntityBuilder<TestEntity> builder = uow.newEntityBuilder( TestEntity.class, new StringIdentity( "123" ) );
+        EntityBuilder<TestEntity> builder = uow.newEntityBuilder( TestEntity.class, StringIdentity.identityOf( "123" ) );
         builder.instance().test().set( "habba" );
         TestEntity test = builder.newInstance();
         uow.remove( test );
diff --git a/core/runtime/src/test/java/org/apache/polygene/bootstrap/ApplicationAssemblerTest.java b/core/runtime/src/test/java/org/apache/polygene/bootstrap/ApplicationAssemblerTest.java
index f924408..4646efa 100644
--- a/core/runtime/src/test/java/org/apache/polygene/bootstrap/ApplicationAssemblerTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/bootstrap/ApplicationAssemblerTest.java
@@ -19,18 +19,18 @@
  */
 package org.apache.polygene.bootstrap;
 
-import org.apache.polygene.api.identity.IdentityGenerator;
-import org.apache.polygene.api.serialization.Serialization;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.entity.EntityDescriptor;
+import org.apache.polygene.api.identity.IdentityGenerator;
+import org.apache.polygene.api.serialization.Serialization;
 import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.service.ServiceDescriptor;
 import org.apache.polygene.api.structure.ApplicationDescriptor;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.util.HierarchicalVisitorAdapter;
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * TODO
@@ -41,32 +41,26 @@
     public void testApplicationAssembler()
         throws AssemblyException
     {
-        Energy4Java is = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
 
-        ApplicationDescriptor model = is.newApplicationModel( new ApplicationAssembler()
-        {
-            @Override
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-                throws AssemblyException
-            {
-                ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
+        ApplicationDescriptor model = polygene.newApplicationModel( factory -> {
+            ApplicationAssembly assembly = factory.newApplicationAssembly();
 
-                LayerAssembly layer1 = assembly.layer( "Layer1" );
+            LayerAssembly layer1 = assembly.layer( "Layer1" );
 
-                ModuleAssembly module = layer1.module( "Module1" );
+            ModuleAssembly module = layer1.module( "Module1" );
 
-                module.services( TestService.class );
+            module.services( TestService.class );
 
-                module.entities( TestEntity.class );
+            module.entities( TestEntity.class );
 
-                layer1.services( AssemblySpecifications.ofAnyType( TestService.class ) ).instantiateOnStartup();
+            layer1.services( AssemblySpecifications.ofAnyType( TestService.class ) ).instantiateOnStartup();
 
-                layer1.services( s -> true ).visibleIn( Visibility.layer );
+            layer1.services( s -> true ).visibleIn( Visibility.layer );
 
-                layer1.entities( s -> true ).visibleIn( Visibility.application );
+            layer1.entities( s -> true ).visibleIn( Visibility.application );
 
-                return assembly;
-            }
+            return assembly;
         } );
 
         model.accept( new HierarchicalVisitorAdapter<Object, Object, RuntimeException>()
@@ -98,7 +92,7 @@
                 return true;
             }
         } );
-        model.newInstance( is.spi() );
+        model.newInstance( polygene.spi() );
     }
 
     interface TestService
diff --git a/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java b/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java
index bcd8e2a..8feca04 100644
--- a/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java
@@ -33,7 +33,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.values( Person.class );
         module.values( Pet.class );
@@ -41,7 +40,6 @@
 
     @Override
     protected void assemblyException( AssemblyException exception )
-        throws AssemblyException
     {
         assertThat( exception.getMessage(), containsString( "Composition Problems Report:\n" ) );
         assertThat( exception.getMessage(), containsString( "    message: No implementation found for method \n"
diff --git a/core/runtime/src/test/java/org/apache/polygene/bootstrap/RuntimeMixinsTest.java b/core/runtime/src/test/java/org/apache/polygene/bootstrap/RuntimeMixinsTest.java
index cdf8ead..1283272 100644
--- a/core/runtime/src/test/java/org/apache/polygene/bootstrap/RuntimeMixinsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/bootstrap/RuntimeMixinsTest.java
@@ -35,10 +35,7 @@
         throws ActivationException
     {
         SingletonAssembler singletonAssembler = new SingletonAssembler(
-            module ->
-            {
-                module.values( SayWhat.class ).withMixins( SayThisMixin.class, SayThatMixin.class );
-            }
+            module -> module.values( SayWhat.class ).withMixins( SayThisMixin.class, SayThatMixin.class )
         );
 
         SayWhat value = singletonAssembler.valueBuilderFactory().newValue( SayWhat.class );
@@ -50,15 +47,9 @@
     public void givenValueWithRuntimeMixinOverrideWhenAssembledExpectCorrectComposition()
         throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.values( SayWhere.class ).withMixins( SayHereMixin.class );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.values( SayWhere.class ).withMixins( SayHereMixin.class )
+        );
         SayWhere value = singletonAssembler.valueBuilderFactory().newValue( SayWhere.class );
         assertThat( value.sayHere(), equalTo( "here" ) );
         assertThat( value.sayThere(), nullValue() );
@@ -68,16 +59,9 @@
     public void givenTransientWithRuntimeMixinsWhenAssembledExpectCorrectComposition()
         throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( SayWhat.class ).withMixins( SayThisMixin.class, SayThatMixin.class );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.transients( SayWhat.class ).withMixins( SayThisMixin.class, SayThatMixin.class )
+        );
         SayWhat value = singletonAssembler.transientBuilderFactory().newTransient( SayWhat.class );
         assertThat( value.sayThis(), equalTo( "this" ) );
         assertThat( value.sayThat(), equalTo( "that" ) );
@@ -87,16 +71,9 @@
     public void givenTransientWithRuntimeMixinOverrideWhenAssembledExpectCorrectComposition()
         throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( SayWhere.class ).withMixins( SayHereMixin.class );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.transients( SayWhere.class ).withMixins( SayHereMixin.class )
+        );
         SayWhere value = singletonAssembler.transientBuilderFactory().newTransient( SayWhere.class );
         assertThat( value.sayHere(), equalTo( "here" ) );
         assertThat( value.sayThere(), nullValue() );
@@ -106,16 +83,9 @@
     public void givenServiceWithRuntimeMixinsWhenAssembledExpectCorrectComposition()
         throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.services( SayWhat.class ).withMixins( SayThisMixin.class, SayThatMixin.class );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.services( SayWhat.class ).withMixins( SayThisMixin.class, SayThatMixin.class )
+        );
         SayWhat value = singletonAssembler.serviceFinder().findService( SayWhat.class ).get();
         assertThat( value.sayThis(), equalTo( "this" ) );
         assertThat( value.sayThat(), equalTo( "that" ) );
@@ -125,16 +95,9 @@
     public void givenServiceWithRuntimeMixinOverrideWhenAssembledExpectCorrectComposition()
         throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.services( SayWhere.class ).withMixins( SayHereMixin.class );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.services( SayWhere.class ).withMixins( SayHereMixin.class )
+        );
         SayWhere value = singletonAssembler.serviceFinder().findService( SayWhere.class ).get();
         assertThat( value.sayHere(), equalTo( "here" ) );
         assertThat( value.sayThere(), nullValue() );
diff --git a/core/runtime/src/test/java/org/apache/polygene/constraints/PropertyConstraintTest.java b/core/runtime/src/test/java/org/apache/polygene/constraints/PropertyConstraintTest.java
index ca3b1fa..51b9e93 100644
--- a/core/runtime/src/test/java/org/apache/polygene/constraints/PropertyConstraintTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/constraints/PropertyConstraintTest.java
@@ -22,7 +22,7 @@
 import java.util.Collection;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.constraint.Constraints;
 import org.apache.polygene.api.property.Property;
@@ -53,7 +53,7 @@
         }
         catch( ConstraintViolationException e )
         {
-            Collection<ConstraintViolation> violations = e.constraintViolations();
+            Collection<ValueConstraintViolation> violations = e.constraintViolations();
             assertEquals( 2, violations.size() );
         }
     }
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java
index 7e149e0..8a1fbae 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java
@@ -33,6 +33,7 @@
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
+        module.defaultServices();
     }
 
     public interface Person
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/SetAssociationInSideEffectTest.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/SetAssociationInSideEffectTest.java
index bcb7654..1a73631 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/SetAssociationInSideEffectTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/SetAssociationInSideEffectTest.java
@@ -22,12 +22,11 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.reflect.Method;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.common.AppliesTo;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.sideeffect.GenericSideEffect;
@@ -38,6 +37,7 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsNull.nullValue;
@@ -61,8 +61,8 @@
     {
         try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Purchase Steinway" ) ) )
         {
-            Pianist chris = uow.newEntity( Pianist.class, new StringIdentity( "Chris" ) );
-            Steinway modelD = uow.newEntity( Steinway.class, new StringIdentity( "ModelD-274" ) );
+            Pianist chris = uow.newEntity( Pianist.class, StringIdentity.identityOf( "Chris" ) );
+            Steinway modelD = uow.newEntity( Steinway.class, StringIdentity.identityOf( "ModelD-274" ) );
 
             assertThat( modelD.owner().get(), is( nullValue() ) );
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
index 1163024..6b6bb0a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
@@ -19,24 +19,24 @@
  */
 package org.apache.polygene.regression.qi377;
 
-import org.apache.polygene.api.identity.HasIdentity;
-import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.association.ManyAssociation;
 import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 public class ValueCollisionWithRelatedReturnTypesTest
     extends AbstractPolygeneTest
 {
 
-    public static final Identity NICLAS = new StringIdentity( "niclas" );
+    public static final Identity NICLAS = StringIdentity.identityOf( "niclas" );
 
     @Override
     public void assemble( ModuleAssembly module )
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java
index f09aa1c..d645308 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java
@@ -33,8 +33,8 @@
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -44,15 +44,16 @@
 public class Qi382Test extends AbstractPolygeneTest
 {
 
-    public static final Identity FERRARI = new StringIdentity( "Ferrari" );
-    public static final Identity NICLAS = new StringIdentity( "Niclas" );
+    public static final Identity FERRARI = StringIdentity.identityOf( "Ferrari" );
+    public static final Identity NICLAS = StringIdentity.identityOf( "Niclas" );
 
     @Override
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        module.addServices( MemoryEntityStoreService.class );
         module.entities( Car.class, Person.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test
@@ -78,7 +79,7 @@
     public interface Car extends EntityComposite, Lifecycle
     {
 
-        static class CarMixin implements Lifecycle
+        class CarMixin implements Lifecycle
         {
             @This
             private Car me;
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java
index 8ed138c..efa6bc0 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java
@@ -26,8 +26,8 @@
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 public class Qi383Test extends AbstractPolygeneTest
@@ -36,8 +36,9 @@
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        module.addServices( MemoryEntityStoreService.class );
         module.entities( Car.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test( expected = EntityCompositeAlreadyExistsException.class )
@@ -46,9 +47,9 @@
     {
         try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            unitOfWork.newEntity( Car.class, new StringIdentity( "Ferrari" ) );
-            unitOfWork.newEntity( Car.class, new StringIdentity( "Ford" ) );
-            unitOfWork.newEntity( Car.class, new StringIdentity( "Ferrari" ) );
+            unitOfWork.newEntity( Car.class, StringIdentity.identityOf( "Ferrari" ) );
+            unitOfWork.newEntity( Car.class, StringIdentity.identityOf( "Ford" ) );
+            unitOfWork.newEntity( Car.class, StringIdentity.identityOf( "Ferrari" ) );
             unitOfWork.complete();
         }
     }
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi78/IssueTest.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi78/IssueTest.java
index 7e96d69..04dade8 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi78/IssueTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi78/IssueTest.java
@@ -23,9 +23,7 @@
 import org.apache.polygene.api.structure.ApplicationDescriptor;
 import org.apache.polygene.api.structure.LayerDescriptor;
 import org.apache.polygene.api.util.HierarchicalVisitorAdapter;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
@@ -40,23 +38,18 @@
     {
         Energy4Java polygene = new Energy4Java();
 
-        Application app = polygene.newApplication( new ApplicationAssembler()
-        {
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-                throws AssemblyException
-            {
-                ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
+        Application app = polygene.newApplication( factory -> {
+            ApplicationAssembly assembly = factory.newApplicationAssembly();
 
-                LayerAssembly domainLayer = assembly.layer( null );
-                domainLayer.setName( "Domain" );
+            LayerAssembly domainLayer = assembly.layer( null );
+            domainLayer.setName( "Domain" );
 
-                LayerAssembly infrastructureLayer = assembly.layer( null );
-                infrastructureLayer.setName( "Infrastructure" );
+            LayerAssembly infrastructureLayer = assembly.layer( null );
+            infrastructureLayer.setName( "Infrastructure" );
 
-                domainLayer.uses( infrastructureLayer );
+            domainLayer.uses( infrastructureLayer );
 
-                return assembly;
-            }
+            return assembly;
         } );
         ApplicationDescriptor model = app.descriptor();
         model.accept( new HierarchicalVisitorAdapter<Object, Object, RuntimeException>()
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ApplicationActivationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ApplicationActivationTest.java
index 95084a4..d8fb864 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ApplicationActivationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ApplicationActivationTest.java
@@ -19,13 +19,11 @@
  */
 package org.apache.polygene.runtime.activation;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.activation.Activator;
 import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class ApplicationActivationTest
 {
@@ -64,16 +62,9 @@
     public void testApplicationActivator()
             throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
-                module.layer().application().withActivators( TestedActivator.class );
-            }
-
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.layer().application().withActivators( TestedActivator.class )
+        );
 
         // Activate
         Application application = assembly.application();
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ImportedServiceActivationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ImportedServiceActivationTest.java
index 6d65488..c13d019 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ImportedServiceActivationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ImportedServiceActivationTest.java
@@ -19,10 +19,8 @@
  */
 package org.apache.polygene.runtime.activation;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.activation.Activator;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.service.ImportedServiceDescriptor;
 import org.apache.polygene.api.service.ServiceComposite;
@@ -30,12 +28,15 @@
 import org.apache.polygene.api.service.ServiceImporterException;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ImportedServiceDeclaration;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Before;
+import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 public class ImportedServiceActivationTest
 {
@@ -86,7 +87,7 @@
 
     }
 
-    public static interface TestedService
+    public interface TestedService
     {
 
         String foo();
@@ -139,19 +140,12 @@
     public void testNewInstanceImportedServiceActivators()
             throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
-                module.importedServices( TestedService.class ).
-                        withActivators( TestedActivator.class ).
-                        setMetaInfo( new TestedServiceInstance() ).
-                        importOnStartup();
-            }
-
-        };
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> module.importedServices( TestedService.class )
+                            .withActivators( TestedActivator.class )
+                            .setMetaInfo( new TestedServiceInstance() )
+                            .importOnStartup()
+        );
         Application application = assembler.application();
         assertEquals( "Activation Level", 2, activationLevel );
         application.passivate();
@@ -162,20 +156,15 @@
     public void testNewObjectImportedServiceActivators()
             throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> {
                 module.importedServices( TestedService.class ).
-                        importedBy( ImportedServiceDeclaration.NEW_OBJECT ).
-                        withActivators( TestedActivator.class ).
-                        importOnStartup();
+                    importedBy( ImportedServiceDeclaration.NEW_OBJECT ).
+                          withActivators( TestedActivator.class ).
+                          importOnStartup();
                 module.objects( TestedServiceInstance.class );
             }
-
-        };
+        );
         Application application = assembler.application();
         assertEquals( "Activation Level", 2, activationLevel );
         application.passivate();
@@ -186,21 +175,16 @@
     public void testServiceImporterImportedServiceActivators()
             throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> {
                 module.importedServices( TestedService.class ).
-                        importedBy( ImportedServiceDeclaration.SERVICE_IMPORTER ).
-                        setMetaInfo( new StringIdentity( "testimporter" ) ).
-                        withActivators( TestedActivator.class ).
-                        importOnStartup();
+                    importedBy( ImportedServiceDeclaration.SERVICE_IMPORTER ).
+                          setMetaInfo( StringIdentity.identityOf( "testimporter" ) ).
+                          withActivators( TestedActivator.class ).
+                          importOnStartup();
                 module.services( TestedServiceImporterService.class ).identifiedBy( "testimporter" );
             }
-
-        };
+        );
         Application application = assembler.application();
         assertEquals( "Activation Level", 2, activationLevel );
         application.passivate();
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/LayerActivationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/LayerActivationTest.java
index cfa7a57..f6d5e7c 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/LayerActivationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/LayerActivationTest.java
@@ -19,14 +19,12 @@
  */
 package org.apache.polygene.runtime.activation;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.activation.Activator;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.Layer;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class LayerActivationTest
 {
@@ -65,16 +63,9 @@
     public void testLayersActivators()
             throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
-                module.layer().withActivators( TestedActivator.class );
-            }
-
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.layer().withActivators( TestedActivator.class )
+        );
         // Activate
         Application application = assembly.application();
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ModuleActivationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ModuleActivationTest.java
index b6e3e2a..74b9b89 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ModuleActivationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ModuleActivationTest.java
@@ -19,14 +19,12 @@
  */
 package org.apache.polygene.runtime.activation;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.activation.Activator;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class ModuleActivationTest
 {
@@ -65,16 +63,9 @@
     public void testModulesActivators()
             throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
-                module.withActivators( TestedActivator.class );
-            }
-
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.withActivators( TestedActivator.class )
+        );
         // Activate
         Application application = assembly.application();
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ServiceActivationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ServiceActivationTest.java
index 708c6fa..90c7de4 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ServiceActivationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/activation/ServiceActivationTest.java
@@ -19,17 +19,14 @@
  */
 package org.apache.polygene.runtime.activation;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 import org.apache.polygene.api.activation.Activator;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class ServiceActivationTest
 {
@@ -81,18 +78,18 @@
     }
 
     @Mixins( TestedServiceMixin.class )
-    public static interface TestedServiceComposite
+    public interface TestedServiceComposite
             extends TestedService, ServiceComposite
     {
     }
 
     @Mixins( TestedServiceMixin.class )
-    public static interface TestedServiceComposite2
+    public interface TestedServiceComposite2
             extends TestedService, ServiceComposite
     {
     }
 
-    public static interface TestedService
+    public interface TestedService
     {
 
         String foo();
@@ -114,21 +111,16 @@
     public void testServicesActivators()
             throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> {
                 module.addServices( TestedServiceComposite.class ).
-                        withActivators( TestedActivator.class ).
-                        instantiateOnStartup();
+                    withActivators( TestedActivator.class ).
+                          instantiateOnStartup();
                 module.addServices( TestedServiceComposite2.class ).
-                        withActivators( TestedActivator.class ).
-                        instantiateOnStartup();
+                    withActivators( TestedActivator.class ).
+                          instantiateOnStartup();
             }
-
-        };
+        );
         // Activate
         Application application = assembly.application();
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java b/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java
index 6a01c0c..51b705a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java
@@ -25,8 +25,6 @@
 import java.lang.annotation.Target;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.common.AppliesTo;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.concern.ConcernOf;
@@ -40,6 +38,8 @@
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 import static org.junit.Assert.assertTrue;
 
@@ -53,6 +53,8 @@
         module.services( SomeServiceCompositeWithTwoAnnotations.class );
         module.services( SomeServiceCompositeWithFirstAnnotation.class );
         module.services( SomeServiceCompositeWithSecondAnnotation.class );
+
+        module.defaultServices();
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java
index c3131eb..1c9a13c 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java
@@ -27,8 +27,8 @@
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -42,9 +42,10 @@
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        module.services( MemoryEntityStoreService.class );
         module.entities( TheAssociatedType.class );
         module.entities( TheMainType.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/bootstrap/docs/DocumentationSupport.java b/core/runtime/src/test/java/org/apache/polygene/runtime/bootstrap/docs/DocumentationSupport.java
index 3c80414..09e1193 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/bootstrap/docs/DocumentationSupport.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/bootstrap/docs/DocumentationSupport.java
@@ -21,10 +21,7 @@
 package org.apache.polygene.runtime.bootstrap.docs;
 
 import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.runtime.bootstrap.AssemblyHelper;
 import org.apache.polygene.runtime.composite.FragmentClassLoader;
@@ -41,21 +38,15 @@
     {
         // Create a Polygene Runtime
         polygene = new Energy4Java();
-        application = polygene.newApplication( new ApplicationAssembler()
-        {
-
-            @Override
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory appFactory )
-                throws AssemblyException
-            {
-                ApplicationAssembly assembly = appFactory.newApplicationAssembly();
-                assembly.setMetaInfo( new DalvikAssemblyHelper() );
-                // END SNIPPET: customAssemblyHelper
-                // START SNIPPET: customAssemblyHelper
-                return assembly;
-            }
+        // Create the application
+        application = polygene.newApplication( factory -> {
+            ApplicationAssembly assembly = factory.newApplicationAssembly();
+            assembly.setMetaInfo( new DalvikAssemblyHelper() );
+            // END SNIPPET: customAssemblyHelper
+            // START SNIPPET: customAssemblyHelper
+            return assembly;
         } );
-        // activate the application
+        // Activate the application
         application.activate();
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/composite/CompositeFactoryImplTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/composite/CompositeFactoryImplTest.java
index f13c0b0..fd557e2 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/composite/CompositeFactoryImplTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/composite/CompositeFactoryImplTest.java
@@ -22,11 +22,12 @@
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.util.Properties;
+import org.apache.polygene.api.common.ConstructionException;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.junit.Test;
 import org.apache.polygene.api.common.AppliesTo;
 import org.apache.polygene.api.common.AppliesToFilter;
-import org.apache.polygene.api.composite.NoSuchTransientException;
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.mixin.Mixins;
@@ -46,7 +47,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void testNewInstanceNotExtendingComposite()
         throws Exception
     {
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsTest.java
index f70ced7..ad9def8 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/composite/InterfaceDefaultMethodsTest.java
@@ -46,7 +46,10 @@
 public class InterfaceDefaultMethodsTest extends AbstractPolygeneTest
 {
     @BeforeClass
-    public static void assumeJavaVersionIs8() { assumeJavaVersion( 8 ); }
+    public static void assumeJavaVersionIs8()
+    {
+        assumeJavaVersion( 8 );
+    }
 
     public interface DefaultMethods
     {
@@ -236,6 +239,8 @@
         catch( ConstraintViolationException ex )
         {
             assertThat( ex.getMessage(), containsString( "sayHello" ) );
+            assertThat( ex.getMessage(), containsString( "DefaultMethodsConstraints" ) );
+            assertThat( ex.getMessage(), containsString( "NotEmpty" ) );
         }
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/composite/UseCompositeTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/composite/UseCompositeTest.java
new file mode 100644
index 0000000..16cb948
--- /dev/null
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/composite/UseCompositeTest.java
@@ -0,0 +1,84 @@
+/*
+ *  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.polygene.runtime.composite;
+
+import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.injection.scope.Uses;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
+
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.Assert.assertThat;
+
+public class UseCompositeTest extends AbstractPolygeneTest
+{
+
+    @Override
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        module.transients( Hello.class );
+        module.objects( Speaker.class );
+    }
+
+    @Test
+    public void givenCompositeToUsesWhenInstantiatingExpectException()
+    {
+        Hello hello = transientBuilderFactory.newTransient( Hello.class );
+        hello.name().set( "World" );
+        Speaker speaker = objectFactory.newObject( Speaker.class, hello );
+        assertThat( speaker.speak(), equalTo( "Hello, World!" ) );
+    }
+
+    @Mixins( HelloMixin.class )
+    public interface Hello
+    {
+        String sayHello();
+
+        @Optional
+        Property<String> name();
+    }
+
+    public static abstract class HelloMixin
+        implements Hello
+    {
+
+        @Override
+        public String sayHello()
+        {
+            return "Hello, " + name().get();
+        }
+    }
+
+    public static class Speaker
+    {
+        @Uses
+        Hello hello;
+
+        String speak()
+        {
+            return hello.sayHello() + "!";
+        }
+    }
+}
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java
index 2de631a..5238a49 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java
@@ -24,13 +24,13 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 /**
  * Tests for GenericConcern
@@ -43,6 +43,8 @@
         throws AssemblyException
     {
         module.transients( SomeComposite.class );
+
+        module.defaultServices();
     }
 
     @Test
@@ -63,7 +65,7 @@
     public interface Some
     {
         @NestedUnitOfWork
-        public String doStuff();
+        String doStuff();
     }
 
     public static abstract class SomeMixin
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/constraints/ConstraintsTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/constraints/ConstraintsTest.java
index f560439..f7d40d5 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/constraints/ConstraintsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/constraints/ConstraintsTest.java
@@ -29,7 +29,7 @@
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.constraint.Constraint;
 import org.apache.polygene.api.constraint.ConstraintDeclaration;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.constraint.Constraints;
 import org.apache.polygene.api.constraint.Name;
@@ -66,7 +66,7 @@
         }
         catch( ConstraintViolationException e )
         {
-            Collection<ConstraintViolation> violations = e.constraintViolations();
+            Collection<ValueConstraintViolation> violations = e.constraintViolations();
             assertEquals( 2, violations.size() );
 //            assertEquals( MyOne.class.getName(), e.mixinTypeName() );
         }
@@ -87,7 +87,7 @@
         }
         catch( ConstraintViolationException e )
         {
-            Collection<ConstraintViolation> violations = e.constraintViolations();
+            Collection<ValueConstraintViolation> violations = e.constraintViolations();
             assertEquals( 2, violations.size() );
 //            assertEquals( MyOne.class.getName(), e.mixinTypeName() );
         }
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java
index 2bc7b34..fe3e46a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java
@@ -47,6 +47,8 @@
     {
         module.transients( TestComposite.class );
         module.forMixin( TestComposite.class ).declareDefaults().assemblyString().set( "habba" );
+
+        module.defaultServices();
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java
index 35539a2..8cb1aff 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java
@@ -34,7 +34,6 @@
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
@@ -54,7 +53,6 @@
     {
         new EntityTestAssembler().assemble( module );
         module.entities( SomeEntity.class );
-        new DefaultUnitOfWorkAssembler().assemble( module );
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java
index c5ef312..d814e50 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java
@@ -20,15 +20,15 @@
 
 package org.apache.polygene.runtime.entity;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 public class EntityTypeTest
     extends AbstractPolygeneTest
@@ -40,9 +40,9 @@
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
-            EntityBuilder<Rst> builder3 = uow.newEntityBuilder( Rst.class, new StringIdentity( "123" ) );
-            EntityBuilder<Def> builder2 = uow.newEntityBuilder( Def.class, new StringIdentity( "456" ) );
-            EntityBuilder<Abc> builder1 = uow.newEntityBuilder( Abc.class, new StringIdentity( "789" ) );
+            EntityBuilder<Rst> builder3 = uow.newEntityBuilder( Rst.class, StringIdentity.identityOf( "123" ) );
+            EntityBuilder<Def> builder2 = uow.newEntityBuilder( Def.class, StringIdentity.identityOf( "456" ) );
+            EntityBuilder<Abc> builder1 = uow.newEntityBuilder( Abc.class, StringIdentity.identityOf( "789" ) );
         }
         finally
         {
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java
index 642bb14..d1d510b 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java
@@ -20,16 +20,11 @@
 
 package org.apache.polygene.runtime.entity;
 
-import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.service.ServiceComposite;
@@ -37,6 +32,7 @@
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.NoSuchEntityTypeException;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
 import org.apache.polygene.bootstrap.Assembler;
@@ -44,11 +40,14 @@
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 public class EntityVisibilityTest
 {
 
-    public static final Identity TEST_IDENTITY = new StringIdentity( "123" );
+    public static final Identity TEST_IDENTITY = StringIdentity.identityOf( "123" );
 
     private Energy4Java polygene;
     private Module module;
@@ -667,7 +666,6 @@
             module.entities( ModuleApplicationVisible.class ).visibleIn( Visibility.application );
             module.entities( ModuleLayerVisible.class ).visibleIn( Visibility.layer );
             module.entities( ModuleModuleVisible.class ).visibleIn( Visibility.module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -685,7 +683,6 @@
             module.entities( BelowModuleVisible.class ).visibleIn( Visibility.module );
 
             new EntityTestAssembler().visibleIn( Visibility.application ).assemble( module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -701,7 +698,6 @@
             module.entities( AboveApplicationVisible.class ).visibleIn( Visibility.application );
             module.entities( AboveLayerVisible.class ).visibleIn( Visibility.layer );
             module.entities( AboveModuleVisible.class ).visibleIn( Visibility.module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -716,7 +712,6 @@
             module.entities( BesideApplicationVisible.class ).visibleIn( Visibility.application );
             module.entities( BesideLayerVisible.class ).visibleIn( Visibility.layer );
             module.entities( BesideModuleVisible.class ).visibleIn( Visibility.module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java
index f049c40..1e953ae 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java
@@ -36,6 +36,10 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.EntityTestAssembler;
 
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.nullValue;
+import static org.junit.Assert.assertThat;
+
 /**
  * Tests for associations
  */
@@ -98,6 +102,12 @@
 
             Assert.assertEquals( niclas.friend().get(), rickard );
             Assert.assertEquals( niclas.members().get( 0 ), rickard );
+
+            // Empty associations
+            niclas.friend().set( null );
+            niclas.members().clear();
+            assertThat( niclas.friend().get(), nullValue() );
+            assertThat( niclas.employers().count(), is( 0 ) );
         }
         finally
         {
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java
index 413b8c5..41791f7 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java
@@ -19,8 +19,6 @@
  */
 package org.apache.polygene.runtime.injection;
 
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.common.UseDefaults;
 import org.apache.polygene.api.concern.ConcernOf;
@@ -29,9 +27,8 @@
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.sideeffect.SideEffectOf;
 import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Test;
 
 import static org.junit.Assert.assertFalse;
 
@@ -43,19 +40,11 @@
 
     @Test
     public void givenMixinWithThisInConstructorWhenCreatingModelExpectNoException()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.values( Does.class ).withMixins( DoesMixin.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.values( Does.class ).withMixins( DoesMixin.class )
+        );
         Module module = singletonAssembler.application().findModule( "Layer 1", "Module 1" );
         Does does = module.newValue( Does.class );
         does.doSomething();
@@ -63,18 +52,11 @@
 
     @Test
     public void givenConcernWithThisInConstructorWhenCreatingModelExpectNoException()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.values( Does.class ).withMixins( NoopMixin.class ).withConcerns( DoesConcern.class );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.values( Does.class ).withMixins( NoopMixin.class ).withConcerns( DoesConcern.class )
+        );
         Module module = singletonAssembler.application().findModule( "Layer 1", "Module 1" );
         Does does = module.newValue( Does.class );
         does.doSomething();
@@ -82,18 +64,11 @@
 
     @Test
     public void givenSideEffectWithThisInConstructorWhenCreatingModelExpectNoException()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler singletonAssembler = new SingletonAssembler()
-        {
-
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.values( Does.class ).withMixins( NoopMixin.class ).withSideEffects( DoesSideEffect.class );
-            }
-        };
+        SingletonAssembler singletonAssembler = new SingletonAssembler(
+            module -> module.values( Does.class ).withMixins( NoopMixin.class ).withSideEffects( DoesSideEffect.class )
+        );
         Module module = singletonAssembler.application().findModule( "Layer 1", "Module 1" );
         Does does = module.newValue( Does.class );
         does.doSomething();
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java
index 045f722..91bacbc 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java
@@ -23,17 +23,15 @@
 import java.lang.annotation.Retention;
 import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Method;
-import org.hamcrest.CoreMatchers;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.concern.ConcernOf;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.injection.scope.Invocation;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Test;
 
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
@@ -46,14 +44,7 @@
     public void whenInvocationInjectionWithMethodWhenInjectedThenInjectMethod()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( MyComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler( module -> module.transients( MyComposite.class ) );
 
         MyComposite composite = assembly.module().newTransient( MyComposite.class );
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java
index e0d8f6b..c9cdd4e 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java
@@ -39,7 +39,6 @@
 import org.apache.polygene.api.service.qualifier.IdentifiedBy;
 import org.apache.polygene.api.service.qualifier.Qualifier;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
@@ -61,21 +60,18 @@
     public void testInjectService()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> {
                 module.services( MyServiceComposite.class )
-                    .identifiedBy( "Foo" )
-                    .setMetaInfo( new ServiceName( "Foo" ) );
+                      .identifiedBy( "Foo" )
+                      .setMetaInfo( new ServiceName( "Foo" ) );
                 module.services( MyServiceComposite2.class )
-                    .identifiedBy( "Bar" )
-                    .setMetaInfo( new ServiceName( "Bar" ) );
+                      .identifiedBy( "Bar" )
+                      .setMetaInfo( new ServiceName( "Bar" ) );
                 module.services( StringService.class, LongService.class );
                 module.objects( ServiceUser.class );
             }
-        };
+        );
 
         testInjection( assembly );
     }
@@ -86,7 +82,7 @@
         ServiceUser user = factory.newObject( ServiceUser.class );
 
         assertEquals( "X", user.testSingle() );
-        assertThat( user.testIdentity(), equalTo( new StringIdentity( "Foo" ) ) );
+        assertThat( user.testIdentity(), equalTo( StringIdentity.identityOf( "Foo" ) ) );
         assertEquals( "FooX", user.testServiceReference() );
         assertEquals( "Bar", user.testQualifier() );
         assertEquals( "A", user.testStringIterable() );
@@ -97,16 +93,13 @@
 
     @Test
     public void testInjectionServiceBetweenModules()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> {
                 module.services( MyServiceComposite.class )
-                    .identifiedBy( "Foo" )
-                    .setMetaInfo( new ServiceName( "Foo" ) );
+                      .identifiedBy( "Foo" )
+                      .setMetaInfo( new ServiceName( "Foo" ) );
                 module.services( StringService.class, LongService.class );
                 module.objects( ServiceUser.class );
 
@@ -117,23 +110,20 @@
                 ServiceDeclaration service3Decl = module2.services( MyServiceComposite2.class );
                 service3Decl.identifiedBy( "Boo" ).setMetaInfo( new ServiceName( "Boo" ) );
             }
-        };
+        );
 
         testInjection( assembly );
     }
 
     @Test
     public void testInjectionServiceBetweenLayers()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> {
                 module.services( MyServiceComposite.class )
-                    .identifiedBy( "Foo" )
-                    .setMetaInfo( new ServiceName( "Foo" ) );
+                      .identifiedBy( "Foo" )
+                      .setMetaInfo( new ServiceName( "Foo" ) );
                 module.services( StringService.class, LongService.class );
                 LayerAssembly layerAssembly = module.layer();
                 module.objects( ServiceUser.class );
@@ -147,24 +137,18 @@
                 ServiceDeclaration service2Decl = module2.services( MyServiceComposite2.class );
                 service2Decl.identifiedBy( "Bar" ).setMetaInfo( new ServiceName( "Bar" ) ).visibleIn( application );
             }
-        };
+        );
 
         testInjection( assembly );
     }
 
     @Test( expected = ConstructionException.class )
     public void testMissingServiceDependency()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
         // No service fulfils the dependency injection -> fail to create application
-        new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.objects( ServiceUser.class );
-            }
-        }.module().newObject( ServiceUser.class );
+        new SingletonAssembler( module -> module.objects( ServiceUser.class ) )
+            .module().newObject( ServiceUser.class );
     }
 
     @Mixins( MyServiceMixin.class )
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java
index 8a38d17..4dd7111 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java
@@ -20,9 +20,8 @@
 
 package org.apache.polygene.runtime.injection;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.State;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
@@ -32,6 +31,7 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
@@ -53,7 +53,7 @@
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase );
         try
         {
-            Trial trial = uow.newEntity( Trial.class, new StringIdentity( "123" ) );
+            Trial trial = uow.newEntity( Trial.class, StringIdentity.identityOf( "123" ) );
             trial.doSomething();
             uow.complete();
             uow = unitOfWorkFactory.newUnitOfWork( usecase );
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java
new file mode 100644
index 0000000..69824d7
--- /dev/null
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java
@@ -0,0 +1,119 @@
+/*
+ *  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.polygene.runtime.instantiation;
+
+import org.apache.polygene.api.configuration.Configuration;
+import org.apache.polygene.api.entity.Lifecycle;
+import org.apache.polygene.api.injection.scope.This;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
+
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.hamcrest.core.IsNull.notNullValue;
+import static org.junit.Assert.assertThat;
+
+public class ConfigurationInstantiationTest extends AbstractPolygeneTest
+{
+
+    @Override
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        module.defaultServices();
+        module.services( MemoryEntityStoreService.class );
+        module.services( MyService.class ).instantiateOnStartup();
+        module.configurations( MyConfig.class );
+        System.setProperty( "path", "fakepath" );
+    }
+
+    @Test
+    public void givenSpecialInitializableWhenStartingExpectOsNameToBeSet()
+    {
+        MyService myService = serviceFinder.findService( MyService.class ).get();
+        assertThat( myService.osName(), equalTo( System.getProperty( "os.name" ) ) );
+        if( myService.osName().equalsIgnoreCase( "Linux" ) )
+        {
+            assertThat( myService.home(), notNullValue() );
+        }
+        assertThat( myService.path(), equalTo( System.getProperty( "path" ) ) );
+    }
+
+    @Mixins( MyMixin.class )
+    public interface MyService
+    {
+        String osName();
+
+        String home();
+
+        String path();
+    }
+
+    public class MyMixin
+        implements MyService, Lifecycle
+    {
+        @This
+        private Configuration<MyConfig> config;
+
+        @Override
+        public String osName()
+        {
+            return config.get().osName().get();
+        }
+
+        @Override
+        public String home()
+        {
+            return config.get().home().get();
+        }
+
+        @Override
+        public String path()
+        {
+            return config.get().path().get();
+        }
+
+        @Override
+        public void create()
+            throws Exception
+        {
+            config.get().osName().set( System.getProperty( "os.name" ) );
+        }
+
+        @Override
+        public void remove()
+            throws Exception
+        {
+        }
+    }
+
+    public interface MyConfig
+    {
+        Property<String> osName();
+
+        Property<String> home();
+
+        Property<String> path();
+    }
+}
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java
index e0ed2ba..9e67af3 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java
@@ -20,16 +20,16 @@
 
 package org.apache.polygene.runtime.mixin;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -62,11 +62,11 @@
         throws UnitOfWorkCompletionException
     {
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
-        FooEntity entity = uow.newEntity( FooEntity.class, new StringIdentity( "123" ) );
+        FooEntity entity = uow.newEntity( FooEntity.class, StringIdentity.identityOf( "123" ) );
         uow.complete();
 
         uow = unitOfWorkFactory.newUnitOfWork();
-        Foo foo = uow.get( Foo.class, new StringIdentity( "123" ) );
+        Foo foo = uow.get( Foo.class, StringIdentity.identityOf( "123" ) );
 
         try
         {
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java
index 0f1f3b9..ca15bc4 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java
@@ -20,10 +20,9 @@
 
 package org.apache.polygene.runtime.mixin;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
@@ -31,6 +30,7 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -71,11 +71,11 @@
         throws UnitOfWorkCompletionException
     {
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
-        uow.newEntity( FooEntity.class, new StringIdentity( "123" ) );
+        uow.newEntity( FooEntity.class, StringIdentity.identityOf( "123" ) );
         uow.complete();
 
         uow = unitOfWorkFactory.newUnitOfWork();
-        Foo foo = uow.get( Foo.class, new StringIdentity( "123" ) );
+        Foo foo = uow.get( Foo.class, StringIdentity.identityOf( "123" ) );
 
         try
         {
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java
index fc4937a..47e1203 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java
@@ -98,8 +98,8 @@
         }
     }
 
-    private static final Identity EXTENDS_IDENTITY = new StringIdentity( ExtendsJDKMixin.class.getName() );
-    private static final Identity COMPOSE_IDENTITY = new StringIdentity( ComposeWithJDKMixin.class.getName() );
+    private static final Identity EXTENDS_IDENTITY = StringIdentity.identityOf( ExtendsJDKMixin.class.getName() );
+    private static final Identity COMPOSE_IDENTITY = StringIdentity.identityOf( ComposeWithJDKMixin.class.getName() );
     private static final Predicate<ServiceReference<?>> EXTENDS_IDENTITY_SPEC = new ServiceIdentitySpec(
         EXTENDS_IDENTITY );
     private static final Predicate<ServiceReference<?>> COMPOSE_IDENTITY_SPEC = new ServiceIdentitySpec(
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectBuilderFactoryTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectBuilderFactoryTest.java
index f978aa0..9a6c49f 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectBuilderFactoryTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectBuilderFactoryTest.java
@@ -20,16 +20,14 @@
 
 package org.apache.polygene.runtime.objects;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.Uses;
-import org.apache.polygene.api.object.NoSuchObjectException;
+import org.apache.polygene.api.object.NoSuchObjectTypeException;
 import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Assert;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.notNullValue;
@@ -45,17 +43,11 @@
      *
      * @throws Exception expected
      */
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void newBuilderForUnregisteredObject()
         throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler( module -> {} );
         assembler.module().newObject( AnyObject.class );
     }
 
@@ -68,13 +60,7 @@
     public void newBuilderForNullType()
         throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler( module -> {} );
         assembler.module().newObject( null );
     }
 
@@ -87,13 +73,7 @@
     public void newObjectInstanceForNullType()
         throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler( module -> {} );
         assembler.module().newObject( null );
     }
 
@@ -102,31 +82,17 @@
      */
     @Test
     public void newInstanceForRegisteredObject()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.objects( AnyObject.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler( module -> module.objects( AnyObject.class ) );
         assembler.module().newObject( AnyObject.class );
     }
 
     @Test
     public void givenManyConstructorsWhenInstantiateThenChooseCorrectConstructor()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.objects( ManyConstructorObject.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler( module -> module.objects( ManyConstructorObject.class ) );
 
         ManyConstructorObject object = assembler.module().newObject( ManyConstructorObject.class );
         Assert.assertThat( "ref is not null", object.anyObject, notNullValue() );
@@ -139,17 +105,9 @@
 
     @Test
     public void givenClassWithInnerClassesWhenInstantiateThenInstantiateInnerClass()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.objects( OuterClass.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler( module -> module.objects( OuterClass.class ) );
 
         Assert.assertThat( "inner class has been injected", assembler.module()
             .newObject( OuterClass.class )
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectConcernTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectConcernTest.java
index 2af7434..28922ba 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectConcernTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectConcernTest.java
@@ -21,13 +21,12 @@
 package org.apache.polygene.runtime.objects;
 
 import java.lang.reflect.Method;
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.concern.GenericConcern;
 import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Test;
 
 /**
  * JAVADOC
@@ -39,14 +38,9 @@
     public void testConcernOnObject()
         throws ActivationException, AssemblyException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.objects( TestObject.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> module.objects( TestObject.class )
+        );
 
         TestObject object = assembler.module().newObject( TestObject.class );
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectVisibilityTest.java
index 45691e8..ed0171a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/objects/ObjectVisibilityTest.java
@@ -20,23 +20,19 @@
 
 package org.apache.polygene.runtime.objects;
 
-import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.object.NoSuchObjectException;
+import org.apache.polygene.api.object.NoSuchObjectTypeException;
 import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
 import org.apache.polygene.bootstrap.Assembler;
@@ -44,11 +40,14 @@
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 public class ObjectVisibilityTest
 {
 
-    public static final Identity TEST_IDENTITY = new StringIdentity( "123" );
+    public static final Identity TEST_IDENTITY = StringIdentity.identityOf( "123" );
 
     private Energy4Java polygene;
     private Module module;
@@ -132,7 +131,7 @@
         service.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromServiceWhenAccessingBesideModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -146,35 +145,35 @@
         service.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromServiceWhenAccessingBelowLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromServiceWhenAccessingBelowModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromServiceWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromServiceWhenAccessingAboveLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromServiceWhenAccessingAboveModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -271,7 +270,7 @@
         }
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromEntityWhenAccessingBesideModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -307,7 +306,7 @@
         }
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromEntityWhenAccessingBelowLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -325,7 +324,7 @@
         }
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromEntityWhenAccessingBelowModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -343,7 +342,7 @@
         }
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromEntityWhenAccessingAboveApplicationVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -361,7 +360,7 @@
         }
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromEntityWhenAccessingAboveLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -379,7 +378,7 @@
         }
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromEntityWhenAccessingAboveModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -432,7 +431,7 @@
         value.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromValueWhenAccessingBesideModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -446,35 +445,35 @@
         value.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromValueWhenAccessingBelowLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromValueWhenAccessingBelowModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromValueWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromValueWhenAccessingAboveLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromValueWhenAccessingAboveModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -516,7 +515,7 @@
         transientt.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromTransientWhenAccessingBesideModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -530,35 +529,35 @@
         transientt.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromTransientWhenAccessingBelowLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromTransientWhenAccessingBelowModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromTransientWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromTransientWhenAccessingAboveLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromTransientWhenAccessingAboveModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -600,7 +599,7 @@
         object.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromObjectWhenAccessingBesideModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -614,35 +613,35 @@
         object.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromObjectWhenAccessingBelowLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromObjectWhenAccessingBelowModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromObjectWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromObjectWhenAccessingAboveLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchObjectException.class )
+    @Test( expected = NoSuchObjectTypeException.class )
     public void givenFromObjectWhenAccessingAboveModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -667,8 +666,6 @@
             module.objects( ModuleApplicationVisible.class ).visibleIn( Visibility.application );
             module.objects( ModuleLayerVisible.class ).visibleIn( Visibility.layer );
             module.objects( ModuleModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -686,7 +683,6 @@
             module.objects( BelowModuleVisible.class ).visibleIn( Visibility.module );
 
             new EntityTestAssembler().visibleIn( Visibility.application ).assemble( module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -702,8 +698,6 @@
             module.objects( AboveApplicationVisible.class ).visibleIn( Visibility.application );
             module.objects( AboveLayerVisible.class ).visibleIn( Visibility.layer );
             module.objects( AboveModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -718,8 +712,6 @@
             module.objects( BesideApplicationVisible.class ).visibleIn( Visibility.application );
             module.objects( BesideLayerVisible.class ).visibleIn( Visibility.layer );
             module.objects( BesideModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java
index 026cb13..0f14212 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java
@@ -74,6 +74,8 @@
         throws AssemblyException
     {
         module.values( InnerValue.class, InnerDefaultedValue.class, OuterValue.class, OuterDefaultedValue.class );
+
+        module.defaultServices();
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/query/IterableQuerySourceTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/query/IterableQuerySourceTest.java
index 2df68f1..810eab2 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/query/IterableQuerySourceTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/query/IterableQuerySourceTest.java
@@ -22,12 +22,8 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.query.Query;
 import org.apache.polygene.api.query.QueryBuilder;
 import org.apache.polygene.api.query.QueryBuilderFactory;
@@ -52,9 +48,10 @@
 import org.apache.polygene.runtime.query.model.values.ContactValue;
 import org.apache.polygene.runtime.query.model.values.ContactsValue;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 import static org.apache.polygene.api.query.QueryExpressions.eq;
 import static org.apache.polygene.api.query.QueryExpressions.ge;
 import static org.apache.polygene.api.query.QueryExpressions.gt;
@@ -67,6 +64,8 @@
 import static org.apache.polygene.api.query.QueryExpressions.orderBy;
 import static org.apache.polygene.api.query.QueryExpressions.property;
 import static org.apache.polygene.api.query.QueryExpressions.templateFor;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 public class IterableQuerySourceTest
 {
@@ -88,7 +87,6 @@
 
                 module.values( ContactsValue.class, ContactValue.class );
                 new EntityTestAssembler().assemble( module );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
         };
         uow = assembler.module().unitOfWorkFactory().newUnitOfWork();
@@ -216,7 +214,7 @@
     {
         QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class );
         Person person = templateFor( Person.class );
-        City kl = uow.get( City.class, new StringIdentity( "kualalumpur" ));
+        City kl = uow.get( City.class, StringIdentity.identityOf( "kualalumpur" ) );
         Query<Person> query = qb.where(
             eq( person.mother().get().placeOfBirth(), kl )
         ).newQuery( Network.persons() );
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/query/Network.java b/core/runtime/src/test/java/org/apache/polygene/runtime/query/Network.java
index 8930654..dfd3253 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/query/Network.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/query/Network.java
@@ -44,8 +44,8 @@
  */
 class Network
 {
-    public static final Identity KUALALUMPUR = new StringIdentity( "kualalumpur" );
-    public static final Identity PENANG = new StringIdentity( "penang" );
+    public static final Identity KUALALUMPUR = StringIdentity.identityOf( "kualalumpur" );
+    public static final Identity PENANG = StringIdentity.identityOf( "penang" );
     private static List<Domain> domains;
     private static List<Person> persons;
     private static List<Male> males;
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java
index 8cae196..5b5251e 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java
@@ -19,8 +19,6 @@
  */
 package org.apache.polygene.runtime.query;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.entity.Queryable;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.query.QueryBuilder;
@@ -29,6 +27,8 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Assert;
+import org.junit.Test;
 
 import static org.apache.polygene.api.query.QueryExpressions.eq;
 import static org.apache.polygene.api.query.QueryExpressions.templateFor;
@@ -39,6 +39,7 @@
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
+        module.defaultServices();
     }
 
     @Test
@@ -81,7 +82,7 @@
         }
     }
 
-    static interface Abc
+    interface Abc
     {
         @Queryable( false )
         Property<Boolean> isValid();
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/service/AvailableServiceTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/service/AvailableServiceTest.java
index 8efa667..c5e4f3b 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/service/AvailableServiceTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/service/AvailableServiceTest.java
@@ -20,8 +20,6 @@
 
 package org.apache.polygene.runtime.service;
 
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.configuration.Configuration;
@@ -38,8 +36,11 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
-import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
 import static org.junit.Assert.assertThat;
 
 /**
@@ -57,7 +58,6 @@
                 throws AssemblyException
             {
                 module.services( TestServiceComposite1.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
         };
 
@@ -80,7 +80,6 @@
                 module.entities( TestServiceConfiguration.class );
 
                 new EntityTestAssembler().assemble( module );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
         };
 
@@ -109,7 +108,6 @@
                 module.entities( TestServiceConfiguration.class );
 
                 new EntityTestAssembler().assemble( module );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
         };
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/service/ConfigurationConstraintTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/service/ConfigurationConstraintTest.java
new file mode 100644
index 0000000..9c4d7ce
--- /dev/null
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/service/ConfigurationConstraintTest.java
@@ -0,0 +1,124 @@
+/*
+ *  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.polygene.runtime.service;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import org.apache.polygene.api.configuration.Configuration;
+import org.apache.polygene.api.configuration.ConfigurationComposite;
+import org.apache.polygene.api.constraint.Constraint;
+import org.apache.polygene.api.constraint.ConstraintDeclaration;
+import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.constraint.Constraints;
+import org.apache.polygene.api.injection.scope.This;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.api.service.ServiceReference;
+import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+/**
+ * Test of configuration for services that Constraints are respected.
+ */
+public class ConfigurationConstraintTest
+{
+    @Test
+    public void givenConstrainedConfigurationWhenCorrectValueExpectNoFailure()
+        throws Exception
+    {
+        SingletonAssembler underTest = new SingletonAssembler(
+            module ->
+            {
+                module.defaultServices();
+                module.services( MemoryEntityStoreService.class );
+                module.services( TestService.class ).identifiedBy( "TestService1" );
+                module.configurations( TestConfiguration.class );
+            }
+        );
+        ServiceReference<TestService> service = underTest.module().findService( TestService.class );
+        service.get().test();
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void givenConstrainedConfigurationWhenIncorrectValueExpectConstraintViolationFailure()
+        throws Exception
+    {
+        SingletonAssembler underTest = new SingletonAssembler(
+            module ->
+            {
+                module.defaultServices();
+                module.services( MemoryEntityStoreService.class );
+                module.services( TestService.class ).identifiedBy( "TestService2" );
+                module.configurations( TestConfiguration.class );
+            }
+        );
+        ServiceReference<TestService> service = underTest.module().findService( TestService.class );
+        service.get().test();
+        fail( "Expected failure from constraint violation." );
+    }
+
+    @Mixins( TestMixin.class )
+    public interface TestService
+    {
+        void test();
+    }
+
+    public interface TestConfiguration
+        extends ConfigurationComposite
+    {
+        @Constrained
+        Property<String> constrained();
+    }
+
+    public static class TestMixin
+        implements TestService
+    {
+        @This
+        Configuration<TestConfiguration> config;
+
+        @Override
+        public void test()
+        {
+            assertThat( config.get().constrained().get(), equalTo( "constrained" ) );
+        }
+    }
+
+    @ConstraintDeclaration
+    @Retention( RetentionPolicy.RUNTIME )
+    @Constraints( ConstrainedConstraint.class )
+    public @interface Constrained
+    {
+    }
+
+    public static class ConstrainedConstraint
+        implements Constraint<Constrained, String>
+    {
+        @Override
+        public boolean isValid( Constrained annotation, String value )
+        {
+            return value.equals( "constrained" );
+        }
+    }
+}
\ No newline at end of file
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/service/ServiceVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/service/ServiceVisibilityTest.java
index d59b6ed..9d51f48 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/service/ServiceVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/service/ServiceVisibilityTest.java
@@ -20,23 +20,19 @@
 
 package org.apache.polygene.runtime.service;
 
-import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.NoSuchServiceException;
+import org.apache.polygene.api.service.NoSuchServiceTypeException;
 import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
 import org.apache.polygene.bootstrap.Assembler;
@@ -44,10 +40,13 @@
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 public class ServiceVisibilityTest
 {
-    public static final Identity TEST_IDENTITY = new StringIdentity( "123" );
+    public static final Identity TEST_IDENTITY = StringIdentity.identityOf( "123" );
 
     private Energy4Java polygene;
     private Module module;
@@ -131,7 +130,7 @@
         service.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromServiceWhenAccessingBesideModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -145,35 +144,35 @@
         service.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromServiceWhenAccessingBelowLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromServiceWhenAccessingBelowModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromServiceWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromServiceWhenAccessingAboveLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromServiceWhenAccessingAboveModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -270,7 +269,7 @@
         }
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromEntityWhenAccessingBesideModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -306,7 +305,7 @@
         }
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromEntityWhenAccessingBelowLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -324,7 +323,7 @@
         }
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromEntityWhenAccessingBelowModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -342,7 +341,7 @@
         }
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromEntityWhenAccessingAboveApplicationVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -360,7 +359,7 @@
         }
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromEntityWhenAccessingAboveLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -378,7 +377,7 @@
         }
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromEntityWhenAccessingAboveModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -431,7 +430,7 @@
         value.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromValueWhenAccessingBesideModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -445,35 +444,35 @@
         value.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromValueWhenAccessingBelowLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromValueWhenAccessingBelowModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromValueWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromValueWhenAccessingAboveLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromValueWhenAccessingAboveModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -515,7 +514,7 @@
         transientt.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromTransientWhenAccessingBesideModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -529,35 +528,35 @@
         transientt.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromTransientWhenAccessingBelowLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromTransientWhenAccessingBelowModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromTransientWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromTransientWhenAccessingAboveLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromTransientWhenAccessingAboveModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -599,7 +598,7 @@
         object.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromObjectWhenAccessingBesideModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -613,35 +612,35 @@
         object.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromObjectWhenAccessingBelowLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromObjectWhenAccessingBelowModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromObjectWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromObjectWhenAccessingAboveLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchServiceException.class )
+    @Test( expected = NoSuchServiceTypeException.class )
     public void givenFromObjectWhenAccessingAboveModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -666,8 +665,6 @@
             module.services( ModuleApplicationVisible.class ).visibleIn( Visibility.application );
             module.services( ModuleLayerVisible.class ).visibleIn( Visibility.layer );
             module.services( ModuleModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -685,7 +682,6 @@
             module.services( BelowModuleVisible.class ).visibleIn( Visibility.module );
 
             new EntityTestAssembler().visibleIn( Visibility.application ).assemble( module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -701,7 +697,6 @@
             module.services( AboveApplicationVisible.class ).visibleIn( Visibility.application );
             module.services( AboveLayerVisible.class ).visibleIn( Visibility.layer );
             module.services( AboveModuleVisible.class ).visibleIn( Visibility.module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -716,7 +711,6 @@
             module.services( BesideApplicationVisible.class ).visibleIn( Visibility.application );
             module.services( BesideLayerVisible.class ).visibleIn( Visibility.layer );
             module.services( BesideModuleVisible.class ).visibleIn( Visibility.module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/MixinVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/MixinVisibilityTest.java
index eaf9794..1174e2b 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/MixinVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/MixinVisibilityTest.java
@@ -20,23 +20,21 @@
 
 package org.apache.polygene.runtime.structure;
 
-import org.junit.Test;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.AmbiguousTypeException;
-import org.apache.polygene.api.composite.NoSuchTransientException;
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
-import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
@@ -49,26 +47,21 @@
     public void testMixinInModuleIsVisible()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer
                   {  // Module 1
-                     new Assembler()
-                     {
-                         public void assemble( ModuleAssembly module )
-                             throws AssemblyException
-                         {
-                             module.setName( "Module A" );
-                             module.transients( B1Composite.class );
-                             module.objects( ObjectA.class );
-                         }
+                     module -> {
+                         module.setName( "Module A" );
+                         module.transients( B1Composite.class );
+                         module.objects( ObjectA.class );
                      }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -81,26 +74,21 @@
     public void testMultipleMixinsInModuleWillFail()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer
                   {  // Module 1
-                     new Assembler()
-                     {
-                         public void assemble( ModuleAssembly module )
-                             throws AssemblyException
-                         {
-                             module.setName( "Module A" );
-                             module.transients( B1Composite.class, B2Composite.class );
-                             module.objects( ObjectA.class );
-                         }
+                     module -> {
+                         module.setName( "Module A" );
+                         module.transients( B1Composite.class, B2Composite.class );
+                         module.objects( ObjectA.class );
                      }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -109,40 +97,30 @@
         assertEquals( "abc", object.test2() );
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void testMixinInLayerIsNotVisible()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module A" );
-                              module.objects( ObjectA.class );
-                          }
+                      module -> {
+                          module.setName( "Module A" );
+                          module.objects( ObjectA.class );
                       }
                   },
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module B" );
-                              module.transients( B1Composite.class );
-                          }
+                      module -> {
+                          module.setName( "Module B" );
+                          module.transients( B1Composite.class );
                       }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -155,36 +133,26 @@
     public void testMixinInLayerIsVisible()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module A" );
-                              module.objects( ObjectA.class );
-                          }
+                      module -> {
+                          module.setName( "Module A" );
+                          module.objects( ObjectA.class );
                       }
                   },
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module B" );
-                              module.transients( B1Composite.class ).visibleIn( Visibility.layer );
-                          }
+                      module -> {
+                          module.setName( "Module B" );
+                          module.transients( B1Composite.class ).visibleIn( Visibility.layer );
                       }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -197,37 +165,27 @@
     public void testMultipleMixinsInLayerWillFailSameModule()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module A" );
-                              module.objects( ObjectA.class );
-                          }
+                      module -> {
+                          module.setName( "Module A" );
+                          module.objects( ObjectA.class );
                       }
                   },
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module B" );
-                              module.transients( B1Composite.class, B2Composite.class )
-                                  .visibleIn( Visibility.layer );
-                          }
+                      module -> {
+                          module.setName( "Module B" );
+                          module.transients( B1Composite.class, B2Composite.class )
+                                .visibleIn( Visibility.layer );
                       }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -240,47 +198,32 @@
     public void testMultipleMixinsInLayerWillFailDiffModule()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer
                   { // Module 1
-                    new Assembler()
-                    {
-                        public void assemble( ModuleAssembly module )
-                            throws AssemblyException
-                        {
-                            module.setName( "Module A" );
-                            module.objects( ObjectA.class );
-                        }
+                    module -> {
+                        module.setName( "Module A" );
+                        module.objects( ObjectA.class );
                     }
                   },
                   { // Module 2
-                    new Assembler()
-                    {
-                        public void assemble( ModuleAssembly module )
-                            throws AssemblyException
-                        {
-                            module.setName( "Module B" );
-                            module.transients( B1Composite.class ).visibleIn( Visibility.layer );
-                        }
+                    module -> {
+                        module.setName( "Module B" );
+                        module.transients( B1Composite.class ).visibleIn( Visibility.layer );
                     }
                   },
                   { // Module 3
-                    new Assembler()
-                    {
-                        public void assemble( ModuleAssembly module )
-                            throws AssemblyException
-                        {
-                            module.setName( "Module C" );
-                            module.transients( B2Composite.class ).visibleIn( Visibility.layer );
-                        }
+                    module -> {
+                        module.setName( "Module C" );
+                        module.transients( B2Composite.class ).visibleIn( Visibility.layer );
                     }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -295,38 +238,28 @@
         throws Exception
     {
 
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer 1
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module A" );
-                              module.objects( ObjectA.class );
-                          }
+                      module -> {
+                          module.setName( "Module A" );
+                          module.objects( ObjectA.class );
                       }
                   }
                 },
                 { // Layer 2
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module B" );
-                              module.transients( B1Composite.class ).visibleIn( Visibility.layer );
-                          }
+                      module -> {
+                          module.setName( "Module B" );
+                          module.transients( B1Composite.class ).visibleIn( Visibility.layer );
                       }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -339,38 +272,28 @@
     public void testMixinInLowerLayerIsVisible()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer 1
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module A" );
-                              module.objects( ObjectA.class );
-                          }
+                      module -> {
+                          module.setName( "Module A" );
+                          module.objects( ObjectA.class );
                       }
                   }
                 },
                 { // Layer 2
                   {
-                      new Assembler()
-                      {
-                          public void assemble( ModuleAssembly module )
-                              throws AssemblyException
-                          {
-                              module.setName( "Module B" );
-                              module.transients( B1Composite.class ).visibleIn( Visibility.application );
-                          }
+                      module -> {
+                          module.setName( "Module B" );
+                          module.transients( B1Composite.class ).visibleIn( Visibility.application );
                       }
                   }
                 }
             };
 
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
@@ -382,8 +305,8 @@
     class AssemblerB
         implements Assembler
     {
+        @Override
         public void assemble( ModuleAssembly module )
-            throws AssemblyException
         {
             module.setName( "Module B" );
             module.transients( B1Composite.class ).visibleIn( Visibility.module );
@@ -412,12 +335,12 @@
 
     @Mixins( { MixinB.class } )
     public interface B1Composite
-        extends TransientComposite, B1
+        extends B1
     {
     }
 
     public interface B2Composite
-        extends TransientComposite, B2
+        extends B2
     {
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/ModuleTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/ModuleTest.java
index aeb9fb7..3e746b4 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/ModuleTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/ModuleTest.java
@@ -20,20 +20,16 @@
 
 package org.apache.polygene.runtime.structure;
 
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
-import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
-import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -47,40 +43,20 @@
     public Application givenFixture1()
         throws AssemblyException
     {
-        Energy4Java boot = new Energy4Java();
-        return boot.newApplication( new ApplicationAssembler()
-        {
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-                throws AssemblyException
-            {
-                return applicationFactory.newApplicationAssembly( new Assembler[][][]
-                                                                  {
-                                                                      {
-                                                                          {
-                                                                              new Assembler()
-                                                                              {
-                                                                                  public void assemble( ModuleAssembly module )
-                                                                                      throws AssemblyException
-                                                                                  {
-                                                                                      module.transients( TestComposite1.class );
-                                                                                  }
-                                                                              }
-                                                                          },
-                                                                          {
-                                                                              new Assembler()
-                                                                              {
-                                                                                  public void assemble( ModuleAssembly module )
-                                                                                      throws AssemblyException
-                                                                                  {
-                                                                                      module.transients( TestComposite2.class )
-                                                                                          .visibleIn( Visibility.layer );
-                                                                                  }
-                                                                              }
-                                                                          }
-                                                                      }
-                                                                  } );
-            }
-        } );
+        Energy4Java polygene = new Energy4Java();
+        return polygene.newApplication(
+            factory -> factory.newApplicationAssembly(
+                new Assembler[][][]
+                    {
+                        {
+                            {
+                                module -> module.transients( TestComposite1.class )
+                            },
+                            {
+                                module -> module.transients( TestComposite2.class ).visibleIn( Visibility.layer )
+                            }
+                        }
+                    } ) );
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/NoSuchEntityTypeExceptionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/NoSuchEntityTypeExceptionTest.java
new file mode 100644
index 0000000..a65802b
--- /dev/null
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/NoSuchEntityTypeExceptionTest.java
@@ -0,0 +1,95 @@
+/*
+ *  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.polygene.runtime.structure;
+
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
+import org.apache.polygene.api.unitofwork.NoSuchEntityTypeException;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.value.NoSuchValueTypeException;
+import org.apache.polygene.api.value.ValueBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.apache.polygene.test.entity.model.AbstractPolygeneMultiLayeredTestWithModel;
+import org.apache.polygene.test.entity.model.monetary.CheckBookSlip;
+import org.apache.polygene.test.entity.model.monetary.Currency;
+import org.apache.polygene.test.entity.model.people.Person;
+import org.apache.polygene.test.entity.model.people.Rent;
+import org.junit.Test;
+
+import static org.hamcrest.core.StringContains.containsString;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class NoSuchEntityTypeExceptionTest extends AbstractPolygeneMultiLayeredTestWithModel
+{
+    @Test
+    public void givenNoVisibilityWhenCreatingValueExpectClearException()
+    {
+        try
+        {
+            ValueBuilder<Rent> builder = valueBuilderFactory.newValueBuilder( Rent.class );
+            fail( NoSuchValueTypeException.class.getSimpleName() + " should have been thrown." );
+        }
+        catch( NoSuchValueTypeException e )
+        {
+            String expectedString = "\tInvisible ValueComposite types are:" + System.getProperty( "line.separator" )
+                                    + "\t\t[ org.apache.polygene.test.entity.model.people.Rent] in [People Module] with visibility module";
+            assertThat( e.getMessage(), containsString( expectedString ) );
+        }
+    }
+
+    @Test
+    public void givenNoVisibilityWhenCreatingTransientExpectClearException()
+    {
+        try
+        {
+            CheckBookSlip slip = transientBuilderFactory.newTransient( CheckBookSlip.class );
+            fail( NoSuchTransientTypeException.class.getSimpleName() + " should have been thrown." );
+        }
+        catch( NoSuchTransientTypeException e )
+        {
+            String expectedString = "\tInvisible TransientComposite types are:" + System.getProperty( "line.separator" )
+                                    + "\t\t[ org.apache.polygene.test.entity.model.monetary.CheckBookSlip] in [Monetary Module] with visibility module";
+            assertThat( e.getMessage(), containsString( expectedString ) );
+        }
+    }
+
+    @Test
+    public void givenNoVisibilityWhenCreatingEntityExpectClearException()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
+        {
+            Person p = uow.newEntity( Person.class );
+            fail( NoSuchEntityTypeException.class.getSimpleName() + " should have been thrown." );
+        }
+        catch( NoSuchEntityTypeException e )
+        {
+            String expectedString = "\tInvisible EntityComposite types are:" + System.getProperty( "line.separator" )
+                                    + "\t\t[ org.apache.polygene.test.entity.model.people.Person] in [People Module] with visibility layer";
+            assertThat( e.getMessage(), containsString( expectedString ) );
+        }
+    }
+
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        module.services( MemoryEntityStoreService.class ).instantiateOnStartup();
+    }
+}
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/PrivateCompositeVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/PrivateCompositeVisibilityTest.java
index 8991605..70ef4b8 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/PrivateCompositeVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/PrivateCompositeVisibilityTest.java
@@ -20,9 +20,8 @@
 
 package org.apache.polygene.runtime.structure;
 
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.composite.NoSuchTransientException;
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.Structure;
@@ -33,17 +32,18 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.junit.Test;
 
 /**
  * JAVADOC
  */
 public class PrivateCompositeVisibilityTest
 {
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void testPrivateCompositeVisibility()
         throws Exception
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // Layer
@@ -55,7 +55,7 @@
                   }
                 }
             };
-        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        Application app = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
         app.activate();
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/StructureTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/StructureTest.java
index 5dec9df..aba2f3b 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/StructureTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/StructureTest.java
@@ -20,16 +20,14 @@
 
 package org.apache.polygene.runtime.structure;
 
-import org.junit.Test;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.junit.Test;
 
 /**
  * JAVADOC
@@ -41,25 +39,20 @@
     public void createApplicationUsingApplicationAssembly()
         throws AssemblyException
     {
-        Energy4Java boot = new Energy4Java();
-        boot.newApplication( new ApplicationAssembler()
-        {
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-                throws AssemblyException
-            {
-                ApplicationAssembly applicationAssembly = applicationFactory.newApplicationAssembly();
-                // Application Layer
-                LayerAssembly applicationLayer = applicationAssembly.layer( "Application" );
-                ModuleAssembly applicationModule = applicationLayer.module( "Application" );
-                new DomainApplicationAssembler().assemble( applicationModule );
+        Energy4Java polygene = new Energy4Java();
+        polygene.newApplication( factory -> {
+            ApplicationAssembly applicationAssembly = factory.newApplicationAssembly();
+            // Application Layer
+            LayerAssembly applicationLayer = applicationAssembly.layer( "Application" );
+            ModuleAssembly applicationModule = applicationLayer.module( "Application" );
+            new DomainApplicationAssembler().assemble( applicationModule );
 
-                // View Layer
-                LayerAssembly viewLayer = applicationAssembly.layer( "View" );
-                ModuleAssembly viewModule = viewLayer.module( "View" );
-                new ViewAssembler().assemble( viewModule );
-                viewLayer.uses( applicationLayer );
-                return applicationAssembly;
-            }
+            // View Layer
+            LayerAssembly viewLayer = applicationAssembly.layer( "View" );
+            ModuleAssembly viewModule = viewLayer.module( "View" );
+            new ViewAssembler().assemble( viewModule );
+            viewLayer.uses( applicationLayer );
+            return applicationAssembly;
         } );
     }
 
@@ -67,7 +60,7 @@
     public void createApplicationUsingArrayOfAssemblers()
         throws AssemblyException
     {
-        Energy4Java boot = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         Assembler[][][] assemblers = new Assembler[][][]
             {
                 { // User Interface layer
@@ -92,7 +85,7 @@
                 }
             };
 
-        boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
+        polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
         {
         } );
     }
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/TypeToCompositeLookupTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/TypeToCompositeLookupTest.java
index c32e2ef..3df3b38 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/structure/TypeToCompositeLookupTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/structure/TypeToCompositeLookupTest.java
@@ -33,7 +33,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
@@ -104,7 +103,6 @@
                 throws AssemblyException
             {
                 module.objects( SomeOtherFooImpl.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module();
@@ -126,7 +124,6 @@
                 throws AssemblyException
             {
                 module.objects( SomeOtherFooImpl.class, BasicFooImpl.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module();
@@ -156,7 +153,6 @@
                 throws AssemblyException
             {
                 module.transients( SomeOtherFoo.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module();
@@ -178,7 +174,6 @@
                 throws AssemblyException
             {
                 module.transients( SomeOtherFoo.class, BasicFoo.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module();
@@ -208,7 +203,6 @@
                 throws AssemblyException
             {
                 module.values( SomeOtherFoo.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module();
@@ -230,7 +224,6 @@
                 throws AssemblyException
             {
                 module.values( SomeOtherFoo.class, BasicFoo.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module();
@@ -261,7 +254,6 @@
             {
                 new EntityTestAssembler().assemble( module );
                 module.entities( SomeOtherFoo.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module().unitOfWorkFactory();
@@ -304,7 +296,6 @@
             {
                 new EntityTestAssembler().assemble( module );
                 module.entities( SomeOtherFoo.class, BasicFoo.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
 
         }.module().unitOfWorkFactory();
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientBuilderFactoryTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientBuilderFactoryTest.java
index 9383841..95dbfff 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientBuilderFactoryTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientBuilderFactoryTest.java
@@ -25,7 +25,7 @@
 import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.common.UseDefaults;
-import org.apache.polygene.api.composite.NoSuchTransientException;
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.concern.GenericConcern;
@@ -52,7 +52,7 @@
      *
      * @throws Exception expected
      */
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void newBuilderForUnregisteredComposite()
         throws Exception
     {
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientVisibilityTest.java
index 19b91e2..c71d526 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/transients/TransientVisibilityTest.java
@@ -21,7 +21,7 @@
 package org.apache.polygene.runtime.transients;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.composite.NoSuchTransientException;
+import org.apache.polygene.api.composite.NoSuchTransientTypeException;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.entity.EntityComposite;
@@ -40,7 +40,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.After;
 import org.junit.Before;
@@ -48,7 +47,7 @@
 
 public class TransientVisibilityTest
 {
-    public static final Identity TEST_IDENTITY = new StringIdentity( "123" );
+    public static final Identity TEST_IDENTITY = StringIdentity.identityOf( "123" );
     private Energy4Java polygene;
     private Module module;
     private Application app;
@@ -131,7 +130,7 @@
         service.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromServiceWhenAccessingBesideModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -145,35 +144,35 @@
         service.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromServiceWhenAccessingBelowLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromServiceWhenAccessingBelowModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromServiceWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromServiceWhenAccessingAboveLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromServiceWhenAccessingAboveModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -270,7 +269,7 @@
         }
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromEntityWhenAccessingBesideModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -306,7 +305,7 @@
         }
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromEntityWhenAccessingBelowLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -324,7 +323,7 @@
         }
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromEntityWhenAccessingBelowModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -342,7 +341,7 @@
         }
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromEntityWhenAccessingAboveApplicationVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -360,7 +359,7 @@
         }
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromEntityWhenAccessingAboveLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -378,7 +377,7 @@
         }
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromEntityWhenAccessingAboveModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -431,7 +430,7 @@
         value.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromValueWhenAccessingBesideModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -445,35 +444,35 @@
         value.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromValueWhenAccessingBelowLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromValueWhenAccessingBelowModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromValueWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromValueWhenAccessingAboveLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromValueWhenAccessingAboveModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -515,7 +514,7 @@
         transientt.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromTransientWhenAccessingBesideModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -529,35 +528,35 @@
         transientt.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromTransientWhenAccessingBelowLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromTransientWhenAccessingBelowModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromTransientWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromTransientWhenAccessingAboveLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromTransientWhenAccessingAboveModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -599,7 +598,7 @@
         object.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromObjectWhenAccessingBesideModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -613,35 +612,35 @@
         object.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromObjectWhenAccessingBelowLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromObjectWhenAccessingBelowModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromObjectWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromObjectWhenAccessingAboveLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchTransientException.class )
+    @Test( expected = NoSuchTransientTypeException.class )
     public void givenFromObjectWhenAccessingAboveModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -666,8 +665,6 @@
             module.transients( ModuleApplicationVisible.class ).visibleIn( Visibility.application );
             module.transients( ModuleLayerVisible.class ).visibleIn( Visibility.layer );
             module.transients( ModuleModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -685,8 +682,6 @@
             module.transients( BelowModuleVisible.class ).visibleIn( Visibility.module );
 
             new EntityTestAssembler().visibleIn( Visibility.application ).assemble( module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -702,8 +697,6 @@
             module.transients( AboveApplicationVisible.class ).visibleIn( Visibility.application );
             module.transients( AboveLayerVisible.class ).visibleIn( Visibility.layer );
             module.transients( AboveModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -718,8 +711,6 @@
             module.transients( BesideApplicationVisible.class ).visibleIn( Visibility.application );
             module.transients( BesideLayerVisible.class ).visibleIn( Visibility.layer );
             module.transients( BesideModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java
index 69775b6..c1a04f0 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java
@@ -22,6 +22,7 @@
 
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.association.ManyAssociation;
+import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.identity.HasIdentity;
@@ -40,7 +41,6 @@
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.Energy4Java;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
@@ -52,7 +52,7 @@
  */
 public class PrivateEntityUnitOfWorkTest
 {
-    private static final Identity TEST_IDENTITY = new StringIdentity( "1" );
+    private static final Identity TEST_IDENTITY = StringIdentity.identityOf( "1" );
 
     @Structure
     private UnitOfWorkFactory uowf;
@@ -63,15 +63,14 @@
     {
         System.setProperty( "polygene.compacttrace", "off" );
 
-        Energy4Java is = new Energy4Java();
-        Application app = is.newApplication(
+        Energy4Java polygene = new Energy4Java();
+        Application app = polygene.newApplication(
             applicationFactory ->
                 applicationFactory.newApplicationAssembly( new Assembler[][][]{
                     {
                         {
                             module -> {
                                 module.objects( PrivateEntityUnitOfWorkTest.class );
-                                new DefaultUnitOfWorkAssembler().assemble( module );
                             }
                         }
                     },
@@ -81,8 +80,10 @@
                                 module.entities( ProductEntity.class );
                                 module.entities( ProductCatalogEntity.class ).visibleIn( application );
                                 module.values( ProductInfo.class );
-                                new EntityTestAssembler().assemble( module );
-                                new DefaultUnitOfWorkAssembler().assemble( module );
+
+                                new EntityTestAssembler().visibleIn( Visibility.module )
+                                                         .defaultServicesVisibleIn( Visibility.application )
+                                                         .assemble( module );
                             }
                         }
                     }
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/RemovalTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/RemovalTest.java
index 843c103..617914a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/RemovalTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/RemovalTest.java
@@ -20,11 +20,10 @@
 
 package org.apache.polygene.runtime.unitofwork;
 
-import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.unitofwork.NoSuchEntityException;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
@@ -32,6 +31,7 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
@@ -40,7 +40,7 @@
     extends AbstractPolygeneTest
 {
 
-    private static final Identity TEST_IDENTITY = new StringIdentity( "123" );
+    private static final Identity TEST_IDENTITY = StringIdentity.identityOf( "123" );
 
     public void assemble(ModuleAssembly module )
         throws AssemblyException
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java
index 18b6935..d43cfc9 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java
@@ -37,8 +37,8 @@
 import org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
@@ -100,12 +100,13 @@
         module.entities( Person.class );
         module.values( Person.class );
         module.services( PersonRepository.class ).withConcerns( UnitOfWorkConcern.class );
-        module.services( MemoryEntityStoreService.class );
 
         module.services( Runnable.class )
             .withMixins( LoadData.class )
             .withConcerns( UnitOfWorkConcern.class )
             .instantiateOnStartup();
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Override
@@ -150,7 +151,7 @@
         public Person findPersonByName( String name )
         {
             UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
-            return uow.toValue( Person.class, uow.get( Person.class, new StringIdentity( name ) ) );
+            return uow.toValue( Person.class, uow.get( Person.class, StringIdentity.identityOf( name ) ) );
         }
     }
 
@@ -205,7 +206,7 @@
         private Person createPerson( String name )
         {
             UnitOfWork uow = uowf.currentUnitOfWork();
-            return uow.newEntity( Person.class, new StringIdentity( name ) );
+            return uow.newEntity( Person.class, StringIdentity.identityOf( name ) );
         }
     }
 }
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java
index 45859de..0b5c77f 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java
@@ -38,7 +38,7 @@
     extends AbstractPolygeneTest
 {
 
-    static interface InnerValue
+    interface InnerValue
         extends ValueComposite
     {
 
@@ -47,7 +47,7 @@
         Property<Map<String, String>> mapProp();
     }
 
-    static interface InnerDefaultedValue
+    interface InnerDefaultedValue
         extends ValueComposite
     {
 
@@ -58,14 +58,14 @@
         Property<Map<String, String>> mapPropDefault();
     }
 
-    static interface OuterValue
+    interface OuterValue
         extends ValueComposite
     {
 
         Property<List<InnerValue>> innerListProp();
     }
 
-    static interface OuterDefaultedValue
+    interface OuterDefaultedValue
         extends ValueComposite
     {
 
@@ -78,6 +78,8 @@
         throws AssemblyException
     {
         module.values( InnerValue.class, InnerDefaultedValue.class, OuterValue.class, OuterDefaultedValue.class );
+
+        module.defaultServices();
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueComposite2Test.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueComposite2Test.java
index 3dbe3d8..a8a4d19 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueComposite2Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueComposite2Test.java
@@ -20,9 +20,6 @@
 package org.apache.polygene.runtime.value;
 
 import java.security.Guard;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
@@ -36,6 +33,8 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class ValueComposite2Test
 {
@@ -50,7 +49,6 @@
             {
                 module.values( SomeValue.class );
                 module.services( DummyService.class );
-                new DefaultUnitOfWorkAssembler().assemble( module );
             }
         };
         ValueBuilder<Some> builder = app.module().newValueBuilder( Some.class );
@@ -132,7 +130,7 @@
         }
     }
 
-    public static interface DummyService
+    public interface DummyService
         extends ServiceComposite
     {
     }
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java
index bc538f1..74f6226 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java
@@ -39,6 +39,8 @@
         throws AssemblyException
     {
         module.values( SomeValue.class );
+
+        module.defaultServices();
     }
 
     @Test
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueSerializationRegressionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueSerializationRegressionTest.java
index fe8cdd8..2bb600a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueSerializationRegressionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueSerializationRegressionTest.java
@@ -50,7 +50,7 @@
         throws UnitOfWorkCompletionException
     {
         ValueBuilder<DualFaced> builder = valueBuilderFactory.newValueBuilder( DualFaced.class );
-        builder.prototype().identity().set( new StringIdentity( "1234" ) );
+        builder.prototype().identity().set( StringIdentity.identityOf( "1234" ) );
         builder.prototype().name().set( "Hedhman" );
         DualFaced value = builder.newInstance();
     }
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueVisibilityTest.java
index 4dff8ae..35052b4 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueVisibilityTest.java
@@ -32,7 +32,7 @@
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.api.value.NoSuchValueException;
+import org.apache.polygene.api.value.NoSuchValueTypeException;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
@@ -40,7 +40,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.After;
 import org.junit.Before;
@@ -49,7 +48,7 @@
 public class ValueVisibilityTest
 {
 
-    public static final Identity TEST_IDENTIY = new StringIdentity( "123" );
+    public static final Identity TEST_IDENTIY = StringIdentity.identityOf( "123" );
     private Energy4Java polygene;
     private Module module;
     private Application app;
@@ -132,7 +131,7 @@
         service.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromServiceWhenAccessingBesideModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -146,35 +145,35 @@
         service.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromServiceWhenAccessingBelowLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromServiceWhenAccessingBelowModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromServiceWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromServiceWhenAccessingAboveLayerVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
         service.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromServiceWhenAccessingAboveModuleVisibleExpectException()
     {
         FromService service = module.findService( FromService.class ).get();
@@ -271,7 +270,7 @@
         }
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromEntityWhenAccessingBesideModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -307,7 +306,7 @@
         }
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromEntityWhenAccessingBelowLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -325,7 +324,7 @@
         }
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromEntityWhenAccessingBelowModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -343,7 +342,7 @@
         }
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromEntityWhenAccessingAboveApplicationVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -361,7 +360,7 @@
         }
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromEntityWhenAccessingAboveLayerVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -379,7 +378,7 @@
         }
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromEntityWhenAccessingAboveModuleVisibleExpectException()
     {
         UnitOfWork unitOfWork = uowf.newUnitOfWork();
@@ -432,7 +431,7 @@
         value.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromValueWhenAccessingBesideModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -446,35 +445,35 @@
         value.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromValueWhenAccessingBelowLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromValueWhenAccessingBelowModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromValueWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromValueWhenAccessingAboveLayerVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
         value.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromValueWhenAccessingAboveModuleVisibleExpectException()
     {
         FromValue value = module.newValue( FromValue.class );
@@ -516,7 +515,7 @@
         transientt.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromTransientWhenAccessingBesideModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -530,35 +529,35 @@
         transientt.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromTransientWhenAccessingBelowLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromTransientWhenAccessingBelowModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromTransientWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromTransientWhenAccessingAboveLayerVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
         transientt.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromTransientWhenAccessingAboveModuleVisibleExpectException()
     {
         FromTransient transientt = module.newTransient( FromTransient.class );
@@ -600,7 +599,7 @@
         object.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromObjectWhenAccessingBesideModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -614,35 +613,35 @@
         object.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromObjectWhenAccessingBelowLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromObjectWhenAccessingBelowModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.belowModuleVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromObjectWhenAccessingAboveApplicationVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveApplicationVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromObjectWhenAccessingAboveLayerVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
         object.aboveLayerVisible();
     }
 
-    @Test( expected = NoSuchValueException.class )
+    @Test( expected = NoSuchValueTypeException.class )
     public void givenFromObjectWhenAccessingAboveModuleVisibleExpectException()
     {
         FromObject object = module.newObject( FromObject.class );
@@ -667,8 +666,6 @@
             module.values( ModuleApplicationVisible.class ).visibleIn( Visibility.application );
             module.values( ModuleLayerVisible.class ).visibleIn( Visibility.layer );
             module.values( ModuleModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -686,7 +683,6 @@
             module.values( BelowModuleVisible.class ).visibleIn( Visibility.module );
 
             new EntityTestAssembler().visibleIn( Visibility.application ).assemble( module );
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -702,8 +698,6 @@
             module.values( AboveApplicationVisible.class ).visibleIn( Visibility.application );
             module.values( AboveLayerVisible.class ).visibleIn( Visibility.layer );
             module.values( AboveModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
@@ -718,8 +712,6 @@
             module.values( BesideApplicationVisible.class ).visibleIn( Visibility.application );
             module.values( BesideLayerVisible.class ).visibleIn( Visibility.layer );
             module.values( BesideModuleVisible.class ).visibleIn( Visibility.module );
-
-            new DefaultUnitOfWorkAssembler().assemble( module );
         }
     }
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java
index 4441a76..c53a1a5 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java
@@ -36,8 +36,8 @@
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -53,7 +53,8 @@
         module.entities( DualFaced.class );
         module.values( SimpleName.class );
         module.values( DualFaced.class );
-        module.services( MemoryEntityStoreService.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test
@@ -112,7 +113,7 @@
         throws UnitOfWorkCompletionException
     {
         ValueBuilder<DualFaced> builder = valueBuilderFactory.newValueBuilder( DualFaced.class );
-        builder.prototype().identity().set( new StringIdentity( "1234" ) );
+        builder.prototype().identity().set( StringIdentity.identityOf( "1234" ) );
         builder.prototype().name().set( "Hedhman" );
         DualFaced value = builder.newInstance();
 
@@ -124,8 +125,8 @@
 
         try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork())
         {
-            DualFaced entity = uow.get( DualFaced.class, new StringIdentity( "1234" ) );
-            assertThat( entity.identity().get(), equalTo( new StringIdentity( "1234" ) ) );
+            DualFaced entity = uow.get( DualFaced.class, StringIdentity.identityOf( "1234" ) );
+            assertThat( entity.identity().get(), equalTo( StringIdentity.identityOf( "1234" ) ) );
             assertThat( entity.name().get(), equalTo( "Hedhman" ) );
             uow.complete();
         }
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java
index 66c4bc8..239e7fe 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java
@@ -35,15 +35,14 @@
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 public class VisibilityInUnitOfWorkTest
 {
 
-    public static final Identity TEST_IDENTITY1 = new StringIdentity( "123" );
-    public static final Identity TEST_IDENTITY2 = new StringIdentity( "345" );
+    public static final Identity TEST_IDENTITY1 = StringIdentity.identityOf( "123" );
+    public static final Identity TEST_IDENTITY2 = StringIdentity.identityOf( "345" );
 
     @Test
     public void givenTwoModulesWithServiceAndEntityInOneAndEntityInOtherWhenOtherEntityAccessServiceWhichUsesItsEntityExpectServiceToHaveVisibility()
@@ -148,12 +147,9 @@
             ModuleAssembly infraModule = layer1.module( "Infra Module" );
             myModule.services( MyService.class );
             myModule.entities( MyEntity.class );
-            new DefaultUnitOfWorkAssembler().assemble( myModule );
             yourModule.entities( YourEntity.class );
             yourModule.services( YourService.class ).visibleIn( Visibility.layer );
-            new DefaultUnitOfWorkAssembler().assemble( yourModule );
-            infraModule.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
-            new DefaultUnitOfWorkAssembler().assemble( infraModule );
+            new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( infraModule );
             return appAssembly;
         } );
     }
diff --git a/core/runtime/src/test/java/org/apache/polygene/spi/service/importer/ServiceInstanceImporterTest.java b/core/runtime/src/test/java/org/apache/polygene/spi/service/importer/ServiceInstanceImporterTest.java
index 6a891c4..b5f79a7 100644
--- a/core/runtime/src/test/java/org/apache/polygene/spi/service/importer/ServiceInstanceImporterTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/spi/service/importer/ServiceInstanceImporterTest.java
@@ -21,10 +21,6 @@
 package org.apache.polygene.spi.service.importer;
 
 import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.hamcrest.CoreMatchers;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.service.ImportedServiceDescriptor;
@@ -34,6 +30,10 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ImportedServiceDeclaration;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * JAVADOC
@@ -46,7 +46,7 @@
     {
         module.importedServices( TestService.class ).
             identifiedBy( "test" ).
-            setMetaInfo( new StringIdentity( "testimporter" ) ).
+            setMetaInfo( StringIdentity.identityOf( "testimporter" ) ).
             importedBy( ImportedServiceDeclaration.SERVICE_IMPORTER );
         module.services( TestImporterService.class ).identifiedBy( "testimporter" );
 
diff --git a/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java b/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
index 010f7ae..d6c1a19 100644
--- a/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
@@ -24,13 +24,13 @@
 import java.io.StringWriter;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.BeforeClass;
-import org.junit.Test;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.concern.GenericConcern;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 import static org.hamcrest.core.IsNull.notNullValue;
 import static org.junit.Assert.assertEquals;
@@ -78,13 +78,14 @@
         {
             String separator = System.getProperty( "line.separator" );
             String correctTrace1 = "java.lang.RuntimeException: level 2" + separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:123)" + separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)" + separator +
+                                   "\tat method \"doStuff\" of TestComposite in module [Module 1] of layer [Layer 1].(:0)\n" +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:124)" + separator +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:136)" + separator +
                                    "\tat org.apache.polygene.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:75)";
             assertEquality( e, correctTrace1 );
             String correctTrace2 = "java.lang.RuntimeException: level 1" + separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:119)" + separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)" + separator +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:120)" + separator +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:136)" + separator +
                                    "\tat org.apache.polygene.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:75)";
             assertThat( e.getCause(), notNullValue() );
             assertEquality( e.getCause(), correctTrace2 );
diff --git a/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java b/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java
index 25c4a1b..2036424 100644
--- a/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java
@@ -44,6 +44,8 @@
         module.services( MemoryEntityStoreService.class );
         module.importedServices( StatePrinter.class ).importedBy( NEW_OBJECT );
         module.objects( StatePrinter.class );
+
+        module.defaultServices();
     }
 
     private static class StatePrinter
diff --git a/core/runtime/src/test/resources/org/apache/polygene/runtime/service/HelloWorldService.properties b/core/runtime/src/test/resources/org/apache/polygene/runtime/service/HelloWorldService.properties
index a51ce6a..c017674 100644
--- a/core/runtime/src/test/resources/org/apache/polygene/runtime/service/HelloWorldService.properties
+++ b/core/runtime/src/test/resources/org/apache/polygene/runtime/service/HelloWorldService.properties
@@ -19,4 +19,4 @@
 #
 
 phrase=Hello
-name=World
+name=World
\ No newline at end of file
diff --git a/core/runtime/src/test/resources/org/apache/polygene/runtime/service/TestService1.properties b/core/runtime/src/test/resources/org/apache/polygene/runtime/service/TestService1.properties
new file mode 100644
index 0000000..b284cf8
--- /dev/null
+++ b/core/runtime/src/test/resources/org/apache/polygene/runtime/service/TestService1.properties
@@ -0,0 +1,20 @@
+#
+#  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.
+#
+#
+#
+constrained=constrained
\ No newline at end of file
diff --git a/core/runtime/src/test/resources/org/apache/polygene/runtime/service/TestService2.properties b/core/runtime/src/test/resources/org/apache/polygene/runtime/service/TestService2.properties
new file mode 100644
index 0000000..acbfb4c
--- /dev/null
+++ b/core/runtime/src/test/resources/org/apache/polygene/runtime/service/TestService2.properties
@@ -0,0 +1,20 @@
+#
+#  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.
+#
+#
+#
+constrained=free
\ No newline at end of file
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultManyAssociationState.java b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultManyAssociationState.java
index 9e95188..83b883e 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultManyAssociationState.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultManyAssociationState.java
@@ -55,11 +55,6 @@
     @Override
     public boolean add( int i, EntityReference entityReference )
     {
-        if( references.contains( entityReference ) )
-        {
-            return false;
-        }
-
         references.add( i, entityReference );
         entityState.markUpdated();
         return true;
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultNamedAssociationState.java b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultNamedAssociationState.java
index 94f30ca..c182180 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultNamedAssociationState.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/DefaultNamedAssociationState.java
@@ -21,6 +21,7 @@
 
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Objects;
 import org.apache.polygene.api.entity.EntityReference;
 import org.apache.polygene.spi.entity.NamedAssociationState;
 
@@ -55,7 +56,10 @@
     @Override
     public boolean put( String name, EntityReference entityReference )
     {
-        if( references.put( name, entityReference ) == null )
+        Objects.requireNonNull(name, "name");
+        Objects.requireNonNull(entityReference, "entityReference");
+        EntityReference oldReference = references.put( name, entityReference );
+        if( entityReference.equals( oldReference ) )
         {
             return false;
         }
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/JSONMapEntityStoreMixin.java b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/JSONMapEntityStoreMixin.java
index bc715b7..2f6856b 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/JSONMapEntityStoreMixin.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/JSONMapEntityStoreMixin.java
@@ -419,7 +419,7 @@
 
             String version = parsedState.getString( JSONKeys.VERSION );
             Instant modified = Instant.ofEpochMilli( parsedState.getJsonNumber( JSONKeys.MODIFIED ).longValueExact() );
-            Identity identity = new StringIdentity( parsedState.getString( JSONKeys.IDENTITY ) );
+            Identity identity = StringIdentity.identityOf( parsedState.getString( JSONKeys.IDENTITY ) );
 
             // Check if version is correct
             JsonObject state;
@@ -449,7 +449,7 @@
             EntityDescriptor entityDescriptor = module.entityDescriptor( type );
             if( entityDescriptor == null )
             {
-                throw new NoSuchEntityTypeException( type, module.name(), module.typeLookup() );
+                throw new NoSuchEntityTypeException( type, module );
             }
 
             return new JSONEntityState( entityDescriptor.module(), serialization, jsonFactories,
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/MapEntityStoreMixin.java b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/MapEntityStoreMixin.java
index c8bd163..78a95bc 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/MapEntityStoreMixin.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/helpers/MapEntityStoreMixin.java
@@ -382,7 +382,7 @@
 
             String version = parsedState.getString( JSONKeys.VERSION );
             Instant modified = Instant.ofEpochMilli( parsedState.getJsonNumber( JSONKeys.MODIFIED ).longValueExact() );
-            Identity identity = new StringIdentity( parsedState.getString( JSONKeys.IDENTITY ) );
+            Identity identity = StringIdentity.identityOf( parsedState.getString( JSONKeys.IDENTITY ) );
 
             // Check if version is correct
             JsonObject state;
@@ -412,7 +412,7 @@
             EntityDescriptor entityDescriptor = module.entityDescriptor( type );
             if( entityDescriptor == null )
             {
-                throw new NoSuchEntityTypeException( type, module.name(), module.typeLookup() );
+                throw new NoSuchEntityTypeException( type, module );
             }
 
             Map<QualifiedName, Object> properties = new HashMap<>();
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/serialization/BuiltInConverters.java b/core/spi/src/main/java/org/apache/polygene/spi/serialization/BuiltInConverters.java
index 0c1b774..ab7448e 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/serialization/BuiltInConverters.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/serialization/BuiltInConverters.java
@@ -108,7 +108,7 @@
             @Override
             public Identity fromString( String string )
             {
-                return StringIdentity.fromString( string );
+                return StringIdentity.identityOf( string );
             }
         }
 
diff --git a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/Polygene142Test.java b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/Polygene142Test.java
index 935d2ee..b8af6ca 100644
--- a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/Polygene142Test.java
+++ b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/Polygene142Test.java
@@ -22,8 +22,8 @@
 import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.service.qualifier.Tagged;
 import org.apache.polygene.api.serialization.Serialization;
+import org.apache.polygene.api.service.qualifier.Tagged;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.usecase.UsecaseBuilder;
 import org.apache.polygene.api.value.ValueBuilder;
@@ -61,7 +61,7 @@
             value = serialization.deserialize( module, Regression142Type.class, serialized ); // ok
         }
         {
-            Identity valueId = new StringIdentity( "abcdefg" );
+            Identity valueId = StringIdentity.identityOf( "abcdefg" );
             {
                 try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "create" ) ) )
                 {
diff --git a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java
index a55c642..d901c6b 100644
--- a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java
+++ b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java
@@ -44,6 +44,7 @@
     @Override
     public void assemble( ModuleAssembly module )
     {
+        module.defaultServices();
     }
 
     @Service
diff --git a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java
index 5bab0c1..5b55d1d 100644
--- a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java
+++ b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java
@@ -44,6 +44,7 @@
     @Override
     public void assemble( ModuleAssembly module )
     {
+        module.defaultServices();
     }
 
     @Service
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java
index db3c8d8..43193be 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java
@@ -32,10 +32,8 @@
 import org.apache.polygene.api.value.ValueBuilderFactory;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.junit.After;
 import org.junit.Before;
 
@@ -82,11 +80,9 @@
 
     @Override
     protected void defineApplication( ApplicationAssembly applicationAssembly )
-        throws AssemblyException
     {
         LayerAssembly layer = applicationAssembly.layer( "Layer 1" );
         ModuleAssembly module = layer.module( "Module 1" );
-        new DefaultUnitOfWorkAssembler().assemble( module );
         module.objects( AbstractPolygeneTest.this.getClass() );
         assemble( module );
     }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java b/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java
index ec7237b..4dbe625 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java
@@ -19,26 +19,42 @@
  */
 package org.apache.polygene.test;
 
+import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 
 /**
- * Helper assembler that adds an in-memory EntityStore to the module
+ * Helper assembler that adds an in-memory EntityStore and default services to the module.
  */
 public class EntityTestAssembler
     extends Assemblers.VisibilityIdentity<EntityTestAssembler>
 {
+    private Visibility defaultServicesVisibility;
+
+    public EntityTestAssembler defaultServicesVisibleIn( Visibility visibility )
+    {
+        defaultServicesVisibility = visibility;
+        return this;
+    }
+
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( MemoryEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
             service.identifiedBy( identity() );
         }
+        module.defaultServices().visibleIn( defaultServicesVisibility() );
+    }
+
+    private Visibility defaultServicesVisibility()
+    {
+        return defaultServicesVisibility != null
+               ? defaultServicesVisibility
+               : visibility();
     }
 }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
index 937c03a..358070d 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
@@ -21,15 +21,18 @@
 
 import java.util.Collection;
 import java.util.Random;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.spi.cache.Cache;
 import org.apache.polygene.spi.cache.CachePool;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.junit.Test;
 
+import static org.hamcrest.core.AnyOf.anyOf;
+import static org.hamcrest.core.IsEqual.equalTo;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 
 /**
@@ -75,11 +78,11 @@
         catch( ConstraintViolationException e )
         {
             // expected
-            Collection<ConstraintViolation> violations = e.constraintViolations();
+            Collection<ValueConstraintViolation> violations = e.constraintViolations();
             assertEquals( 1, violations.size() );
-            ConstraintViolation violation = violations.iterator().next();
+            ValueConstraintViolation violation = violations.iterator().next();
             assertEquals( "not optional", violation.constraint().toString() );
-            assertEquals( "param1", violation.name() );
+            assertThat( violation.name(), anyOf(equalTo("cacheId"), equalTo( "arg0" )) );  // depends on whether -parameters was given at compile time.
         }
     }
 
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java
index a2f6d29..39fb547 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java
@@ -19,13 +19,13 @@
  */
 package org.apache.polygene.test.cache;
 
-import org.junit.Test;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -42,7 +42,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         super.assemble( module );
         assembleCachePool( module );
@@ -122,13 +121,13 @@
     public void givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState()
         throws UnitOfWorkCompletionException
     {
-        super.givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState();
+        super.givenAssociationsModifiedWhenUnitOfWorkCompletesThenStoreState();
         if( cachePool != null )
         {
             MemoryCacheImpl<?> cache = cachePool.singleCache();
             assertThat( cache.size(), is( 1 ) );
-            assertThat( cache.gets(), is( 2 ) );
-            assertThat( cache.puts(), is( 2 ) );
+            assertThat( cache.gets(), is( 3 ) );
+            assertThat( cache.puts(), is( 3 ) );
             assertThat( cache.removes(), is( 0 ) );
             assertThat( cache.exists(), is( 0 ) );
         }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java
index f8877c0..19f22ab 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java
@@ -27,10 +27,9 @@
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.service.ServiceReference;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -41,13 +40,12 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         ModuleAssembly storageModule = module.layer().module( "storage" );
         module.configurations( ConfigSerializationConfig.class );
         module.values( Host.class );
         module.services( MyService.class ).identifiedBy( "configtest" );
-        storageModule.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
+        new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( storageModule );
     }
 
     @Test
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java
index 2fec7df..e936c1a 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java
@@ -50,7 +50,6 @@
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueComposite;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.spi.entity.EntityState;
 import org.apache.polygene.spi.entitystore.EntityStore;
@@ -62,6 +61,7 @@
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 
@@ -81,7 +81,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.entities( TestEntity.class );
         module.values( TestValue.class, TestValue2.class, TjabbaValue.class );
@@ -164,14 +163,15 @@
     public void whenNewEntityThenCanFindEntityAndCorrectValues()
         throws Exception
     {
-        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
-        try
+        TestEntity instance;
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            TestEntity instance = createEntity( unitOfWork );
+            instance = createEntity( unitOfWork );
             unitOfWork.complete();
-
+        }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
+        {
             // Find entity
-            unitOfWork = unitOfWorkFactory.newUnitOfWork();
             instance = unitOfWork.get( instance );
 
             // Check state
@@ -284,12 +284,6 @@
             assertThat( "namedAssociation has correct 'bar' value",
                         instance.namedAssociation().get( "bar" ),
                         equalTo( instance ) );
-
-            unitOfWork.discard();
-        }
-        finally
-        {
-            unitOfWork.discard();
         }
     }
 
@@ -297,20 +291,25 @@
     public void whenRemovedEntityThenCannotFindEntity()
         throws Exception
     {
-        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
-        TestEntity newInstance = createEntity( unitOfWork );
-        Identity identity = newInstance.identity().get();
-        unitOfWork.complete();
+        TestEntity newInstance;
+        Identity identity;
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
+        {
+            newInstance = createEntity( unitOfWork );
+            identity = newInstance.identity().get();
+            unitOfWork.complete();
+        }
 
         // Remove entity
-        unitOfWork = unitOfWorkFactory.newUnitOfWork();
-        TestEntity instance = unitOfWork.get( newInstance );
-        unitOfWork.remove( instance );
-        unitOfWork.complete();
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
+        {
+            TestEntity instance = unitOfWork.get( newInstance );
+            unitOfWork.remove( instance );
+            unitOfWork.complete();
+        }
 
         // Find entity
-        unitOfWork = unitOfWorkFactory.newUnitOfWork();
-        try
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
             unitOfWork.get( TestEntity.class, identity );
             fail( "Should not be able to find entity" );
@@ -319,10 +318,6 @@
         {
             // Ok!
         }
-        finally
-        {
-            unitOfWork.discard();
-        }
     }
 
     @Test
@@ -331,22 +326,22 @@
     {
         TestEntity testEntity;
         String version;
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
             unitOfWork.complete();
         }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             version = spi.entityStateOf( testEntity ).version();
 
             unitOfWork.complete();
         }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             String newVersion = spi.entityStateOf( testEntity ).version();
             assertThat( "version has not changed", newVersion, equalTo( version ) );
@@ -361,23 +356,23 @@
     {
         TestEntity testEntity;
         String version;
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
             unitOfWork.complete();
         }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             testEntity.name().set( "Rickard" );
             version = spi.entityStateOf( testEntity ).version();
 
             unitOfWork.complete();
         }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             String newVersion = spi.entityStateOf( testEntity ).version();
             assertThat( "version has not changed", newVersion, not( equalTo( version ) ) );
@@ -387,32 +382,50 @@
     }
 
     @Test
-    public void givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState()
+    public void givenAssociationsModifiedWhenUnitOfWorkCompletesThenStoreState()
         throws UnitOfWorkCompletionException
     {
         TestEntity testEntity;
         String version;
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
             unitOfWork.complete();
         }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
+            testEntity.association().set( testEntity );
             testEntity.manyAssociation().add( 0, testEntity );
+            testEntity.namedAssociation().put( "test", testEntity );
             version = spi.entityStateOf( testEntity ).version();
 
             unitOfWork.complete();
         }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             String newVersion = spi.entityStateOf( testEntity ).version();
+            assertThat( "association persisted", testEntity.association().get(), equalTo( testEntity ) );
+            assertThat( "many association persisted", testEntity.manyAssociation().get( 0 ), equalTo( testEntity ) );
+            assertThat( "named association persisted", testEntity.namedAssociation().get( "test" ), equalTo( testEntity ) );
             assertThat( "version has not changed", newVersion, not( equalTo( version ) ) );
 
+            testEntity.association().set( null );
+            testEntity.manyAssociation().clear();
+            testEntity.namedAssociation().clear();
+            unitOfWork.complete();
+        }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
+        {
+            testEntity = unitOfWork.get( testEntity );
+            String newVersion = spi.entityStateOf( testEntity ).version();
+            assertThat( "association cleared", testEntity.association().get(), nullValue() );
+            assertThat( "many association cleared", testEntity.manyAssociation().count(), is( 0 ) );
+            assertThat( "named association cleared", testEntity.namedAssociation().count(), is( 0 ) );
+            assertThat( "version has not changed", newVersion, not( equalTo( version ) ) );
             unitOfWork.complete();
         }
     }
@@ -422,8 +435,8 @@
         throws UnitOfWorkCompletionException
     {
         TestEntity testEntity;
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
@@ -446,9 +459,9 @@
             testEntity1.name().set( "A" );
             testEntity1.unsetName().set( "A" );
         }
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
             // Start working with same Entity in another UoW, and complete it
-            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             TestEntity testEntity2 = unitOfWork.get( testEntity );
             assertThat( "version is correct", spi.entityStateOf( testEntity1 ).version(), equalTo( version ) );
             testEntity2.name().set( "B" );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java
new file mode 100644
index 0000000..0c0500d
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java
@@ -0,0 +1,161 @@
+/*
+ *  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.polygene.test.entity.model;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.polygene.api.association.NamedAssociation;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.composite.TransientBuilderFactory;
+import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.injection.scope.Service;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.object.ObjectFactory;
+import org.apache.polygene.api.structure.Application;
+import org.apache.polygene.api.structure.ApplicationDescriptor;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.NoSuchEntityException;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.api.value.ValueBuilderFactory;
+import org.apache.polygene.bootstrap.ApplicationAssembly;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.apache.polygene.spi.serialization.JsonSerialization;
+import org.apache.polygene.test.AbstractPolygeneBaseTest;
+import org.apache.polygene.test.entity.model.legal.LegalService;
+import org.apache.polygene.test.entity.model.legal.Will;
+import org.apache.polygene.test.entity.model.legal.WillAmount;
+import org.apache.polygene.test.entity.model.legal.WillItem;
+import org.apache.polygene.test.entity.model.legal.WillPercentage;
+import org.apache.polygene.test.entity.model.monetary.CheckBookSlip;
+import org.apache.polygene.test.entity.model.monetary.Currency;
+import org.apache.polygene.test.entity.model.people.Address;
+import org.apache.polygene.test.entity.model.people.City;
+import org.apache.polygene.test.entity.model.people.Country;
+import org.apache.polygene.test.entity.model.people.PeopleRepository;
+import org.apache.polygene.test.entity.model.people.Person;
+import org.apache.polygene.test.entity.model.people.PhoneNumber;
+import org.apache.polygene.test.entity.model.people.Rent;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.Assert.assertThat;
+
+public abstract class AbstractPolygeneMultiLayeredTestWithModel extends AbstractPolygeneBaseTest
+{
+    private static final String FRIEND = "Friend";
+    private static final String COLLEAGUE = "Colleague";
+
+    protected ModuleAssembly configModule;
+
+    @Structure
+    protected ValueBuilderFactory valueBuilderFactory;
+
+    @Structure
+    protected TransientBuilderFactory transientBuilderFactory;
+
+    @Structure
+    protected UnitOfWorkFactory unitOfWorkFactory;
+
+    @Structure
+    protected ObjectFactory objectFactory;
+
+    @Override
+    protected void defineApplication( ApplicationAssembly applicationAssembly )
+        throws AssemblyException
+    {
+        LayerAssembly accessLayer = applicationAssembly.layer( "Access Layer" );
+        LayerAssembly domainLayer = applicationAssembly.layer( "Domain Layer" );
+        LayerAssembly infrastructureLayer = applicationAssembly.layer( "Infrastructure Layer" );
+        LayerAssembly configLayer = applicationAssembly.layer( "Configuration Layer" );
+        accessLayer.uses( domainLayer.uses( infrastructureLayer.uses( configLayer ) ) );
+        defineConfigModule( configLayer.module( "Configuration Module" ) );
+        defineSerializationModule( configLayer.module( "Serialization Module" ) );
+        defineStorageModule( infrastructureLayer.module( "Storage Module" ) );
+        defineMonetaryModule( domainLayer.module( "Monetary Module" ) );
+        definePeopleModule( domainLayer.module( "People Module" ) );
+        defineLegalModule( domainLayer.module( "Legal Module" ) );
+        defineTestModule( accessLayer.module( "TestCase Module" ) );
+    }
+
+    @Override
+    protected Application newApplicationInstance( ApplicationDescriptor applicationModel )
+    {
+        Application application = super.newApplicationInstance( applicationModel );
+        Module module = application.findModule( "Access Layer", "TestCase Module" );
+        module.injectTo( this );
+        return application;
+    }
+
+    protected void defineTestModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        module.objects( this.getClass() );
+    }
+
+    protected void definePeopleModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        module.entities( Address.class, Country.class, City.class, PhoneNumber.class );
+        module.entities( Person.class ).visibleIn( Visibility.layer );
+        module.services( PeopleRepository.class ).visibleIn( Visibility.application );
+        module.values( Rent.class );
+        module.objects( Rent.Builder.class ).visibleIn( Visibility.application );
+    }
+
+    protected void defineLegalModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        module.services( LegalService.class ).visibleIn( Visibility.application );
+        module.entities( Will.class );
+        module.values( WillAmount.class, WillItem.class, WillPercentage.class );
+    }
+
+    protected void defineMonetaryModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        module.values( Currency.class ).visibleIn( Visibility.layer );
+        module.transients( CheckBookSlip.class );
+        module.transients( Currency.Builder.class ).visibleIn( Visibility.application );
+    }
+
+    protected void defineSerializationModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        module.services( JsonSerialization.class ).visibleIn( Visibility.application );
+    }
+
+    protected abstract void defineStorageModule( ModuleAssembly module );
+
+    protected void defineConfigModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.module );
+        configModule = module;
+    }
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java
new file mode 100644
index 0000000..169b93b
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java
@@ -0,0 +1,543 @@
+/*
+ *  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.polygene.test.entity.model;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.polygene.api.association.NamedAssociation;
+import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.injection.scope.Service;
+import org.apache.polygene.api.unitofwork.NoSuchEntityException;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.test.entity.model.legal.LegalService;
+import org.apache.polygene.test.entity.model.legal.Will;
+import org.apache.polygene.test.entity.model.legal.WillAmount;
+import org.apache.polygene.test.entity.model.legal.WillItem;
+import org.apache.polygene.test.entity.model.legal.WillPercentage;
+import org.apache.polygene.test.entity.model.monetary.Currency;
+import org.apache.polygene.test.entity.model.people.Address;
+import org.apache.polygene.test.entity.model.people.City;
+import org.apache.polygene.test.entity.model.people.Country;
+import org.apache.polygene.test.entity.model.people.PeopleRepository;
+import org.apache.polygene.test.entity.model.people.Person;
+import org.apache.polygene.test.entity.model.people.PhoneNumber;
+import org.apache.polygene.test.entity.model.people.Rent;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.Assert.assertThat;
+
+public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredTestWithModel
+{
+    private static final String FRIEND = "Friend";
+    private static final String COLLEAGUE = "Colleague";
+
+    @Service
+    private LegalService legalService;
+
+    @Service
+    private PeopleRepository peopleRepository;
+
+    private Identity switzerlandId;
+    private Identity franceId;
+    private Identity denmarkId;
+    private Identity germanyId;
+    private Identity swedenId;
+    private Identity usId;
+    private Identity malaysiaId;
+
+    private Identity kualaLumpurId;
+    private Identity cherasId;
+    private Identity zurichId;
+    private Identity malmoId;
+    private Identity montpellierId;
+
+    private Identity hannoverId;
+    private Identity canaryId;
+    private Identity angkasaImpian4Id;
+    private Identity varnhemId;
+    private Identity unknown1Id;
+    private Identity unknown2Id;
+    private Identity unknown3Id;
+
+    @Before
+    public void setupTestData()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "TestData Generation" ) ) )
+        {
+            testData();
+            uow.complete();
+        }
+    }
+
+    @Test
+    public void validateAllCountriesPresent()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllCountriesPresent" ) ) )
+        {
+            assertThat( peopleRepository.findCountryByCountryCode( "my" ).name().get(), equalTo( "Malaysia" ) );
+            assertThat( peopleRepository.findCountryByCountryCode( "us" ).name().get(), equalTo( "United States" ) );
+            assertThat( peopleRepository.findCountryByCountryCode( "se" ).name().get(), equalTo( "Sweden" ) );
+            assertThat( peopleRepository.findCountryByCountryCode( "de" ).name().get(), equalTo( "Germany" ) );
+            assertThat( peopleRepository.findCountryByCountryCode( "dk" ).name().get(), equalTo( "Denmark" ) );
+            assertThat( peopleRepository.findCountryByCountryCode( "fr" ).name().get(), equalTo( "France" ) );
+            assertThat( peopleRepository.findCountryByCountryCode( "ch" ).name().get(), equalTo( "Switzerland" ) );
+        }
+    }
+
+    @Test
+    public void validateAllCitiesPresent()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllCitiesPresent" ) ) )
+        {
+            assertThat( peopleRepository.findCity( zurichId ).name().get(), equalTo( "Zurich" ) );
+            assertThat( peopleRepository.findCity( malmoId ).name().get(), equalTo( "Malmo" ) );
+            assertThat( peopleRepository.findCity( cherasId ).name().get(), equalTo( "Cheras" ) );
+            assertThat( peopleRepository.findCity( hannoverId ).name().get(), equalTo( "Hannover" ) );
+            assertThat( peopleRepository.findCity( montpellierId ).name().get(), equalTo( "Montpellier" ) );
+            assertThat( peopleRepository.findCity( kualaLumpurId ).name().get(), equalTo( "Kuala Lumpur" ) );
+        }
+    }
+
+    @Test
+    public void validateAllAddressesPresent()
+    {
+        Currency.Builder currencyBuilder = transientBuilderFactory.newTransient( Currency.Builder.class );
+        Currency eur1000 = currencyBuilder.create( 1000, "EUR" );
+        Currency eur1500 = currencyBuilder.create( 1500, "EUR" );
+        Currency chf2000 = currencyBuilder.create( 2000, "CHF" );
+        Currency myr3000 = currencyBuilder.create( 3000, "MYR" );
+        Currency sek9000 = currencyBuilder.create( 9000, "SEK" );
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllAddressesPresent" ) ) )
+        {
+            Address canary = peopleRepository.findAddress( canaryId );
+            assertThat( canary.street().get(), equalTo( "10, CH5A, Jalan Cheras Hartamas" ) );
+            assertThat( canary.country().get().identity().get(), equalTo( malaysiaId ) );
+            assertThat( canary.city().get().identity().get(), equalTo( cherasId ) );
+            assertThat( canary.zipCode().get(), equalTo( "43200" ) );
+            assertThat( canary.rent().get().amount().get(), equalTo( myr3000 ) );
+
+            Address varnhem = peopleRepository.findAddress( varnhemId );
+            assertThat( varnhem.street().get(), equalTo( "Varnhemsgatan 25" ) );
+            assertThat( varnhem.city().get().identity().get(), equalTo( malmoId ) );
+            assertThat( varnhem.country().get().identity().get(), equalTo( swedenId ) );
+            assertThat( varnhem.zipCode().get(), equalTo( "215 00" ) );
+            assertThat( varnhem.rent().get().amount().get(), equalTo( sek9000 ) );
+
+            Address angkasaImpian = peopleRepository.findAddress( angkasaImpian4Id );
+            assertThat( angkasaImpian.street().get(), equalTo( "B-19-4, Jalan Sehabat" ) );
+            assertThat( angkasaImpian.country().get().identity().get(), equalTo( malaysiaId ) );
+            assertThat( angkasaImpian.city().get().identity().get(), equalTo( kualaLumpurId ) );
+            assertThat( angkasaImpian.zipCode().get(), equalTo( "50200" ) );
+            assertThat( angkasaImpian.rent().get().amount().get(), equalTo( myr3000 ) );
+
+            Address unknown = peopleRepository.findAddress( unknown1Id );
+            assertThat( unknown.street().get(), equalTo( "" ) );
+            assertThat( unknown.city().get().identity().get(), equalTo( montpellierId ) );
+            assertThat( unknown.country().get().identity().get(), equalTo( franceId ) );
+            assertThat( unknown.zipCode().get(), equalTo( "" ) );
+            assertThat( unknown.rent().get().amount().get(), equalTo( eur1000 ) );
+
+            unknown = peopleRepository.findAddress( unknown2Id );
+            assertThat( unknown.street().get(), equalTo( "" ) );
+            assertThat( unknown.city().get().identity().get(), equalTo( hannoverId ) );
+            assertThat( unknown.country().get().identity().get(), equalTo( germanyId ) );
+            assertThat( unknown.zipCode().get(), equalTo( "" ) );
+            assertThat( unknown.rent().get().amount().get(), equalTo( eur1500 ) );
+
+            unknown = peopleRepository.findAddress( unknown3Id );
+            assertThat( unknown.street().get(), equalTo( "" ) );
+            assertThat( unknown.city().get().identity().get(), equalTo( zurichId ) );
+            assertThat( unknown.country().get().identity().get(), equalTo( switzerlandId ) );
+            assertThat( unknown.zipCode().get(), equalTo( "" ) );
+            assertThat( unknown.rent().get().amount().get(), equalTo( chf2000 ) );
+        }
+    }
+
+    @Test
+    public void validateAllPersonsPresent()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllPersonsPresent" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            assertThat( niclas.name().get(), equalTo( "Niclas" ) );
+            Person eric = peopleRepository.findPersonByName( "Eric" );
+            assertThat( eric.name().get(), equalTo( "Eric" ) );
+            Person paul = peopleRepository.findPersonByName( "Paul" );
+            assertThat( paul.name().get(), equalTo( "Paul" ) );
+            Person toni = peopleRepository.findPersonByName( "Toni" );
+            assertThat( toni.name().get(), equalTo( "Toni" ) );
+            Person janna = peopleRepository.findPersonByName( "Janna" );
+            assertThat( janna.name().get(), equalTo( "Janna" ) );
+            Person peter = peopleRepository.findPersonByName( "Peter" );
+            assertThat( peter.name().get(), equalTo( "Peter" ) );
+            Person oscar = peopleRepository.findPersonByName( "Oscar" );
+            assertThat( oscar.name().get(), equalTo( "Oscar" ) );
+            Person kalle = peopleRepository.findPersonByName( "Kalle" );
+            assertThat( kalle.name().get(), equalTo( "Kalle" ) );
+            Person andreas = peopleRepository.findPersonByName( "Andreas" );
+            assertThat( andreas.name().get(), equalTo( "Andreas" ) );
+            Person lars = peopleRepository.findPersonByName( "Lars" );
+            assertThat( lars.name().get(), equalTo( "Lars" ) );
+            Person mia = peopleRepository.findPersonByName( "Mia" );
+            assertThat( mia.name().get(), equalTo( "Mia" ) );
+        }
+    }
+
+    @Test
+    public void givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            PhoneNumber newNumber = peopleRepository.createPhoneNumber( "+86-185-21320803" );
+            niclas.phoneNumbers().put( "Mobile", newNumber );
+            uow.complete();
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            NamedAssociation<PhoneNumber> numbers = niclas.phoneNumbers();
+            assertThat( numbers.count(), equalTo( 2 ) );
+            PhoneNumber mobile = numbers.get( "Mobile" );
+            assertThat( mobile.countryCode().get(), equalTo( 86 ) );
+            assertThat( mobile.areaCode().get(), equalTo( 185 ) );
+            assertThat( mobile.number().get(), equalTo( "21320803" ) );
+            PhoneNumber home = numbers.get( "Home" );
+            assertThat( home.countryCode().get(), equalTo( 60 ) );
+            assertThat( home.areaCode().get(), equalTo( 16 ) );
+            assertThat( home.number().get(), equalTo( "7636344" ) );
+        }
+    }
+
+    @Test
+    public void whenIteratingNamedAssociationExpectIterationInOrder()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenIteratingNamedAssociationExpectIterationToSucceed" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            PhoneNumber newNumber1 = peopleRepository.createPhoneNumber( "+86-185-21320803" );
+            niclas.phoneNumbers().put( "Chinese", newNumber1 );
+            PhoneNumber newNumber2 = peopleRepository.createPhoneNumber( "+46-70-9876543" );
+            niclas.phoneNumbers().put( "Swedish", newNumber2 );
+            PhoneNumber newNumber3 = peopleRepository.createPhoneNumber( "+49-444-2832989823" );
+            niclas.phoneNumbers().put( "German", newNumber3 );
+            uow.complete();
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenIteratingNamedAssociationExpectIterationToSucceed" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            assertThat( niclas.phoneNumbers(), containsInAnyOrder( "Home", "Chinese", "Swedish", "German" ) );
+        }
+    }
+
+    @Test
+    public void givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            PhoneNumber newNumber = peopleRepository.createPhoneNumber( "+86-185-21320803" );
+            niclas.phoneNumbers().put( "Home", newNumber );
+            uow.complete();
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            NamedAssociation<PhoneNumber> numbers = niclas.phoneNumbers();
+            assertThat( numbers.count(), equalTo( 1 ) );
+            PhoneNumber home = numbers.get( "Home" );
+            assertThat( home.countryCode().get(), equalTo( 86 ) );
+            assertThat( home.areaCode().get(), equalTo( 185 ) );
+            assertThat( home.number().get(), equalTo( "21320803" ) );
+        }
+    }
+
+    @Test
+    public void whenNullingOptionalAssociationExpectSuccess()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenNullingOptionalAssociationExpectSuccess" ) ) )
+        {
+            Person toni = peopleRepository.findPersonByName( "Toni" );
+            toni.spouse().set( null );
+            uow.complete();
+        }
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void whenNullingNonOptionalAssociationExpectFailure()
+    {
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenNullingOptionalAssociationExpectSuccess" ) ) )
+        {
+            Person toni = peopleRepository.findPersonByName( "Toni" );
+            toni.nationality().set( null );
+            uow.complete();
+        }
+    }
+
+    @Test
+    public void whenRemovingEntityExpectAggregatedEntitiesToBeRemoved()
+    {
+        Identity homePhoneId;
+        Identity chinesePhoneId;
+        Identity germanPhoneId;
+        Identity swedishPhoneId;
+        Identity switzerlandId;
+        Identity malaysiaId;
+        Identity canaryId;
+        Identity despairStId;
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            PhoneNumber newNumber1 = peopleRepository.createPhoneNumber( "+86-185-21320803" );
+            niclas.phoneNumbers().put( "Chinese", newNumber1 );
+            PhoneNumber newNumber2 = peopleRepository.createPhoneNumber( "+46-70-9876543" );
+            niclas.phoneNumbers().put( "Swedish", newNumber2 );
+            PhoneNumber newNumber3 = peopleRepository.createPhoneNumber( "+49-444-2832989823" );
+            niclas.phoneNumbers().put( "German", newNumber3 );
+            homePhoneId = niclas.phoneNumbers().get( "Home" ).identity().get();
+            swedishPhoneId = niclas.phoneNumbers().get( "Swedish" ).identity().get();
+            chinesePhoneId = niclas.phoneNumbers().get( "Chinese" ).identity().get();
+            germanPhoneId = niclas.phoneNumbers().get( "German" ).identity().get();
+
+            City zurich = peopleRepository.findCity( zurichId );
+            Country switzerland = peopleRepository.findCountryByCountryCode( "ch" );
+            niclas.movedToNewAddress( "DespairStreet 12A", "43HQ21", zurich, switzerland, objectFactory.newObject( Rent.Builder.class ).create( 1000, "EUR" ) );
+            uow.complete();
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            assertThat( niclas.nationality().get().name().get(), equalTo( "Sweden" ) );
+            assertThat( niclas.oldAddresses().count(), equalTo( 1 ) );
+            assertThat( niclas.address().get().country().get().name().get(), equalTo( "Switzerland" ) );
+            canaryId = niclas.oldAddresses().get( 0 ).identity().get();
+            despairStId = niclas.address().get().identity().get();
+            malaysiaId = niclas.oldAddresses().get( 0 ).country().get().identity().get();
+            switzerlandId = niclas.address().get().country().get().identity().get();
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            uow.remove( niclas );
+            uow.complete();
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+        }
+        catch( NoSuchEntityException e )
+        {
+            // expected
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            peopleRepository.findPhoneNumberById( homePhoneId );
+        }
+        catch( NoSuchEntityException e )
+        {
+            // expected
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            peopleRepository.findPhoneNumberById( chinesePhoneId );
+        }
+        catch( NoSuchEntityException e )
+        {
+            // expected
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            peopleRepository.findPhoneNumberById( swedishPhoneId );
+        }
+        catch( NoSuchEntityException e )
+        {
+            // expected
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            peopleRepository.findPhoneNumberById( germanPhoneId );
+        }
+        catch( NoSuchEntityException e )
+        {
+            // expected
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            peopleRepository.findAddress( canaryId );
+        }
+        catch( NoSuchEntityException e )
+        {
+            // expected
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            peopleRepository.findAddress( despairStId );
+        }
+        catch( NoSuchEntityException e )
+        {
+            // expected
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        {
+            peopleRepository.findCountryByIdentity( switzerlandId );
+            peopleRepository.findCountryByIdentity( malaysiaId );
+
+            peopleRepository.findPersonByName( "Peter" );
+            peopleRepository.findPersonByName( "Andreas" );
+            peopleRepository.findPersonByName( "Toni" );
+            peopleRepository.findPersonByName( "Paul" );
+        }
+    }
+
+    @Test( expected = IllegalStateException.class )
+    public void whenNoActiveUnitOfWorkExpectIllegalStateException()
+    {
+        peopleRepository.findCountryByIdentity( switzerlandId );
+    }
+
+    @Test
+    public void givenEntityInheritanceWhenStoreRetrieveExpectSuccess()
+    {
+        Currency.Builder currencyBuilder = transientBuilderFactory.newTransient( Currency.Builder.class );
+        Identity willId;
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenEntityInheritanceWhenStoreRetrieveExpectSuccess" ) ) )
+        {
+            Person peter = peopleRepository.findPersonByName( "Peter" );
+            Person kalle = peopleRepository.findPersonByName( "Kalle" );
+            Person oscar = peopleRepository.findPersonByName( "Oscar" );
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            Person andreas = peopleRepository.findPersonByName( "Andreas" );
+            Map<Person, Currency> amountsMap = new HashMap<>();
+            Map<Person, Float> percentagesMap = new HashMap<>();
+            Map<Person, String> specificItemsMap = new HashMap<>();
+            amountsMap.put( niclas, currencyBuilder.create( 10, "USD" ) );
+            percentagesMap.put( kalle, 50f );
+            percentagesMap.put( oscar, 50f );
+            specificItemsMap.put( niclas, "Toothpick Collection\n" );
+            specificItemsMap.put( andreas, "Black/Yellow Lederhosen\n" );
+            Will will = legalService.createWill( peter, amountsMap, percentagesMap, specificItemsMap );
+            willId = will.identity().get();
+            uow.complete();
+        }
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenEntityInheritanceWhenStoreRetrieveExpectSuccess" ) ) )
+        {
+            Person kalle = peopleRepository.findPersonByName( "Kalle" );
+            Person oscar = peopleRepository.findPersonByName( "Oscar" );
+            Person niclas = peopleRepository.findPersonByName( "Niclas" );
+            Person andreas = peopleRepository.findPersonByName( "Andreas" );
+
+            Will will = legalService.findWillById(willId);
+            List<WillAmount> amounts = will.amounts().get();
+            List<WillPercentage> percentages = will.percentages().get();
+            List<WillItem> items = will.items().get();
+            assertThat( amounts.size(), equalTo( 1 ) );
+            assertThat( percentages.size(), equalTo( 2 ) );
+            assertThat( items.size(), equalTo( 2 ) );
+
+            WillAmount willAmount = amounts.get( 0 );
+            assertThat( willAmount.amount().get(), equalTo( currencyBuilder.create( 10, "USD" ) ) );
+
+            WillPercentage kallePercentage = legalService.createPercentage( kalle, 50 );
+            WillPercentage oscarPercentage = legalService.createPercentage( oscar, 50 );
+            assertThat( percentages, containsInAnyOrder( kallePercentage, oscarPercentage ) );
+
+            WillItem niclasItem = legalService.createItem( niclas, "Toothpick Collection\n" );
+            WillItem andreasItem = legalService.createItem( andreas, "Black/Yellow Lederhosen\n" );
+            assertThat( items, containsInAnyOrder( niclasItem, andreasItem ) );
+        }
+    }
+
+    private void testData()
+    {
+        Country malaysia = peopleRepository.createCountry( "my", "Malaysia" );
+        malaysiaId = malaysia.identity().get();
+        Country us = peopleRepository.createCountry( "us", "United States" );
+        usId = us.identity().get();
+        Country sweden = peopleRepository.createCountry( "se", "Sweden" );
+        swedenId = sweden.identity().get();
+        Country germany = peopleRepository.createCountry( "de", "Germany" );
+        germanyId = germany.identity().get();
+        Country denmark = peopleRepository.createCountry( "dk", "Denmark" );
+        denmarkId = denmark.identity().get();
+        Country france = peopleRepository.createCountry( "fr", "France" );
+        franceId = france.identity().get();
+        Country switzerland = peopleRepository.createCountry( "ch", "Switzerland" );
+        switzerlandId = switzerland.identity().get();
+        City cheras = peopleRepository.createCity( "Cheras" );
+        cherasId = cheras.identity().get();
+        City malmo = peopleRepository.createCity( "Malmo" );
+        malmoId = malmo.identity().get();
+        City hannover = peopleRepository.createCity( "Hannover" );
+        hannoverId = hannover.identity().get();
+        City montpellier = peopleRepository.createCity( "Montpellier" );
+        montpellierId = montpellier.identity().get();
+        City kualalumpur = peopleRepository.createCity( "Kuala Lumpur" );
+        kualaLumpurId = kualalumpur.identity().get();
+        City zurich = peopleRepository.createCity( "Zurich" );
+        zurichId = zurich.identity().get();
+        Rent.Builder rentBuilder = objectFactory.newObject( Rent.Builder.class );
+        Rent rentCanary = rentBuilder.create( 3000, "MYR" );
+        Rent rentVarnhem = rentBuilder.create( 9000, "SEK" );
+        Rent rentUnknown1 = rentBuilder.create( 1000, "EUR" );
+        Rent rentUnknown2 = rentBuilder.create( 1500, "EUR" );
+        Rent rentUnknown3 = rentBuilder.create( 2000, "CHF" );
+        Address canaryResidence = peopleRepository.createAddress( "10, CH5A, Jalan Cheras Hartamas", "43200", cheras, malaysia, rentCanary );
+        canaryId = canaryResidence.identity().get();
+        Address varnhem = peopleRepository.createAddress( "Varnhemsgatan 25", "215 00", malmo, sweden, rentVarnhem );
+        varnhemId = varnhem.identity().get();
+        Address unknown1 = peopleRepository.createAddress( "", "", montpellier, france, rentUnknown1 );
+        unknown1Id = unknown1.identity().get();
+        Address unknown2 = peopleRepository.createAddress( "", "", hannover, germany, rentUnknown2 );
+        unknown2Id = unknown2.identity().get();
+        Address unknown3 = peopleRepository.createAddress( "", "", zurich, switzerland, rentUnknown3 );
+        unknown3Id = unknown3.identity().get();
+        Address angkasaImpian = peopleRepository.createAddress( "B-19-4, Jalan Sehabat", "50200", kualalumpur, malaysia, rentCanary );
+        angkasaImpian4Id = angkasaImpian.identity().get();
+        Person eric = peopleRepository.createPerson( "Eric", malaysia, canaryResidence, null, null );
+        Person niclas = peopleRepository.createPerson( "Niclas", sweden, canaryResidence, null, peopleRepository.createPhoneNumber( "+60-16-7636344" ) );
+        niclas.children().add( eric );
+        Person kalle = peopleRepository.createPerson( "Kalle", sweden, varnhem, null, null );
+        Person oscar = peopleRepository.createPerson( "Oscar", sweden, varnhem, null, null );
+        Person peter = peopleRepository.createPerson( "Peter", germany, varnhem, null, peopleRepository.createPhoneNumber( "+46-70-1234567" ) );
+        peter.children().add( kalle );
+        peter.children().add( oscar );
+        Person paul = peopleRepository.createPerson( "Paul", france, unknown1, null, peopleRepository.createPhoneNumber( "+33-88-333666999" ) );
+        Person janna = peopleRepository.createPerson( "Janna", france, unknown2, null, peopleRepository.createPhoneNumber( "+49-11-22334455" ) );
+        Person toni = peopleRepository.createPerson( "Toni", france, unknown2, janna, peopleRepository.createPhoneNumber( "+49-12-99887766" ) );
+        janna.spouse().set( toni );
+        Person andreas = peopleRepository.createPerson( "Andreas", germany, unknown3, null, peopleRepository.createPhoneNumber( "+41-98-1234567" ) );
+        Person mia = peopleRepository.createPerson( "Mia", malaysia, angkasaImpian, null, null );
+        Person lars = peopleRepository.createPerson( "Lars", denmark, angkasaImpian, mia, null );
+        mia.spouse().set( lars );
+        NamedAssociation<Person> niclasRels = niclas.relationships();
+        niclasRels.put( FRIEND, peter );
+        niclasRels.put( FRIEND, toni );
+        niclasRels.put( FRIEND, andreas );
+        niclasRels.put( FRIEND, paul );
+        niclasRels.put( COLLEAGUE, toni );
+        niclasRels.put( COLLEAGUE, andreas );
+    }
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/LegalService.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/LegalService.java
new file mode 100644
index 0000000..6079a2e
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/LegalService.java
@@ -0,0 +1,142 @@
+/*
+ *  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.polygene.test.entity.model.legal;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import org.apache.polygene.api.entity.EntityBuilder;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.identity.StringIdentity;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation;
+import org.apache.polygene.api.value.ValueBuilder;
+import org.apache.polygene.api.value.ValueBuilderFactory;
+import org.apache.polygene.test.entity.model.monetary.Currency;
+import org.apache.polygene.test.entity.model.people.Person;
+
+@Mixins( LegalService.Mixin.class )
+public interface LegalService
+{
+    @UnitOfWorkPropagation
+    Will findWillById( Identity willId );
+
+    @UnitOfWorkPropagation
+    Will createWill( Person principal, Map<Person, Currency> amounts, Map<Person, Float> percentages, Map<Person, String> specificItems );
+
+    WillPercentage createPercentage( Person beneficiary, float percentage );
+
+    WillItem createItem( Person beneficiary, String item );
+
+    class Mixin
+        implements LegalService
+    {
+        @Structure
+        private ValueBuilderFactory vbf;
+
+        @Structure
+        private UnitOfWorkFactory uowf;
+
+        @Override
+        public Will findWillById( Identity willId )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            return uow.get( Will.class, willId );
+        }
+
+        @Override
+        public Will createWill( Person principal, Map<Person, Currency> amounts, Map<Person, Float> percentages, Map<Person, String> specificItems )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            Identity identity = StringIdentity.identityOf( "will-" + principal.name().get() );
+            EntityBuilder<Will> builder = uow.newEntityBuilder( Will.class, identity );
+            List<WillAmount> amountsList = new ArrayList<>();
+            for( Map.Entry<Person, Currency> entry : amounts.entrySet() )
+            {
+                WillAmount amount = createAmount( entry.getKey(), entry.getValue() );
+                amountsList.add( amount );
+            }
+            List<WillPercentage> percentagesList = new ArrayList<>();
+            for( Map.Entry<Person, Float> entry : percentages.entrySet() )
+            {
+                WillPercentage amount = createPercentage( entry.getKey(), entry.getValue() );
+                percentagesList.add( amount );
+            }
+            List<WillItem> itemsList = new ArrayList<>();
+            for( Map.Entry<Person, String> entry : specificItems.entrySet() )
+            {
+                String value = entry.getValue();
+                WillItem amount = createItem( entry.getKey(), value );
+                itemsList.add( amount );
+            }
+            Will instance = builder.instance();
+            instance.principal().set(principal);
+            instance.percentages().set( percentagesList );
+            instance.amounts().set( amountsList );
+            instance.items().set( itemsList );
+            return builder.newInstance();
+        }
+
+        private WillAmount createAmount( Person beneficiary, Currency amount )
+        {
+            ValueBuilder<WillAmount> builder = vbf.newValueBuilder( WillAmount.class );
+            builder.prototype().amount().set( amount );
+            builder.prototype().beneficiary().set( beneficiary );
+            return builder.newInstance();
+        }
+
+        private WillPercentage createPercentage( Person beneficiary, Float percentage )
+        {
+            ValueBuilder<WillPercentage> builder = vbf.newValueBuilder( WillPercentage.class );
+            builder.prototype().percentage().set( percentage );
+            builder.prototype().beneficiary().set( beneficiary );
+            return builder.newInstance();
+        }
+
+        private WillItem createItem( Person beneficiary, String item, String description )
+        {
+            ValueBuilder<WillItem> builder = vbf.newValueBuilder( WillItem.class );
+            builder.prototype().item().set( item );
+            builder.prototype().description().set( description );
+            builder.prototype().beneficiary().set( beneficiary );
+            return builder.newInstance();
+        }
+
+        public WillItem createItem( Person beneficiary, String value )
+        {
+            int pos = value.indexOf( '\n' );
+            String item = value.substring( 0, pos );
+            String description = value.substring( pos + 1 );
+            return createItem( beneficiary, item, description );
+        }
+
+        public WillPercentage createPercentage( Person beneficiary, float percentage )
+        {
+            ValueBuilder<WillPercentage> builder = vbf.newValueBuilder( WillPercentage.class );
+            builder.prototype().beneficiary().set( beneficiary );
+            builder.prototype().percentage().set( percentage );
+            return builder.newInstance();
+        }
+
+    }
+}
diff --git a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/Will.java
similarity index 60%
copy from extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
copy to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/Will.java
index dd124b8..dd41bba 100644
--- a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/Will.java
@@ -17,23 +17,24 @@
  *
  *
  */
-package org.apache.polygene.entitystore.hazelcast;
+package org.apache.polygene.test.entity.model.legal;
 
-import org.apache.polygene.api.common.UseDefaults;
+import java.util.List;
+import org.apache.polygene.api.association.Association;
+import org.apache.polygene.api.association.ManyAssociation;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.property.Property;
+import org.apache.polygene.test.entity.model.people.Person;
 
-/**
- * Configuration of HazelcastEntityStoreService.
- */
-// START SNIPPET: config
-public interface HazelcastConfiguration
+public interface Will extends HasIdentity
 {
+    Association<Person> principal();
 
-    @UseDefaults
-    Property<String> configXmlLocation();
+    ManyAssociation<Person> witnesses();
 
-    @UseDefaults
-    Property<String> mapName();
+    Property<List<WillItem>> items();
 
+    Property<List<WillPercentage>> percentages();
+
+    Property<List<WillAmount>> amounts();
 }
-// END SNIPPET: config
diff --git a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillAmount.java
similarity index 74%
copy from core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
copy to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillAmount.java
index cd32a3a..52b4b58 100644
--- a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillAmount.java
@@ -17,11 +17,13 @@
  *
  *
  */
-package org.apache.polygene.api.property;
+package org.apache.polygene.test.entity.model.legal;
 
-import java.util.function.BiFunction;
-import org.apache.polygene.api.structure.Module;
+import java.math.BigDecimal;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.test.entity.model.monetary.Currency;
 
-public interface InitialValueProvider extends BiFunction<Module, PropertyDescriptor, Object>
+public interface WillAmount extends WillBenefit
 {
+    Property<Currency> amount();
 }
diff --git a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillBenefit.java
similarity index 65%
copy from extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
copy to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillBenefit.java
index dd124b8..3c44e7a 100644
--- a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillBenefit.java
@@ -17,23 +17,21 @@
  *
  *
  */
-package org.apache.polygene.entitystore.hazelcast;
+package org.apache.polygene.test.entity.model.legal;
 
-import org.apache.polygene.api.common.UseDefaults;
+import org.apache.polygene.api.association.Association;
+import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.property.Property;
+import org.apache.polygene.test.entity.model.people.Person;
 
-/**
- * Configuration of HazelcastEntityStoreService.
- */
-// START SNIPPET: config
-public interface HazelcastConfiguration
+public interface WillBenefit
 {
+    Association<Person> beneficiary();
 
-    @UseDefaults
-    Property<String> configXmlLocation();
+    @Optional
+    Property<String> condition();
 
-    @UseDefaults
-    Property<String> mapName();
-
+    @Optional
+    Association<Person> alternateBeneficiary();
 }
-// END SNIPPET: config
diff --git a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillItem.java
similarity index 78%
rename from core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
rename to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillItem.java
index cd32a3a..abcafe3 100644
--- a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillItem.java
@@ -17,11 +17,14 @@
  *
  *
  */
-package org.apache.polygene.api.property;
+package org.apache.polygene.test.entity.model.legal;
 
-import java.util.function.BiFunction;
-import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.property.Property;
 
-public interface InitialValueProvider extends BiFunction<Module, PropertyDescriptor, Object>
+public interface WillItem extends WillBenefit
 {
+    Property<String> item();
+
+    Property<String> description();
+
 }
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillPercentage.java
similarity index 79%
copy from tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl
copy to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillPercentage.java
index e2629d5..dc34dd2 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/legal/WillPercentage.java
@@ -1,4 +1,4 @@
-<%#
+/*
  *  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
@@ -16,8 +16,12 @@
  *  limitations under the License.
  *
  *
--%>
--
-<% for( var idx in polygene.current.yaml ) {
-%>    <%- polygene.current.yaml[idx]; %>
-<% } %>
+ */
+package org.apache.polygene.test.entity.model.legal;
+
+import org.apache.polygene.api.property.Property;
+
+public interface WillPercentage extends WillBenefit
+{
+    Property<Float> percentage();
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/monetary/CheckBookSlip.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/monetary/CheckBookSlip.java
new file mode 100644
index 0000000..956b01d
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/monetary/CheckBookSlip.java
@@ -0,0 +1,58 @@
+/*
+ *  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.polygene.test.entity.model.monetary;
+
+import org.apache.polygene.api.injection.scope.This;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.property.Property;
+
+@Mixins( CheckBookSlip.CheckBookSlipMixin.class )
+public interface CheckBookSlip
+{
+    String name();
+
+    Currency amount();
+
+    interface State
+    {
+        Property<String> name();
+
+        Property<Currency> amount();
+    }
+
+    class CheckBookSlipMixin
+        implements CheckBookSlip
+    {
+        @This
+        private State state;
+
+        @Override
+        public String name()
+        {
+            return state.name().get();
+        }
+
+        @Override
+        public Currency amount()
+        {
+            return state.amount().get();
+        }
+    }
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/monetary/Currency.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/monetary/Currency.java
new file mode 100644
index 0000000..88a1c31
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/monetary/Currency.java
@@ -0,0 +1,60 @@
+/*
+ *  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.polygene.test.entity.model.monetary;
+
+import java.math.BigDecimal;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.api.value.ValueBuilder;
+import org.apache.polygene.api.value.ValueBuilderFactory;
+
+public interface Currency
+{
+    Property<BigDecimal> amount();
+    Property<String> name();
+
+    @Mixins( Currency.BuilderImpl.class)
+    interface Builder
+    {
+        Currency create( int amount, String currencyName );
+        Currency create( BigDecimal amount, String currencyName );
+    }
+
+    class BuilderImpl
+        implements Builder
+    {
+        @Structure
+        private ValueBuilderFactory vbf;
+
+        public Currency create( int amount, String currencyName )
+        {
+            return create( new BigDecimal( amount ), currencyName );
+        }
+
+        public Currency create( BigDecimal amount, String currencyName )
+        {
+            ValueBuilder<Currency> builder = vbf.newValueBuilder( Currency.class );
+            builder.prototype().name().set( currencyName );
+            builder.prototype().amount().set( amount );
+            return builder.newInstance();
+        }
+    }
+}
diff --git a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Address.java
similarity index 70%
rename from extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
rename to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Address.java
index dd124b8..cc6a426 100644
--- a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Address.java
@@ -17,23 +17,21 @@
  *
  *
  */
-package org.apache.polygene.entitystore.hazelcast;
+package org.apache.polygene.test.entity.model.people;
 
-import org.apache.polygene.api.common.UseDefaults;
+import org.apache.polygene.api.association.Association;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.property.Property;
 
-/**
- * Configuration of HazelcastEntityStoreService.
- */
-// START SNIPPET: config
-public interface HazelcastConfiguration
+public interface Address extends HasIdentity
 {
+    Property<Rent> rent();
 
-    @UseDefaults
-    Property<String> configXmlLocation();
+    Property<String> street();
 
-    @UseDefaults
-    Property<String> mapName();
+    Association<City> city();
 
+    Property<String> zipCode();
+
+    Association<Country> country();
 }
-// END SNIPPET: config
diff --git a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/City.java
similarity index 77%
copy from core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
copy to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/City.java
index cd32a3a..25078c0 100644
--- a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/City.java
@@ -17,11 +17,12 @@
  *
  *
  */
-package org.apache.polygene.api.property;
+package org.apache.polygene.test.entity.model.people;
 
-import java.util.function.BiFunction;
-import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.property.Property;
 
-public interface InitialValueProvider extends BiFunction<Module, PropertyDescriptor, Object>
+public interface City extends HasIdentity
 {
+    Property<String> name();
 }
diff --git a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Country.java
similarity index 77%
copy from core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
copy to core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Country.java
index cd32a3a..cc0800b 100644
--- a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Country.java
@@ -17,11 +17,12 @@
  *
  *
  */
-package org.apache.polygene.api.property;
+package org.apache.polygene.test.entity.model.people;
 
-import java.util.function.BiFunction;
-import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.property.Property;
 
-public interface InitialValueProvider extends BiFunction<Module, PropertyDescriptor, Object>
+public interface Country extends HasIdentity
 {
+    Property<String> name();
 }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/PeopleRepository.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/PeopleRepository.java
new file mode 100644
index 0000000..7e31aab9
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/PeopleRepository.java
@@ -0,0 +1,183 @@
+/*
+ *  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.polygene.test.entity.model.people;
+
+import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.entity.EntityBuilder;
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+
+import static org.apache.polygene.api.identity.StringIdentity.identityOf;
+
+@Mixins( PeopleRepository.Mixin.class )
+public interface PeopleRepository
+{
+    Person createPerson( String name, Country nationality, @Optional Address address, @Optional Person spouse, @Optional PhoneNumber homeNumber );
+
+    void addChild( Person parent, Person child );
+
+    Person findPersonByName( String name );
+
+    Country createCountry( String countryCode, String countryName );
+
+    Country findCountryByCountryCode( String countryCode );
+
+    Country findCountryByIdentity( Identity countryId );
+
+    Address createAddress( String street, String zipCode, City city, Country country, Rent rent );
+
+    Address findAddress( Identity addressId );
+
+    City createCity( String cityName );
+
+    City findCity( Identity cityId );
+
+    PhoneNumber createPhoneNumber( String phoneNumberString );
+
+    PhoneNumber findPhoneNumberById( Identity phoneNumberId );
+
+    class Mixin
+        implements PeopleRepository
+    {
+        @Structure
+        private UnitOfWorkFactory uowf;
+
+        @Override
+        public Person createPerson( String name, Country nationality, Address address, Person spouse, PhoneNumber homeNumber )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            EntityBuilder<Person> builder = uow.newEntityBuilder( Person.class, identityOf( "person-" + name ) );
+            Person instance = builder.instance();
+            instance.name().set( name );
+            instance.nationality().set( nationality );
+            instance.address().set( address );
+            instance.spouse().set( spouse );
+            if( homeNumber != null )
+            {
+                instance.phoneNumbers().put( "Home", homeNumber );
+            }
+            return builder.newInstance();
+        }
+
+        @Override
+        public void addChild( Person parent, Person child )
+        {
+            parent.children().add( child );
+        }
+
+        @Override
+        public Person findPersonByName( String name )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            return uow.get( Person.class, identityOf( "person-" + name ) );
+        }
+
+        @Override
+        public Country createCountry( String countryCode, String countryName )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            EntityBuilder<Country> builder = uow.newEntityBuilder( Country.class, identityOf( "country-" + countryCode ) );
+            builder.instance().name().set( countryName );
+            return builder.newInstance();
+        }
+
+        @Override
+        public Country findCountryByCountryCode( String countryCode )
+        {
+
+            return findCountryByIdentity( identityOf( "country-" + countryCode ) );
+        }
+
+        @Override
+        public Country findCountryByIdentity( Identity countryId )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            return uow.get( Country.class, countryId );
+        }
+
+        @Override
+        public Address createAddress( String street, String zipCode, City city, Country country, Rent rent )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            EntityBuilder<Address> builder = uow.newEntityBuilder( Address.class );
+            Address prototype = builder.instance();
+            prototype.street().set( street );
+            prototype.zipCode().set( zipCode );
+            prototype.city().set( city );
+            prototype.country().set( country );
+            prototype.rent().set( rent );
+            return builder.newInstance();
+        }
+
+        @Override
+        public Address findAddress( Identity addressId )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            return uow.get( Address.class, addressId );
+        }
+
+        @Override
+        public City createCity( String cityName )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            EntityBuilder<City> builder = uow.newEntityBuilder( City.class );
+            builder.instance().name().set( cityName );
+            return builder.newInstance();
+        }
+
+        @Override
+        public City findCity( Identity cityId )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            return uow.get( City.class, cityId );
+        }
+
+        @Override
+        public PhoneNumber createPhoneNumber( String phoneNumberString )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            EntityBuilder<PhoneNumber> builder = uow.newEntityBuilder( PhoneNumber.class );
+            PhoneNumber prototype = builder.instance();
+
+            // Of course better parsing should be done for a real application.
+            int pos1 = phoneNumberString.indexOf( '-' );
+            int pos2 = phoneNumberString.indexOf( '-', pos1 + 1 );
+            String countryCode = phoneNumberString.substring( 1, pos1 );
+            String areaCode = phoneNumberString.substring( pos1 + 1, pos2 );
+            String number = phoneNumberString.substring( pos2 + 1 );
+
+            prototype.countryCode().set( Integer.parseInt( countryCode ) );
+            prototype.areaCode().set( Integer.parseInt( areaCode ) );
+            prototype.number().set( number );
+
+            return builder.newInstance();
+        }
+
+        @Override
+        public PhoneNumber findPhoneNumberById( Identity phoneNumberId )
+        {
+            UnitOfWork uow = uowf.currentUnitOfWork();
+            return uow.get( PhoneNumber.class, phoneNumberId );
+        }
+    }
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Person.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Person.java
new file mode 100644
index 0000000..ac110a0
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Person.java
@@ -0,0 +1,89 @@
+/*
+ *  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.polygene.test.entity.model.people;
+
+import org.apache.polygene.api.association.Association;
+import org.apache.polygene.api.association.ManyAssociation;
+import org.apache.polygene.api.association.NamedAssociation;
+import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.entity.Aggregated;
+import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.injection.scope.Service;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation;
+
+@Mixins( Person.Mixin.class )
+public interface Person extends HasIdentity
+{
+    @UnitOfWorkPropagation( UnitOfWorkPropagation.Propagation.MANDATORY )
+    void movedToNewAddress( String street, String zipCode, City city, Country country, Rent rent );
+
+    @UnitOfWorkPropagation( UnitOfWorkPropagation.Propagation.MANDATORY )
+    void amendAddress( String street, String zipCode, City city, Country country );
+
+    Property<String> name();
+
+    Association<Country> nationality();
+
+    @Aggregated
+    Association<Address> address();
+
+    @Optional
+    Association<Person> spouse();
+
+    ManyAssociation<Person> children();
+
+    @Aggregated
+    ManyAssociation<Address> oldAddresses();
+
+    NamedAssociation<Person> relationships();
+
+    @Aggregated
+    NamedAssociation<PhoneNumber> phoneNumbers();
+
+    abstract class Mixin
+        implements Person
+    {
+        @Structure
+        private UnitOfWorkFactory uowf;
+
+        @Service
+        private PeopleRepository repository;
+
+        @Override
+        public void movedToNewAddress( String street, String zipCode, City city, Country country, Rent rent )
+        {
+            Address newAddress = repository.createAddress( street, zipCode, city, country, rent );
+            Address oldAddress = address().get();
+            oldAddresses().add( oldAddress );
+            address().set( newAddress );
+        }
+
+        @Override
+        public void amendAddress( String street, String zipCode, City city, Country country )
+        {
+            Address newAddress = repository.createAddress( street, zipCode, city, country, address().get().rent().get() );
+            address().set( newAddress );
+        }
+    }
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/PhoneNumber.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/PhoneNumber.java
new file mode 100644
index 0000000..c711eab
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/PhoneNumber.java
@@ -0,0 +1,55 @@
+/*
+ *  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.polygene.test.entity.model.people;
+
+import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.api.value.ValueBuilder;
+import org.apache.polygene.api.value.ValueBuilderFactory;
+
+public interface PhoneNumber extends HasIdentity
+{
+    Property<Integer> countryCode();
+
+    Property<Integer> areaCode();
+
+    Property<String> number();
+
+    class Builder
+    {
+        private final ValueBuilder<PhoneNumber> valueBuilder;
+        private final PhoneNumber prototype;
+
+        public Builder( @Structure ValueBuilderFactory vbf )
+        {
+            valueBuilder = vbf.newValueBuilder( PhoneNumber.class );
+            prototype = valueBuilder.prototype();
+        }
+
+        PhoneNumber create( int countryCode, int areaCode, String number )
+        {
+            prototype.countryCode().set( countryCode );
+            prototype.areaCode().set( areaCode );
+            prototype.number().set( number );
+            return valueBuilder.newInstance();
+        }
+    }
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Rent.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Rent.java
new file mode 100644
index 0000000..68999b6
--- /dev/null
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/people/Rent.java
@@ -0,0 +1,53 @@
+/*
+ *  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.polygene.test.entity.model.people;
+
+import org.apache.polygene.api.composite.TransientBuilderFactory;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.object.ObjectFactory;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.api.value.ValueBuilder;
+import org.apache.polygene.api.value.ValueBuilderFactory;
+import org.apache.polygene.test.entity.model.monetary.Currency;
+
+public interface Rent
+{
+    Property<Currency> amount();
+
+    class Builder
+    {
+        private final Currency.Builder currencyBuilder;
+
+        @Structure
+        private ValueBuilderFactory vbf;
+
+        public Builder( @Structure TransientBuilderFactory tbf )
+        {
+            currencyBuilder = tbf.newTransient( Currency.Builder.class );
+        }
+
+        public Rent create( int amount, String currency )
+        {
+            ValueBuilder<Rent> builder = vbf.newValueBuilder( Rent.class );
+            builder.prototype().amount().set( currencyBuilder.create( amount, currency ) );
+            return builder.newInstance();
+        }
+    }
+}
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractAnyQueryTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractAnyQueryTest.java
index b2872e9..eb3ffa0 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractAnyQueryTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractAnyQueryTest.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
@@ -49,7 +48,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         assembleEntities( module, Visibility.module );
         assembleValues( module, Visibility.module );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java
index f005398..c5d1d99 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java
@@ -465,7 +465,7 @@
     {
         QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
         Person person = templateFor( Person.class );
-        Domain gaming = unitOfWork.get( Domain.class, new StringIdentity( "Gaming" ) );
+        Domain gaming = unitOfWork.get( Domain.class, StringIdentity.identityOf( "Gaming" ) );
         Query<Person> query = unitOfWork.newQuery( qb.where( contains( person.interests(), gaming ) ) );
         System.out.println( "*** script33: " + query );
 
@@ -477,7 +477,7 @@
     {
         QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
         Person person = templateFor( Person.class );
-        Female annDoe = unitOfWork.get( Female.class, new StringIdentity( "anndoe" ) );
+        Female annDoe = unitOfWork.get( Female.class, StringIdentity.identityOf( "anndoe" ) );
         Query<Person> query = unitOfWork.newQuery( qb.where( eq( person.mother(), annDoe ) ) );
         System.out.println( "*** script34: " + query );
 
@@ -500,7 +500,7 @@
     {
         QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
         Person person = templateFor( Person.class );
-        Account anns = unitOfWork.get( Account.class, new StringIdentity( "accountOfAnnDoe" ) );
+        Account anns = unitOfWork.get( Account.class, StringIdentity.identityOf( "accountOfAnnDoe" ) );
         Query<Person> query = unitOfWork.newQuery( qb.where( contains( person.accounts(), anns ) ) );
         System.out.println( "*** script36: " + query );
 
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/TestData.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/TestData.java
index aaa8bac..5434005 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/TestData.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/TestData.java
@@ -59,7 +59,7 @@
             NameableAssert.clear();
             Domain gaming;
             {
-                EntityBuilder<Domain> domainBuilder = unitOfWork.newEntityBuilder( Domain.class, new StringIdentity( "Gaming" ) );
+                EntityBuilder<Domain> domainBuilder = unitOfWork.newEntityBuilder( Domain.class, StringIdentity.identityOf( "Gaming" ) );
                 gaming = domainBuilder.instance();
                 gaming.name().set( "Gaming" );
                 gaming.description().set( "Gaming domain" );
@@ -121,7 +121,7 @@
 
             Account annsAccount;
             {
-                EntityBuilder<Account> accountBuilder = unitOfWork.newEntityBuilder( Account.class, new StringIdentity( "accountOfAnnDoe" ) );
+                EntityBuilder<Account> accountBuilder = unitOfWork.newEntityBuilder( Account.class, StringIdentity.identityOf( "accountOfAnnDoe" ) );
                 annsAccount = accountBuilder.instance();
                 annsAccount.number().set( "accountOfAnnDoe" );
                 annsAccount = accountBuilder.newInstance();
@@ -129,7 +129,7 @@
 
             Account jacksAccount;
             {
-                EntityBuilder<Account> accountBuilder = unitOfWork.newEntityBuilder( Account.class, new StringIdentity( "accountOfJackDoe" ) );
+                EntityBuilder<Account> accountBuilder = unitOfWork.newEntityBuilder( Account.class, StringIdentity.identityOf( "accountOfJackDoe" ) );
                 jacksAccount = accountBuilder.instance();
                 jacksAccount.number().set( "accountOfJackDoe" );
                 jacksAccount = accountBuilder.newInstance();
@@ -143,7 +143,7 @@
 
             Female annDoe;
             {
-                EntityBuilder<Female> femaleBuilder = unitOfWork.newEntityBuilder( Female.class, new StringIdentity( "anndoe" ) );
+                EntityBuilder<Female> femaleBuilder = unitOfWork.newEntityBuilder( Female.class, StringIdentity.identityOf( "anndoe" ) );
                 annDoe = femaleBuilder.instance();
                 annDoe.name().set( "Ann Doe" );
                 annDoe.title().set( Person.Title.MRS );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java
index a5b4b5a..8c553fc 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java
@@ -31,7 +31,6 @@
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
 import org.apache.polygene.test.indexing.TestData;
 import org.apache.polygene.test.model.assembly.ApplicationAssembler;
@@ -74,7 +73,7 @@
 
     @Before
     public void setup()
-        throws AssemblyException, ActivationException
+        throws ActivationException
     {
         ApplicationAssembler assembler =
             new ApplicationAssembler( "Multi Layered Indexing Test", "1.0", Application.Mode.development, getClass() );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java
index 98efb6a..e9e0c1c 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java
@@ -54,11 +54,11 @@
 import static java.util.stream.Collectors.toList;
 import static org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation.Propagation.MANDATORY;
 import static org.apache.polygene.api.usecase.UsecaseBuilder.newUsecase;
+import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNot.not;
 import static org.hamcrest.core.StringContains.containsString;
-import static org.hamcrest.collection.IsIterableContainingInOrder .contains;
 import static org.junit.Assert.assertThat;
 
 // TODO Test errors
@@ -71,7 +71,7 @@
 
     public interface PersonList
     {
-        Identity LIST_ID = StringIdentity.fromString( "person-list" );
+        Identity LIST_ID = StringIdentity.identityOf( "person-list" );
 
         ManyAssociation<Person> all();
     }
@@ -179,7 +179,7 @@
     }
 
     @Override
-    protected final void defineApplication( ApplicationAssembly app ) throws AssemblyException
+    protected final void defineApplication( ApplicationAssembly app )
     {
         app.setName( "app" );
 
@@ -213,7 +213,7 @@
 
     protected Assemblers.Visible<? extends Assembler> entityStoreAssembler( ModuleAssembly configModule, Visibility configVisibility ) throws AssemblyException
     {
-        return new EntityTestAssembler();
+        return new EntityTestAssembler().defaultServicesVisibleIn( Visibility.module );
     }
 
     protected abstract Assemblers.Visible<? extends Assembler> metricsAssembler();
@@ -274,7 +274,7 @@
         Commands commands = services.findService( Commands.class ).get();
         Queries queries = services.findService( Queries.class ).get();
 
-        Identity identity = StringIdentity.fromString( "1" );
+        Identity identity = StringIdentity.identityOf( "1" );
 
         try (UnitOfWork uow = services.unitOfWorkFactory().newUnitOfWork( newUsecase( "Step 1" ) ) )
         {
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java
index 4b25622..174d70a 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java
@@ -28,7 +28,6 @@
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.junit.Test;
@@ -41,7 +40,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.layer().application().setName( "SomeApplication" );
         module.transients( Country1.class );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccessLayer.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccessLayer.java
index 045b621..f84b622 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccessLayer.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccessLayer.java
@@ -21,8 +21,8 @@
 package org.apache.polygene.test.model.assembly;
 
 import java.lang.reflect.InvocationTargetException;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
 
@@ -38,7 +38,6 @@
 
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         createModule( layer, TestExecutionModule.class );
         createModule( layer, TestSuite1Module.class );
@@ -48,9 +47,8 @@
     }
 
     @Override
-    protected ModuleAssembler instantiateAssembler( LayerAssembly layer,
-                                                    Class<? extends ModuleAssembler> moduleAssemblerClass
-    )
+    protected ModuleAssembler instantiateModuleAssembler( Class<? extends ModuleAssembler> moduleAssemblerClass, ModuleAssembly constructorArgument
+                                                        )
         throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
     {
         if( moduleAssemblerClass.equals(TestExecutionModule.class))
@@ -59,7 +57,7 @@
         }
         else
         {
-            return super.instantiateAssembler( layer, moduleAssemblerClass );
+            return super.instantiateModuleAssembler( moduleAssemblerClass, constructorArgument );
         }
     }
 }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccountModule.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccountModule.java
index eec1885..e0cbf5a 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccountModule.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/AccountModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.test.model.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -40,7 +39,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         module.entities( Account.class, Domain.class ).visibleIn( Visibility.layer );
         module.values( File.class, Host.class, Port.class, Protocol.class, QueryParam.class, URL.class )
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ApplicationAssembler.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ApplicationAssembler.java
index e793455..cfb0ce8 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ApplicationAssembler.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ApplicationAssembler.java
@@ -43,7 +43,6 @@
 
     @Override
     protected void assembleLayers( ApplicationAssembly assembly )
-        throws AssemblyException
     {
         LayerAssembly accessLayer = createLayer( AccessLayer.class );
         LayerAssembly domainLayer = createLayer( DomainLayer.class );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigLayer.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigLayer.java
index 2413ea3..643b35b 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigLayer.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigLayer.java
@@ -20,16 +20,13 @@
 
 package org.apache.polygene.test.model.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
 
 class ConfigLayer extends LayeredLayerAssembler
 {
-
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         createModule( layer, ConfigModule.class );
         return layer;
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigModule.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigModule.java
index 6c7c52e..b9f9861 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigModule.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/ConfigModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.test.model.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -30,10 +29,8 @@
 class ConfigModule
     implements ModuleAssembler
 {
-
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.application );
         return module;
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/DomainLayer.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/DomainLayer.java
index 3754fd8..d77470f 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/DomainLayer.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/DomainLayer.java
@@ -20,16 +20,13 @@
 
 package org.apache.polygene.test.model.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
 
 class DomainLayer extends LayeredLayerAssembler
 {
-
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         createModule( layer, PetShopModule.class );
         createModule( layer, FamilyModule.class );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/FamilyModule.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/FamilyModule.java
index 42054a7..15f314b 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/FamilyModule.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/FamilyModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.test.model.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -35,10 +34,8 @@
 class FamilyModule
     implements ModuleAssembler
 {
-
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         module.entities( Male.class,
                          Female.class,
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/IndexingLayer.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/IndexingLayer.java
index b0b5b87..dd36099 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/IndexingLayer.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/IndexingLayer.java
@@ -20,17 +20,14 @@
 
 package org.apache.polygene.test.model.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
 import org.apache.polygene.test.indexing.layered.AbstractMultiLayeredIndexingTest;
 
 class IndexingLayer extends LayeredLayerAssembler
 {
-
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         createModule( layer, AbstractMultiLayeredIndexingTest.indexingAssembler );
         return layer;
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceLayer.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceLayer.java
index 26e69ab..3d1700a 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceLayer.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceLayer.java
@@ -20,16 +20,13 @@
 
 package org.apache.polygene.test.model.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
 
 class PersistenceLayer extends LayeredLayerAssembler
 {
-
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         createModule( layer, PersistenceModule.class );
         return layer;
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceModule.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceModule.java
index 202c640..f2086b4 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceModule.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PersistenceModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.test.model.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -30,10 +29,8 @@
 class PersistenceModule
     implements ModuleAssembler
 {
-
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.application );
         return module;
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PetShopModule.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PetShopModule.java
index 40fae45..a94bf6d 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PetShopModule.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/PetShopModule.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.test.model.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -34,10 +33,8 @@
 class PetShopModule
     implements ModuleAssembler
 {
-
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         module.entities( Owner.class,
                          Staff.class );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestExecutionModule.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestExecutionModule.java
index 09dd396..77ae795 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestExecutionModule.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestExecutionModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.test.model.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -38,7 +37,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         module.objects( testClass ).visibleIn( Visibility.layer );
         return module;
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite1Module.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite1Module.java
index ff2fa08..e8cb00f 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite1Module.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite1Module.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.test.model.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -35,7 +34,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         declareTestCase( module, Suite1Case1.class );
         declareTestCase( module, Suite1Case2.class );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite2Module.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite2Module.java
index cae05ac..9c0f174 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite2Module.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite2Module.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.test.model.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -31,7 +30,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         return module;
     }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite3Module.java b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite3Module.java
index 369cbba..5424a25 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite3Module.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/model/assembly/TestSuite3Module.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.test.model.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -31,7 +30,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         return module;
     }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java
index a78c3fa..e0ecd6e 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java
@@ -42,7 +42,6 @@
 import org.apache.polygene.api.type.ValueCompositeType;
 import org.apache.polygene.api.type.ValueType;
 import org.apache.polygene.api.value.ValueBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.junit.Test;
@@ -58,7 +57,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.values( SomeValue.class );
     }
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java
index 3741fd2..9f0d87c 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java
@@ -253,7 +253,7 @@
     // JSONEntityState does not allow for polymorphic serialization
     public void valueAndEntityTypeEquality()
     {
-        Identity identity = StringIdentity.fromString( "42" );
+        Identity identity = StringIdentity.identityOf( "42" );
         Some createdValue, loadedValue;
 
         try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "create" ) ) )
@@ -301,7 +301,7 @@
     {
         EntityBuilder<Some> builder = uow.newEntityBuilder( Some.class );
         Some proto = builder.instance();
-        proto.identity().set( StringIdentity.fromString( identity ) );
+        proto.identity().set( StringIdentity.identityOf( identity ) );
         setSomeValueState( module, uow, proto );
         return builder.newInstance();
     }
@@ -313,7 +313,7 @@
     {
         ValueBuilder<Some> builder = module.newValueBuilder( Some.class );
         Some proto = builder.prototype();
-        proto.identity().set( StringIdentity.fromString( identity ) );
+        proto.identity().set( StringIdentity.identityOf( identity ) );
         setSomeValueState( module, uow, proto );
         return builder.newInstance();
     }
@@ -322,7 +322,7 @@
     {
         ValueBuilder<SomeExtended> builder = module.newValueBuilder( SomeExtended.class );
         SomeExtended proto = builder.prototype();
-        proto.identity().set( StringIdentity.fromString( identity ) );
+        proto.identity().set( StringIdentity.identityOf( identity ) );
         setSomeValueState( module, uow, proto );
         proto.extraProperty().set( "extra property" );
         proto.extraAssociation().set( buildBarEntity( module, uow, "extra association" ) );
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java b/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java
index e6c05fa..d2cc38c 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java
@@ -72,7 +72,7 @@
 
     // Seen busy on builds.apache.org
     private static final List<Integer> BLACKLIST = Arrays.asList(
-        42187, 37334, 38615, 33951, 41652, 41841
+        42187, 37334, 38615, 33951, 41652, 41841, 39400
     );
 
     private static final int MAX_PORT_CHECKS = 20;
diff --git a/core/testsupport/src/test/java/org/apache/polygene/test/cache/MemoryCacheTest.java b/core/testsupport/src/test/java/org/apache/polygene/test/cache/MemoryCacheTest.java
index c9e2fe1..d91c6c0 100644
--- a/core/testsupport/src/test/java/org/apache/polygene/test/cache/MemoryCacheTest.java
+++ b/core/testsupport/src/test/java/org/apache/polygene/test/cache/MemoryCacheTest.java
@@ -22,8 +22,7 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
-public class MemoryCacheTest
-    extends AbstractCachePoolTest
+public class MemoryCacheTest extends AbstractCachePoolTest
 {
     @Override
     public void assemble( ModuleAssembly module )
diff --git a/dependencies.gradle b/dependencies.gradle
index 3bab48f..f9bc3de 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -19,6 +19,9 @@
 
 def dependencies = extensions.getByType( DependenciesDeclarationExtension )
 
+// Gradle version
+dependencies.gradleVersion = '4.0.1'
+
 // Remote repositories
 dependencies.repositoriesUrls << [
   mavenCentral: "https://repo1.maven.org/maven2/",
@@ -28,7 +31,7 @@
 
 // Core dependencies
 def asmVersion = '5.2'
-def javaxJsonVersion = '1.0'
+def javaxJsonVersion = '1.1'
 def osgiVersion = '4.3.1'
 dependencies.libraries << [
   asm        : "org.ow2.asm:asm:$asmVersion",
@@ -40,56 +43,62 @@
 
 // Extensions, Libraries and Tools dependencies
 def bonecpVersion = '0.8.0.RELEASE'
-def bouncyVersion = '1.56'
-def cassandraClientVersion = '3.2.0'
-def codahaleMetricsVersion = '3.2.2'
+def bouncyVersion = '1.57'
+def cassandraClientVersion = '3.3.0'
+def codahaleMetricsVersion = '3.2.3'
 def commonsDbcpVersion = '2.1.1'
-def commonsLangVersion = '3.5'
+def commonsLangVersion = '3.6'
+def commonsValidatorVersion = '1.6'
 def derbyVersion = '10.13.1.1'
 def ehcacheVersion = '3.3.1'
-def elasticsearchVersion = '5.2.2'
+def elasticsearchVersion = '5.5.0'
 def freemarkerVersion = '2.3.26-incubating'
-def geodeVersion = '1.1.1'
-def groovyVersion = '2.4.10'
-def hazelcastVersion = '3.8'
+def geodeVersion = '1.2.0'
+def groovyVersion = '2.4.12'
+def hazelcastVersion = '3.8.3'
 def httpClientVersion = '4.5.3'
-def jacksonVersion = '2.8.7'
+def jacksonVersion = '2.8.9'
 def jaxbApiVersion = '2.2.12'
-def jcloudsVersion = '2.0.1'
+def jcloudsVersion = '2.0.2'
 def jdbmVersion = '2.4'
 def jedisVersion = '2.9.0'
 def jettyVersion = '9.2.17.v20160517' // 9.3.x Tests fail!
-def johnzonVersion = '1.0.0'
-def jooqVersion = '3.9.1'
+def johnzonVersion = '1.1.1'
+def jooqVersion = '3.9.3'
 def leveldbVersion = '0.9'
 def leveldbJniVersion = '1.8'
 def liquibaseVersion = '3.5.3'
 def mongodbVersion = '3.4.2'
-def msgpackVersion = '0.8.12'
-def restletVersion = '2.3.9'
+def msgpackVersion = '0.8.13'
+def restletVersion = '2.3.10'
 def rdfVersion = '2.7.16' // 2.8.x change query results!! 4.x exists
 def riakVersion = '2.1.1'
 def servletVersion = '3.1.0'
-def shiroVersion = '1.3.2'
+def shiroVersion = '1.4.0'
 def slf4jVersion = '1.7.25'
 def solrVersion = "1.4.1" // 4.x Fails to compile!
-def springVersion = '4.3.7.RELEASE'
-def spymemcachedVersion = '2.12.2'
+def springVersion = '4.3.9.RELEASE'
+def spymemcachedVersion = '2.12.3'
 def velocityVersion = '1.7'
 dependencies.libraries << [
   bonecp              : "com.jolbox:bonecp:$bonecpVersion",
-  bouncy_castle       : "org.bouncycastle:bcprov-jdk15on:$bouncyVersion",
+  bouncy_castle       : [
+          "org.bouncycastle:bcprov-jdk15on:$bouncyVersion",
+          "org.bouncycastle:bcpkix-jdk15on:$bouncyVersion",
+          "org.bouncycastle:bctls-jdk15on:$bouncyVersion"
+  ],
   cassandra_client    : "com.datastax.cassandra:cassandra-driver-core:$cassandraClientVersion",
   codahale_metrics    : [ "io.dropwizard.metrics:metrics-core:$codahaleMetricsVersion",
                           "io.dropwizard.metrics:metrics-healthchecks:$codahaleMetricsVersion" ],
   commons_dbcp        : "org.apache.commons:commons-dbcp2:$commonsDbcpVersion",
   commons_lang        : "org.apache.commons:commons-lang3:$commonsLangVersion",
+  commons_validator   : "commons-validator:commons-validator:$commonsValidatorVersion",
   ehcache             : "org.ehcache:ehcache:$ehcacheVersion",
   elasticsearch       : [ "org.elasticsearch:elasticsearch:$elasticsearchVersion",
                           "org.elasticsearch.client:transport:$elasticsearchVersion",
                           // Elasticsearch 5.0 do not work with log4j 2.7
-                          "org.apache.logging.log4j:log4j-api:2.6.2",
-                          "org.apache.logging.log4j:log4j-core:2.6.2" ],
+                          "org.apache.logging.log4j:log4j-api:2.8.2",
+                          "org.apache.logging.log4j:log4j-core:2.8.2" ],
   freemarker          : "org.freemarker:freemarker:$freemarkerVersion",
   geode               : "org.apache.geode:geode-core:$geodeVersion",
   groovy              : "org.codehaus.groovy:groovy-all:$groovyVersion",
@@ -161,7 +170,7 @@
 
 // Tools dependencies
 def jgoodiesLooksVersion = '2.7.0'
-def pdfboxVersion = '2.0.4'
+def pdfboxVersion = '2.0.6'
 def prefuseVersion = '1.0.1'
 dependencies.libraries << [
   jgoodies_looks: "com.jgoodies:jgoodies-looks:$jgoodiesLooksVersion",
@@ -170,20 +179,20 @@
 ]
 
 // Runtime, Test and Samples dependencies
-def awaitilityVersion = '2.0.0'
+def awaitilityVersion = '3.0.0'
 def dnsJavaVersion = '2.1.8'
 def dockerJUnitVersion = '0.3'
 def easyMockVersion = '3.4'
-def embedMongoVersion = '1.50.5' // 2.0.0 exists
-def h2Version = '1.4.194'
+def embedMongoVersion = '2.0.0' // 2.0.0 exists
+def h2Version = '1.4.196'
 def hamcrestVersion = '1.3'
 def jaxRsApiVersion = '2.0.1'
 def junitVersion = '4.12'
-def logbackVersion = '1.2.2' // TODO Replace with Apache Log4j 2
-def mockitoVersion = '2.7.21'
+def logbackVersion = '1.2.3' // TODO Replace with Apache Log4j 2
+def mockitoVersion = '2.8.47'
 def mysqlVersion = '6.0.6'
-def postgresqlVersion = '42.0.0'
-def sqliteVersion = '3.16.1'
+def postgresqlVersion = '42.1.3'
+def sqliteVersion = '3.19.3'
 def xmlUnitVersion = '2.3.0'
 dependencies.libraries << [
   awaitility        : "org.awaitility:awaitility:$awaitilityVersion",
@@ -269,10 +278,11 @@
 // Docker Images
 dependencies.dockerImagesVersions << [
   cassandra: 'cassandra:3.10',
-  memcached: 'memcached:1.4.36-alpine',
+  memcached: 'memcached:1.4.39-alpine',
   mariadb  : 'mariadb:10.1.21',
-  postgres : 'postgres:9.6.2-alpine',
-  redis    : 'redis:3.2.8-alpine',
+  mongo    : 'mongo:3.5.10',
+  postgres : 'postgres:9.6.3-alpine',
+  redis    : 'redis:4.0.0-alpine',
   riak     : 'basho/riak-kv:ubuntu-2.2.3',
-  s3server : 'scality/s3server:mem-6a8e1cd'
+  s3server : 'scality/s3server:mem-bb2a38c0'
 ]
diff --git a/distributions/src/src-dist/README.txt b/distributions/src/src-dist/README.txt
index de6c218..2aa83ed 100644
--- a/distributions/src/src-dist/README.txt
+++ b/distributions/src/src-dist/README.txt
@@ -7,9 +7,9 @@
 create Polygene™ applications.
 
 
-Polygene™ started in 2007, and is still in heavy development under the umbrella of
-the Apache Polygene™ project at the Apache Software Foundation. We would like
-developers around the world to participate in the advancement of this
+Polygene™ started in 2007, and is still in heavy development under the umbrella
+of the Apache Polygene™ project at the Apache Software Foundation. We would
+like developers around the world to participate in the advancement of this
 cool, new and challenging technology. We are especially interested in
 people willing to help improve the SDK, samples, tutorials, documentation
 and other supporting material.
@@ -46,13 +46,12 @@
 installation and any version of Gradle.
 
 This distribution embeds the exact version of Gradle needed to build Polygene™.
-It is in the gradle/wrapper/gradle-wrapper.properties file.
 Here is how to bootstrap that version:
 
-    gradle wrapper
+    gradle -b gradle/wrapper-install/build.gradle install
 
-This will download the required Gradle distribution and create gradlew and
-gradlew.bat script files that you should use from now on.
+This will deploy the Gradle Wrapper and create gradlew and gradlew.bat script
+files that you should use from now on.
 
 Once you have the wrapper installed you can invoke the build system.
 
@@ -60,6 +59,9 @@
 
     ./gradlew check assemble
 
+Running gradlew for the first time will download the required Gradle
+distribution. You can run ./gradlew tasks to list available tasks.
+
 Read the Polygene™ Build System tutorial for more details:
 https://polygene.apache.org/java/latest/build-system.html
 
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.properties_ b/distributions/src/src-dist/gradle/wrapper-install/build.gradle
similarity index 69%
rename from tools/generator-polygene/app/templates/buildtool/gradle-wrapper.properties_
rename to distributions/src/src-dist/gradle/wrapper-install/build.gradle
index 63a2f23..232ab00 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.properties_
+++ b/distributions/src/src-dist/gradle/wrapper-install/build.gradle
@@ -1,4 +1,4 @@
-<%#
+/*
  *  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
@@ -14,11 +14,12 @@
  *  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.
- *
- *
--%>
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
+ */
+
+task install( type: Wrapper ) {
+  description = 'Installs the Gradle Wrapper in Apache Polygene™ source distribution.'
+  gradleVersion = '%REQUIRED_GRADLE_VERSION%'
+  def targetRoot = project.rootDir.parentFile.parentFile
+  jarFile = new File(targetRoot, 'gradle/wrapper/gradle-wrapper.jar')
+  scriptFile = new File(targetRoot, 'gradlew')
+}
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl b/distributions/src/src-dist/gradle/wrapper-install/settings.gradle
similarity index 87%
copy from tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl
copy to distributions/src/src-dist/gradle/wrapper-install/settings.gradle
index e2629d5..a183ce3 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl
+++ b/distributions/src/src-dist/gradle/wrapper-install/settings.gradle
@@ -1,4 +1,4 @@
-<%#
+/*
  *  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
@@ -14,10 +14,6 @@
  *  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.
- *
- *
--%>
--
-<% for( var idx in polygene.current.yaml ) {
-%>    <%- polygene.current.yaml[idx]; %>
-<% } %>
+ */
+
+// Gradle build root directory marker
diff --git a/extensions/cache-ehcache/src/main/java/org/apache/polygene/cache/ehcache/assembly/EhCacheAssembler.java b/extensions/cache-ehcache/src/main/java/org/apache/polygene/cache/ehcache/assembly/EhCacheAssembler.java
index 077a24f..e99a379 100644
--- a/extensions/cache-ehcache/src/main/java/org/apache/polygene/cache/ehcache/assembly/EhCacheAssembler.java
+++ b/extensions/cache-ehcache/src/main/java/org/apache/polygene/cache/ehcache/assembly/EhCacheAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.cache.ehcache.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.cache.ehcache.EhCacheConfiguration;
@@ -31,8 +30,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( EhCachePoolService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
diff --git a/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/MemcachePoolMixin.java b/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/MemcachePoolMixin.java
index dabaea0..3184865 100644
--- a/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/MemcachePoolMixin.java
+++ b/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/MemcachePoolMixin.java
@@ -28,7 +28,6 @@
 import net.spy.memcached.MemcachedClient;
 import net.spy.memcached.auth.AuthDescriptor;
 import net.spy.memcached.auth.PlainCallbackHandler;
-import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.configuration.Configuration;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.spi.cache.Cache;
@@ -40,8 +39,10 @@
     implements MemcachePoolService
 {
     private final Map<String, MemcacheImpl<?>> caches = new HashMap<>();
-    @This @Optional
+
+    @This
     private Configuration<MemcacheConfiguration> configuration;
+
     private MemcachedClient client;
     private int expiration;
 
@@ -49,41 +50,32 @@
     public void activateService()
         throws Exception
     {
-        if( configuration != null )
+        MemcacheConfiguration config = configuration.get();
+        expiration = ( config.expiration().get() == null )
+                     ? 3600
+                     : config.expiration().get();
+        String addresses = ( config.addresses().get() == null )
+                           ? "localhost:11211"
+                           : config.addresses().get();
+        Protocol protocol = ( config.protocol().get() == null )
+                            ? Protocol.TEXT
+                            : Protocol.valueOf( config.protocol().get().toUpperCase() );
+        String username = config.username().get();
+        String password = config.password().get();
+        String authMech = config.authMechanism().get() == null
+                          ? "PLAIN"
+                          : config.authMechanism().get();
+
+        ConnectionFactoryBuilder builder = new ConnectionFactoryBuilder();
+        builder.setProtocol( protocol );
+        if( username != null && !username.isEmpty() )
         {
-            MemcacheConfiguration config = configuration.get();
-            expiration = ( config.expiration().get() == null )
-                         ? 3600
-                         : config.expiration().get();
-            String addresses = ( config.addresses().get() == null )
-                               ? "localhost:11211"
-                               : config.addresses().get();
-            Protocol protocol = ( config.protocol().get() == null )
-                                ? Protocol.TEXT
-                                : Protocol.valueOf( config.protocol().get().toUpperCase() );
-            String username = config.username().get();
-            String password = config.password().get();
-            String authMech = config.authMechanism().get() == null
-                              ? "PLAIN"
-                              : config.authMechanism().get();
-
-            ConnectionFactoryBuilder builder = new ConnectionFactoryBuilder();
-            builder.setProtocol( protocol );
-            if( username != null && !username.isEmpty() )
-            {
-                builder.setAuthDescriptor(
-                    new AuthDescriptor(
-                        new String[]
-                        {
-                            authMech
-                        },
-                        new PlainCallbackHandler( username, password )
-                    )
-                );
-            }
-
-            client = new MemcachedClient( builder.build(), AddrUtil.getAddresses( addresses ) );
+            String[] authType = { authMech };
+            AuthDescriptor to = new AuthDescriptor( authType, new PlainCallbackHandler( username, password ) );
+            builder.setAuthDescriptor( to );
         }
+
+        client = new MemcachedClient( builder.build(), AddrUtil.getAddresses( addresses ) );
     }
 
     @Override
@@ -107,12 +99,7 @@
         }
         synchronized( caches )
         {
-            MemcacheImpl<?> cache = caches.get( cacheId );
-            if( cache == null )
-            {
-                cache = new MemcacheImpl<>( client, cacheId, valueType, expiration );
-                caches.put( cacheId, cache );
-            }
+            MemcacheImpl<?> cache = caches.computeIfAbsent( cacheId, identity -> new MemcacheImpl<>( client, identity, valueType, expiration ) );
             cache.incRefCount();
             return (Cache<T>) cache;
         }
diff --git a/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/assembly/MemcacheAssembler.java b/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/assembly/MemcacheAssembler.java
index e2cbc11..20886ec 100644
--- a/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/assembly/MemcacheAssembler.java
+++ b/extensions/cache-memcache/src/main/java/org/apache/polygene/cache/memcache/assembly/MemcacheAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.cache.memcache.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.cache.memcache.MemcacheConfiguration;
@@ -34,8 +33,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( MemcachePoolService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
@@ -43,7 +42,7 @@
         }
         if( hasConfig() )
         {
-            configModule().entities( MemcacheConfiguration.class ).visibleIn( configVisibility() );
+            configModule().configurations( MemcacheConfiguration.class ).visibleIn( configVisibility() );
         }
     }
 }
diff --git a/extensions/cache-memcache/src/test/java/org/apache/polygene/cache/memcache/MemcacheCachePoolTest.java b/extensions/cache-memcache/src/test/java/org/apache/polygene/cache/memcache/MemcacheCachePoolTest.java
index 7843eb3..0b5b575 100644
--- a/extensions/cache-memcache/src/test/java/org/apache/polygene/cache/memcache/MemcacheCachePoolTest.java
+++ b/extensions/cache-memcache/src/test/java/org/apache/polygene/cache/memcache/MemcacheCachePoolTest.java
@@ -23,9 +23,9 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.cache.memcache.assembly.MemcacheAssembler;
-import org.apache.polygene.test.internal.DockerRule;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.cache.AbstractCachePoolTest;
+import org.apache.polygene.test.docker.DockerRule;
 import org.junit.ClassRule;
 
 /**
diff --git a/extensions/entitystore-cassandra/build.gradle b/extensions/entitystore-cassandra/build.gradle
index b1f32a8..343b9f9 100644
--- a/extensions/entitystore-cassandra/build.gradle
+++ b/extensions/entitystore-cassandra/build.gradle
@@ -27,6 +27,7 @@
 dependencies {
   api polygene.core.bootstrap
   api libraries.cassandra_client
+  api polygene.library( 'constraints' )
 
   implementation polygene.library( 'locking' )
   implementation libraries.jackson_mapper
diff --git a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreConfiguration.java b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreConfiguration.java
index ca257e8..e52a0d4 100644
--- a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreConfiguration.java
+++ b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreConfiguration.java
@@ -22,6 +22,7 @@
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.common.UseDefaults;
 import org.apache.polygene.api.property.Property;
+import org.apache.polygene.library.constraints.annotation.HostPortList;
 
 // START SNIPPET: config
 public interface CassandraEntityStoreConfiguration
@@ -39,6 +40,7 @@
      * @return A comma or space separated list of hostnames (and port) to use to connect to the Cassandra cluster.
      */
     @Optional
+    @HostPortList
     Property<String> hostnames();
 
     /** The name of the cluster to connect to.
diff --git a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreMixin.java b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreMixin.java
index 80b638a..7ee85f8 100644
--- a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreMixin.java
+++ b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreMixin.java
@@ -153,7 +153,7 @@
         EntityDescriptor entityDescriptor = module.entityDescriptor( type );
         if( entityDescriptor == null )
         {
-            throw new NoSuchEntityTypeException( type, module.name(), module.typeLookup() );
+            throw new NoSuchEntityTypeException( type, module );
         }
         Map<String, String> storedProperties = row.getMap( PROPERTIES_COLUMN, String.class, String.class );
         Map<String, String> storedAssociations = row.getMap( ASSOCIATIONS_COLUMN, String.class, String.class );
@@ -200,7 +200,7 @@
                     try
                     {
                         String storedValue = storedAssociations.get( associationType.qualifiedName().name() );
-                        EntityReference value = storedValue == null
+                        EntityReference value = storedValue == null || storedValue.isEmpty()
                                                 ? null
                                                 : EntityReference.parseEntityReference( storedValue );
                         associations.put( associationType.qualifiedName(), value );
@@ -224,7 +224,7 @@
                     try
                     {
                         String storedValue = storedManyassociation.get( manyAssociationType.qualifiedName().name() );
-                        if( storedValue != null )
+                        if( storedValue != null && !storedValue.isEmpty() )
                         {
                             String[] refs = storedValue.split( "," );
                             for( String value : refs )
@@ -253,7 +253,7 @@
                     try
                     {
                         String storedValues = storedNamedassociation.get( namedAssociationType.qualifiedName().name() );
-                        if( storedValues != null )
+                        if( storedValues != null && !storedValues.isEmpty() )
                         {
                             @SuppressWarnings( "unchecked" )
                             Map<String, String> namedRefs = new ObjectMapper().readValue( storedValues, Map.class );
@@ -345,7 +345,6 @@
                                 many,
                                 named );
                             ResultSet result = cluster.cassandraClientSession().execute( statement );
-                            System.out.println( result );
                         } );
                 String ids = stream( state.spliterator(), false )
                     .filter( entity -> entity.status() == EntityStatus.REMOVED )
@@ -428,7 +427,7 @@
         Identity newIdentity;
         if( idGenerator == null )
         {
-            newIdentity = new StringIdentity( UUID.randomUUID().toString() );
+            newIdentity = StringIdentity.identityOf( UUID.randomUUID().toString() );
         }
         else
         {
diff --git a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/ClusterBuilder.java b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/ClusterBuilder.java
index 0aced37..53986cc 100644
--- a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/ClusterBuilder.java
+++ b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/ClusterBuilder.java
@@ -31,7 +31,7 @@
 {
     String DEFAULT_HOST_PORT = "localhost:9042";
 
-    Cluster build(CassandraEntityStoreConfiguration config);
+    Cluster build( CassandraEntityStoreConfiguration config );
 
     class DefaultBuilder
         implements ClusterBuilder
@@ -48,9 +48,9 @@
             Cluster.Builder builder =
                 Cluster.builder()
                        .withClusterName( clusterName )
-                       .addContactPointsWithPorts(connectionPoints)
+                       .addContactPointsWithPorts( connectionPoints )
                        .withCredentials( username(), password() );
-            builder = customConfiguration(builder);
+            builder = customConfiguration( builder );
             return builder.build();
         }
 
@@ -77,13 +77,13 @@
         protected Collection<InetSocketAddress> cassandraConnectionPoints()
         {
             String hostnames = hostnames();
-            return Arrays.stream( hostnames.split( "(,| )" ) )
+            return Arrays.stream( hostnames.split( "[ ,]" ) )
                          .map( text ->
-                        {
-                            String[] strings = text.split( ":" );
-                            return new InetSocketAddress( strings[ 0 ], Integer.parseInt( strings[ 1 ] ) );
-                        }
-                      )
+                               {
+                                   String[] strings = text.split( ":" );
+                                   return new InetSocketAddress( strings[ 0 ], Integer.parseInt( strings[ 1 ] ) );
+                               }
+                             )
                          .collect( Collectors.toList() );
         }
 
diff --git a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/assembly/CassandraEntityStoreAssembler.java b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/assembly/CassandraEntityStoreAssembler.java
index 2736dfd..51f726b 100644
--- a/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/assembly/CassandraEntityStoreAssembler.java
+++ b/extensions/entitystore-cassandra/src/main/java/org/apache/polygene/entitystore/cassandra/assembly/CassandraEntityStoreAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.entitystore.cassandra.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.cassandra.CassandraEntityStoreConfiguration;
 import org.apache.polygene.entitystore.cassandra.CassandraEntityStoreService;
@@ -30,8 +29,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( CassandraEntityStoreService.class )
               .visibleIn( visibility() )
               .identifiedBy( identity() )
diff --git a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
similarity index 82%
rename from extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java
rename to extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
index 08e5dfd..0e0084b 100644
--- a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java
+++ b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
@@ -24,16 +24,16 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.cassandra.assembly.CassandraEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
 import org.apache.polygene.test.entity.CanRemoveAll;
-import org.apache.polygene.test.internal.DockerRule;
 import org.junit.ClassRule;
 
 /**
  * Test the CassandraEntityStoreService.
  * <p>Installing Cassandra and starting it should suffice as the test use Cassandra defaults: 127.0.0.1:3000</p>
  */
-public class CassandraMapEntityStoreTest
+public class CassandraEntityStoreTest
     extends AbstractEntityStoreTest
 {
     @ClassRule
@@ -48,19 +48,21 @@
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         module.services( CassandraEntityStoreService.class ).withTypes( CanRemoveAll.class ).withMixins( EmptyCassandraTableMixin.class );
 
         // START SNIPPET: assembly
-        new CassandraEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
+        new CassandraEntityStoreAssembler()
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
         // END SNIPPET: assembly
 
-        CassandraEntityStoreConfiguration cassandraConfig = config.forMixin( CassandraEntityStoreConfiguration.class ).declareDefaults();
+        CassandraEntityStoreConfiguration cassandraDefaults = config.forMixin( CassandraEntityStoreConfiguration.class ).declareDefaults();
         String host = DOCKER.getDockerHost();
         int port = DOCKER.getExposedContainerPort( "9042/tcp" );
         System.out.println("Cassandra: " + host + ":" + port);
-        cassandraConfig.hostnames().set( host + ':' + port );
-        cassandraConfig.createIfMissing().set( true );
+        cassandraDefaults.hostnames().set( host + ':' + port );
+        cassandraDefaults.createIfMissing().set( true );
         // START SNIPPET: assembly
     }
     // END SNIPPET: assembly
diff --git a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTestSuite.java b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTestSuite.java
new file mode 100644
index 0000000..3908a73
--- /dev/null
+++ b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTestSuite.java
@@ -0,0 +1,80 @@
+/*
+ *  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.polygene.entitystore.cassandra;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.service.ServiceReference;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.cassandra.assembly.CassandraEntityStoreAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.CanRemoveAll;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+/**
+ * Test the CassandraEntityStoreService.
+ * <p>Installing Cassandra and starting it should suffice as the test use Cassandra defaults: 127.0.0.1:3000</p>
+ */
+public class CassandraEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "cassandra", "Starting listening for CQL clients" );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new CassandraEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        module.services( CassandraEntityStoreService.class )
+              .withTypes( CanRemoveAll.class )
+              .withMixins( EmptyCassandraTableMixin.class )
+              .visibleIn( Visibility.application );
+
+
+        CassandraEntityStoreConfiguration cassandraDefaults = configModule.forMixin( CassandraEntityStoreConfiguration.class ).declareDefaults();
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "9042/tcp" );
+        System.out.println("Cassandra: " + host + ":" + port);
+        cassandraDefaults.hostnames().set( host + ':' + port );
+        cassandraDefaults.createIfMissing().set( true );
+    }
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module module = application.findModule( "Infrastructure Layer", "Storage Module" );
+        ServiceReference<CanRemoveAll> cleaner = module.serviceFinder().findService( CanRemoveAll.class );
+        if( cleaner.isActive() && cleaner.isAvailable() )
+        {
+            cleaner.get().removeAll();
+        }
+        else
+        {
+            throw new IllegalStateException( "Clean up operation of Cassandra database was not availeble." );
+        }
+        super.tearDown();
+    }
+}
diff --git a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/EmptyCassandraTableMixin.java b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/EmptyCassandraTableMixin.java
index d7f9b99..046330c 100644
--- a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/EmptyCassandraTableMixin.java
+++ b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/EmptyCassandraTableMixin.java
@@ -19,8 +19,6 @@
  */
 package org.apache.polygene.entitystore.cassandra;
 
-import com.datastax.driver.core.querybuilder.Delete;
-import com.datastax.driver.core.querybuilder.QueryBuilder;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.test.entity.CanRemoveAll;
 
diff --git a/extensions/entitystore-file/src/main/java/org/apache/polygene/entitystore/file/assembly/FileEntityStoreAssembler.java b/extensions/entitystore-file/src/main/java/org/apache/polygene/entitystore/file/assembly/FileEntityStoreAssembler.java
index 26aec7f..40fdf35 100644
--- a/extensions/entitystore-file/src/main/java/org/apache/polygene/entitystore/file/assembly/FileEntityStoreAssembler.java
+++ b/extensions/entitystore-file/src/main/java/org/apache/polygene/entitystore/file/assembly/FileEntityStoreAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.entitystore.file.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.file.FileEntityStoreConfiguration;
@@ -31,8 +30,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( FileEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
diff --git a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java
index d18be11..8cc63b0 100644
--- a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java
+++ b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java
@@ -47,7 +47,7 @@
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
             .assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new FileEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
diff --git a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTestSuite.java b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTestSuite.java
new file mode 100644
index 0000000..b28afff
--- /dev/null
+++ b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTestSuite.java
@@ -0,0 +1,50 @@
+/*
+ *  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.polygene.entitystore.file;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.file.assembly.FileEntityStoreAssembler;
+import org.apache.polygene.library.fileconfig.FileConfigurationAssembler;
+import org.apache.polygene.library.fileconfig.FileConfigurationOverride;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
+
+public class FileEntityStoreTestSuite
+    extends EntityStoreTestSuite
+{
+    @Rule
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new FileConfigurationAssembler()
+            .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
+            .visibleIn( Visibility.application )
+            .assemble( module );
+        new FileEntityStoreAssembler()
+            .withConfig( configModule, Visibility.application )
+            .visibleIn( Visibility.application )
+            .assemble( module );
+    }
+}
diff --git a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java
index 95988da..13b1f87 100644
--- a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java
@@ -45,7 +45,7 @@
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
             .assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new FileEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }
diff --git a/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeConfiguration.java b/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreConfiguration.java
similarity index 97%
rename from extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeConfiguration.java
rename to extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreConfiguration.java
index 4408bee..cb018a1 100644
--- a/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeConfiguration.java
+++ b/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreConfiguration.java
@@ -27,7 +27,7 @@
  * Geode Configuration.
  */
 // START SNIPPET: config
-public interface GeodeConfiguration
+public interface GeodeEntityStoreConfiguration
 {
     /**
      * Geode Topology.
diff --git a/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreMixin.java b/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreMixin.java
index c140c28..37f4bf7 100644
--- a/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreMixin.java
+++ b/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreMixin.java
@@ -50,7 +50,7 @@
         implements ServiceActivation, MapEntityStore
 {
     @This
-    private Configuration<GeodeConfiguration> config;
+    private Configuration<GeodeEntityStoreConfiguration> config;
 
     private AutoCloseable closeable;
     private Region<String, String> region;
@@ -60,7 +60,7 @@
             throws Exception
     {
         config.refresh();
-        GeodeConfiguration configuration = config.get();
+        GeodeEntityStoreConfiguration configuration = config.get();
         switch( configuration.topology().get() )
         {
             case EMBEDDED:
@@ -75,7 +75,7 @@
         }
     }
 
-    private void activateEmbedded( GeodeConfiguration configuration )
+    private void activateEmbedded( GeodeEntityStoreConfiguration configuration )
             throws IOException
     {
         Properties cacheProperties = buildCacheProperties( configuration );
@@ -92,7 +92,7 @@
         closeable = cache;
     }
 
-    private void activateClientServer( GeodeConfiguration configuration )
+    private void activateClientServer( GeodeEntityStoreConfiguration configuration )
             throws IOException
     {
         Properties cacheProperties = buildCacheProperties( configuration );
@@ -109,7 +109,7 @@
         closeable = cache;
     }
 
-    private Properties buildCacheProperties( GeodeConfiguration config )
+    private Properties buildCacheProperties( GeodeEntityStoreConfiguration config )
             throws IOException
     {
         Properties properties = new Properties();
diff --git a/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/assembly/GeodeEntityStoreAssembler.java b/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/assembly/GeodeEntityStoreAssembler.java
index 741d420..8bc98c9 100644
--- a/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/assembly/GeodeEntityStoreAssembler.java
+++ b/extensions/entitystore-geode/src/main/java/org/apache/polygene/entitystore/geode/assembly/GeodeEntityStoreAssembler.java
@@ -20,10 +20,9 @@
 package org.apache.polygene.entitystore.geode.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
-import org.apache.polygene.entitystore.geode.GeodeConfiguration;
+import org.apache.polygene.entitystore.geode.GeodeEntityStoreConfiguration;
 import org.apache.polygene.entitystore.geode.GeodeEntityStoreService;
 
 /**
@@ -34,8 +33,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( GeodeEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
@@ -43,7 +42,7 @@
         }
         if( hasConfig() )
         {
-            configModule().entities( GeodeConfiguration.class ).visibleIn( configVisibility() );
+            configModule().entities( GeodeEntityStoreConfiguration.class ).visibleIn( configVisibility() );
         }
     }
 }
diff --git a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java
index a6aa1e1..efd4dc1 100644
--- a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java
+++ b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java
@@ -37,7 +37,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new GeodeEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
diff --git a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTestSuite.java b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTestSuite.java
new file mode 100644
index 0000000..73dc13c
--- /dev/null
+++ b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTestSuite.java
@@ -0,0 +1,38 @@
+/*
+ *  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.polygene.entitystore.geode;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.geode.assembly.GeodeEntityStoreAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+
+public class GeodeEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new GeodeEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+}
diff --git a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java
index 3b30a1b..eed1c87 100644
--- a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java
@@ -35,7 +35,7 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new GeodeEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }
diff --git a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
similarity index 64%
copy from extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
copy to extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
index dd124b8..8ed17c3 100644
--- a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastConfiguration.java
+++ b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
@@ -19,20 +19,31 @@
  */
 package org.apache.polygene.entitystore.hazelcast;
 
-import org.apache.polygene.api.common.UseDefaults;
+import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.property.Property;
 
 /**
  * Configuration of HazelcastEntityStoreService.
  */
 // START SNIPPET: config
-public interface HazelcastConfiguration
+public interface HazelcastEntityStoreConfiguration
 {
 
-    @UseDefaults
+    /**
+     * The location of the Hazelcast configuration XML file.
+     * If the property is not a URL, it will be tried as a path name on the classpath.
+     *
+     * @return The location of the Hazelcast configuration XML file. Defaults to hazelcast-default.xml
+     */
+    @Optional
     Property<String> configXmlLocation();
 
-    @UseDefaults
+    /**
+     * The name of the Hazelcast map that is the key-value entity store.
+     *
+     * @return the name of Hazelcast map containing the entities. Defaults to "polygene:entitystore:data"
+     */
+    @Optional
     Property<String> mapName();
 
 }
diff --git a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreMixin.java b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreMixin.java
index 749d980..063c150 100644
--- a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreMixin.java
+++ b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreMixin.java
@@ -50,7 +50,7 @@
     private static final String DEFAULT_MAPNAME = "polygene:entitystore:data";
 
     @This
-    private Configuration<HazelcastConfiguration> config;
+    private Configuration<HazelcastEntityStoreConfiguration> config;
 
     private IMap<String, String> stringMap;
     private HazelcastInstance hazelcastInstance;
@@ -59,11 +59,11 @@
     public void activateService()
         throws Exception
     {
-        HazelcastConfiguration configuration = config.get();
+        HazelcastEntityStoreConfiguration configuration = config.get();
         Config conf = createConfig( configuration );
         hazelcastInstance = Hazelcast.newHazelcastInstance( conf );
         String mapName = DEFAULT_MAPNAME;
-        if( configuration != null && configuration.mapName() != null )
+        if( configuration != null && configuration.mapName() != null && configuration.mapName().get() != null )
         {
             mapName = configuration.mapName().get();
         }
@@ -148,7 +148,7 @@
         return stringMap.values().stream().map( StringReader::new );
     }
 
-    private Config createConfig( HazelcastConfiguration configuration )
+    private Config createConfig( HazelcastEntityStoreConfiguration configuration )
         throws IOException
     {
         String hzConfLocation = configuration.configXmlLocation().get();
diff --git a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/assembly/HazelcastEntityStoreAssembler.java b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/assembly/HazelcastEntityStoreAssembler.java
index 0fc1605..be0c8a8 100644
--- a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/assembly/HazelcastEntityStoreAssembler.java
+++ b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/assembly/HazelcastEntityStoreAssembler.java
@@ -20,10 +20,9 @@
 package org.apache.polygene.entitystore.hazelcast.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
-import org.apache.polygene.entitystore.hazelcast.HazelcastConfiguration;
+import org.apache.polygene.entitystore.hazelcast.HazelcastEntityStoreConfiguration;
 import org.apache.polygene.entitystore.hazelcast.HazelcastEntityStoreService;
 
 public class HazelcastEntityStoreAssembler
@@ -31,8 +30,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( HazelcastEntityStoreService.class ).
             visibleIn( visibility() ).
             instantiateOnStartup();
@@ -42,7 +41,7 @@
         }
         if( hasConfig() )
         {
-            configModule().entities( HazelcastConfiguration.class ).visibleIn( configVisibility() );
+            configModule().entities( HazelcastEntityStoreConfiguration.class ).visibleIn( configVisibility() );
         }
     }
 }
diff --git a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java
index c2d705f..37ee7f5 100644
--- a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java
+++ b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java
@@ -41,7 +41,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly configModule = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( configModule );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( configModule );
         // START SNIPPET: assembly
         new HazelcastEntityStoreAssembler().withConfig( configModule, Visibility.layer ).assemble( module );
     }
diff --git a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTestSuite.java b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTestSuite.java
new file mode 100644
index 0000000..346f0ea
--- /dev/null
+++ b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTestSuite.java
@@ -0,0 +1,48 @@
+/*
+ *  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.polygene.entitystore.hazelcast;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.hazelcast.assembly.HazelcastEntityStoreAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.After;
+
+public class HazelcastEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new HazelcastEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+
+    @After
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        super.tearDown();
+        // TODO : delete test data
+    }
+}
diff --git a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java
index 2b0cfa1..d9c76ec 100644
--- a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java
@@ -35,7 +35,7 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new HazelcastEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }
diff --git a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreConfiguration.java b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreConfiguration.java
similarity index 97%
rename from extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreConfiguration.java
rename to extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreConfiguration.java
index 8782ec9..b34b921 100644
--- a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreConfiguration.java
+++ b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreConfiguration.java
@@ -28,7 +28,7 @@
 /**
  * Configuration of JCloudsMapEntityStore service.
  */
-public interface JCloudsMapEntityStoreConfiguration
+public interface JCloudsEntityStoreConfiguration
 {
     // START SNIPPET: config
     /**
diff --git a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreMixin.java b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreMixin.java
similarity index 98%
rename from extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreMixin.java
rename to extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreMixin.java
index 2ab821b..38b8d74 100644
--- a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreMixin.java
+++ b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreMixin.java
@@ -69,7 +69,7 @@
 //      It defines where your entities are allowed to be stored.
 //      @UseDefaults Property<List<String>> geopoliticalBoundaries(); ???
 //      SEE  http://www.jclouds.org/documentation/reference/location-metadata-design
-public class JCloudsMapEntityStoreMixin
+public class JCloudsEntityStoreMixin
     implements ServiceActivation, MapEntityStore
 {
 
@@ -90,7 +90,7 @@
     );
 
     @This
-    private Configuration<JCloudsMapEntityStoreConfiguration> configuration;
+    private Configuration<JCloudsEntityStoreConfiguration> configuration;
 
     private BlobStoreContext storeContext;
 
diff --git a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreService.java b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreService.java
similarity index 93%
rename from extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreService.java
rename to extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreService.java
index 332be21..38c08b9 100644
--- a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsMapEntityStoreService.java
+++ b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/JCloudsEntityStoreService.java
@@ -36,8 +36,8 @@
  * <p>Based on @{@link JSONMapEntityStoreMixin}.</p>
  */
 @Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
-@Mixins( { JSONMapEntityStoreMixin.class, JCloudsMapEntityStoreMixin.class } )
-public interface JCloudsMapEntityStoreService
+@Mixins( { JSONMapEntityStoreMixin.class, JCloudsEntityStoreMixin.class } )
+public interface JCloudsEntityStoreService
     extends ServiceActivation,
             JSONMapEntityStoreActivation,
             EntityStore,
diff --git a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/assembly/JCloudsEntityStoreAssembler.java b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/assembly/JCloudsEntityStoreAssembler.java
index 304e7dd..aba1e32 100644
--- a/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/assembly/JCloudsEntityStoreAssembler.java
+++ b/extensions/entitystore-jclouds/src/main/java/org/apache/polygene/entitystore/jclouds/assembly/JCloudsEntityStoreAssembler.java
@@ -21,20 +21,19 @@
 package org.apache.polygene.entitystore.jclouds.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
-import org.apache.polygene.entitystore.jclouds.JCloudsMapEntityStoreConfiguration;
-import org.apache.polygene.entitystore.jclouds.JCloudsMapEntityStoreService;
+import org.apache.polygene.entitystore.jclouds.JCloudsEntityStoreConfiguration;
+import org.apache.polygene.entitystore.jclouds.JCloudsEntityStoreService;
 
 public class JCloudsEntityStoreAssembler
     extends Assemblers.VisibilityIdentityConfig<JCloudsEntityStoreAssembler>
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
-        ServiceDeclaration service = module.services( JCloudsMapEntityStoreService.class ).
+        super.assemble( module );
+        ServiceDeclaration service = module.services( JCloudsEntityStoreService.class ).
             visibleIn( visibility() ).
             instantiateOnStartup();
         if( hasIdentity() )
@@ -43,7 +42,7 @@
         }
         if( hasConfig() )
         {
-            configModule().entities( JCloudsMapEntityStoreConfiguration.class ).visibleIn( configVisibility() );
+            configModule().entities( JCloudsEntityStoreConfiguration.class ).visibleIn( configVisibility() );
         }
     }
 }
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java
index 91abf14..4c81082 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java
@@ -41,10 +41,10 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
-        JCloudsMapEntityStoreConfiguration defaults = config.forMixin( JCloudsMapEntityStoreConfiguration.class )
-                                                            .declareDefaults();
+        JCloudsEntityStoreConfiguration defaults = config.forMixin( JCloudsEntityStoreConfiguration.class )
+                                                         .declareDefaults();
         defaults.provider().set( "filesystem" );
         defaults.properties().set( Collections.singletonMap( FilesystemConstants.PROPERTY_BASEDIR,
                                                              tmpDir.getRoot().getAbsolutePath() ) );
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTestSuite.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTestSuite.java
new file mode 100644
index 0000000..d1eeb88
--- /dev/null
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTestSuite.java
@@ -0,0 +1,52 @@
+/*
+ *  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.polygene.entitystore.jclouds;
+
+import java.util.Collections;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.jclouds.assembly.JCloudsEntityStoreAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.jclouds.filesystem.reference.FilesystemConstants;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
+
+public class JCloudsFilesystemTestSuite extends EntityStoreTestSuite
+{
+    @Rule
+    public TemporaryFolder tmpDir = new TemporaryFolder();
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new JCloudsEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        JCloudsEntityStoreConfiguration defaults = configModule.forMixin( JCloudsEntityStoreConfiguration.class )
+                                                               .declareDefaults();
+        defaults.provider().set( "filesystem" );
+        defaults.properties().set( Collections.singletonMap( FilesystemConstants.PROPERTY_BASEDIR,
+                                                             tmpDir.getRoot().getAbsolutePath() ) );
+    }
+}
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
index 720b072..405d857 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
@@ -23,8 +23,8 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.jclouds.assembly.JCloudsEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.apache.polygene.test.internal.DockerRule;
 import org.junit.ClassRule;
 
 public class JCloudsS3Test extends AbstractEntityStoreTest
@@ -37,10 +37,11 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
-        JCloudsMapEntityStoreConfiguration defaults = config.forMixin( JCloudsMapEntityStoreConfiguration.class )
-                                                            .declareDefaults();
+        JCloudsEntityStoreConfiguration defaults =
+            config.forMixin( JCloudsEntityStoreConfiguration.class ).declareDefaults();
+
         String host = DOCKER.getDockerHost();
         int port = DOCKER.getExposedContainerPort( "8000/tcp" );
         defaults.provider().set( "s3" );
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3TestSuite.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3TestSuite.java
new file mode 100644
index 0000000..1b43c7d
--- /dev/null
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3TestSuite.java
@@ -0,0 +1,53 @@
+/*
+ *  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.polygene.entitystore.jclouds;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.jclouds.assembly.JCloudsEntityStoreAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+public class JCloudsS3TestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "s3server", "server started" );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new JCloudsEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        JCloudsEntityStoreConfiguration defaults =
+            configModule.forMixin( JCloudsEntityStoreConfiguration.class ).declareDefaults();
+
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "8000/tcp" );
+        defaults.provider().set( "s3" );
+        defaults.endpoint().set( "http://" + host + ':' + port );
+        defaults.identifier().set( "dummyIdentifier" );
+        defaults.credential().set( "dummyCredential" );
+    }
+}
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java
index 266c0e1..c47b2e1 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java
@@ -34,7 +34,7 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         // END SNIPPET: assembly
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTestSuite.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTestSuite.java
new file mode 100644
index 0000000..186d7f0
--- /dev/null
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTestSuite.java
@@ -0,0 +1,39 @@
+/*
+ *  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.polygene.entitystore.jclouds;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.jclouds.assembly.JCloudsEntityStoreAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+
+public class JCloudsTransientTestSuite extends EntityStoreTestSuite
+{
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new JCloudsEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+}
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java
index 72f89cf..30ae92b 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java
@@ -35,7 +35,7 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }
diff --git a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmConfiguration.java b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreConfiguration.java
similarity index 96%
rename from extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmConfiguration.java
rename to extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreConfiguration.java
index 03143a1..8997063 100644
--- a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmConfiguration.java
+++ b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreConfiguration.java
@@ -27,7 +27,7 @@
  * Configuration for the JdbmEntityStoreService.
  */
 // START SNIPPET: config
-public interface JdbmConfiguration
+public interface JdbmEntityStoreConfiguration
 {
     // END SNIPPET: config
    /**
diff --git a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreMixin.java b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreMixin.java
index 312c002..9490dc5 100644
--- a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreMixin.java
+++ b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreMixin.java
@@ -74,7 +74,7 @@
     FileConfiguration fileConfiguration;
 
     @This
-    private Configuration<JdbmConfiguration> config;
+    private Configuration<JdbmEntityStoreConfiguration> config;
 
     @Uses
     private ServiceDescriptor descriptor;
@@ -438,7 +438,7 @@
 
     private Properties getProperties()
     {
-        JdbmConfiguration config = this.config.get();
+        JdbmEntityStoreConfiguration config = this.config.get();
 
         Properties properties = new Properties();
 
diff --git a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreService.java b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreService.java
index e9d9d94..1ce92a2 100644
--- a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreService.java
+++ b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreService.java
@@ -25,7 +25,11 @@
 import org.apache.polygene.library.locking.LockingAbstractComposite;
 import org.apache.polygene.library.locking.ReadLockConcern;
 import org.apache.polygene.library.locking.WriteLockConcern;
-import org.apache.polygene.spi.entitystore.*;
+import org.apache.polygene.spi.entitystore.BackupRestore;
+import org.apache.polygene.spi.entitystore.ConcurrentModificationCheckConcern;
+import org.apache.polygene.spi.entitystore.EntityStateVersions;
+import org.apache.polygene.spi.entitystore.EntityStore;
+import org.apache.polygene.spi.entitystore.StateChangeNotificationConcern;
 import org.apache.polygene.spi.entitystore.helpers.JSONMapEntityStoreActivation;
 import org.apache.polygene.spi.entitystore.helpers.JSONMapEntityStoreMixin;
 import org.apache.polygene.spi.entitystore.helpers.StateStore;
@@ -44,6 +48,6 @@
             StateStore,
             BackupRestore,
             LockingAbstractComposite,
-            Configuration<JdbmConfiguration>
+            Configuration<JdbmEntityStoreConfiguration>
 {
 }
diff --git a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/assembly/JdbmEntityStoreAssembler.java b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/assembly/JdbmEntityStoreAssembler.java
index f62e792..f48d3cb 100644
--- a/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/assembly/JdbmEntityStoreAssembler.java
+++ b/extensions/entitystore-jdbm/src/main/java/org/apache/polygene/entitystore/jdbm/assembly/JdbmEntityStoreAssembler.java
@@ -20,10 +20,9 @@
 package org.apache.polygene.entitystore.jdbm.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
-import org.apache.polygene.entitystore.jdbm.JdbmConfiguration;
+import org.apache.polygene.entitystore.jdbm.JdbmEntityStoreConfiguration;
 import org.apache.polygene.entitystore.jdbm.JdbmEntityStoreService;
 
 public class JdbmEntityStoreAssembler
@@ -31,8 +30,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( JdbmEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
@@ -40,7 +39,7 @@
         }
         if( hasConfig() )
         {
-            configModule().entities( JdbmConfiguration.class ).visibleIn( configVisibility() );
+            configModule().entities( JdbmEntityStoreConfiguration.class ).visibleIn( configVisibility() );
         }
     }
 }
diff --git a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java
index bd3cef4..822201d 100644
--- a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java
+++ b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java
@@ -43,7 +43,7 @@
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
diff --git a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTestSuite.java b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTestSuite.java
new file mode 100644
index 0000000..959c83f
--- /dev/null
+++ b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTestSuite.java
@@ -0,0 +1,47 @@
+/*
+ *  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.polygene.entitystore.jdbm;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.jdbm.assembly.JdbmEntityStoreAssembler;
+import org.apache.polygene.library.fileconfig.FileConfigurationAssembler;
+import org.apache.polygene.library.fileconfig.FileConfigurationOverride;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
+
+public class JdbmEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Rule
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new FileConfigurationAssembler()
+            .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
+            .assemble( module );
+        new JdbmEntityStoreAssembler().visibleIn( Visibility.application )
+                                      .withConfig( configModule, Visibility.application )
+                                      .assemble( module );
+    }
+}
diff --git a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java
index b6bed70..742d69f 100644
--- a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java
@@ -43,7 +43,7 @@
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
diff --git a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
index 1042b69..b1131f8 100644
--- a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
+++ b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
@@ -58,5 +58,8 @@
 
     @Optional
     Property<Integer> writeBufferSize();
+
+    @Optional
+    Property<Boolean> errorIfExists();
 }
 // END SNIPPET: config
diff --git a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
index 1db246e..6e8eecf 100644
--- a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
+++ b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
@@ -127,6 +127,10 @@
         {
             options.writeBufferSize( config.writeBufferSize().get() );
         }
+        if( config.errorIfExists().get() != null )
+        {
+            options.errorIfExists( config.errorIfExists().get() );
+        }
 
         // Open/Create the database
         File dbFile = new File( fileConfig.dataDirectory(), descriptor.identity().toString() );
@@ -236,8 +240,7 @@
     public void applyChanges( MapChanges changes )
         throws Exception
     {
-        final WriteBatch writeBatch = db.createWriteBatch();
-        try
+        try( WriteBatch writeBatch = db.createWriteBatch() )
         {
             changes.visitMap( new MapChanger()
             {
@@ -257,7 +260,6 @@
                             String jsonState = toString();
                             writeBatch.put( ref.identity().toString().getBytes( charset ), jsonState.getBytes( charset ) );
                         }
-
                     };
                 }
 
@@ -277,7 +279,6 @@
                             writeBatch.put( mapChange.reference().identity().toString().getBytes( charset ),
                                             jsonState.getBytes( charset ) );
                         }
-
                     };
                 }
 
@@ -287,14 +288,8 @@
                 {
                     writeBatch.delete( ref.identity().toString().getBytes( charset ) );
                 }
-
             } );
             db.write( writeBatch );
         }
-        finally
-        {
-            writeBatch.close();
-        }
     }
-
 }
diff --git a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/assembly/LevelDBEntityStoreAssembler.java b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/assembly/LevelDBEntityStoreAssembler.java
index aec01be..1a8a26a 100644
--- a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/assembly/LevelDBEntityStoreAssembler.java
+++ b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/assembly/LevelDBEntityStoreAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.entitystore.leveldb.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.leveldb.LevelDBEntityStoreConfiguration;
@@ -34,8 +33,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( LevelDBEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
diff --git a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java
index c5d4cdc..edd9563 100644
--- a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java
+++ b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java
@@ -44,7 +44,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().visibleIn( Visibility.module ).assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
diff --git a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTestSuite.java b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTestSuite.java
new file mode 100644
index 0000000..70c8929
--- /dev/null
+++ b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTestSuite.java
@@ -0,0 +1,52 @@
+/*
+ *  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.polygene.entitystore.leveldb;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.leveldb.assembly.LevelDBEntityStoreAssembler;
+import org.apache.polygene.library.fileconfig.FileConfigurationAssembler;
+import org.apache.polygene.library.fileconfig.FileConfigurationOverride;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
+
+public class JavaLevelDBEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Rule
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new FileConfigurationAssembler()
+            .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
+            .assemble( module );
+
+        new LevelDBEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .identifiedBy( "java-leveldb-entitystore" )
+            .assemble( module );
+
+        configModule.forMixin( LevelDBEntityStoreConfiguration.class ).declareDefaults().flavour().set( "java" );
+    }
+}
diff --git a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java
index 819d930..c072f4d 100644
--- a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java
+++ b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java
@@ -20,40 +20,33 @@
 package org.apache.polygene.entitystore.leveldb;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.leveldb.assembly.LevelDBEntityStoreAssembler;
 import org.apache.polygene.library.fileconfig.FileConfigurationAssembler;
 import org.apache.polygene.library.fileconfig.FileConfigurationOverride;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-public class JniLevelDBEntityStoreTest
-    extends AbstractEntityStoreTest
+public class JniLevelDBEntityStoreTest extends EntityStoreTestSuite
 {
     @Rule
     public final TemporaryFolder tmpDir = new TemporaryFolder();
 
     @Override
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
+    protected void defineStorageModule( ModuleAssembly module )
     {
-        super.assemble( module );
-
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().visibleIn( Visibility.module ).assemble( config );
-
+        module.defaultServices();
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
             .assemble( module );
 
         new LevelDBEntityStoreAssembler()
-            .withConfig( config, Visibility.layer )
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
             .identifiedBy( "jni-leveldb-entitystore" )
             .assemble( module );
 
-        config.forMixin( LevelDBEntityStoreConfiguration.class ).declareDefaults().flavour().set( "jni" );
+        configModule.forMixin( LevelDBEntityStoreConfiguration.class ).declareDefaults().flavour().set( "jni" );
     }
 }
diff --git a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java
index 9840501..cdb9251 100644
--- a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java
@@ -42,7 +42,7 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().visibleIn( Visibility.module ).assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
diff --git a/extensions/entitystore-memory/src/main/java/org/apache/polygene/entitystore/memory/assembly/MemoryEntityStoreAssembler.java b/extensions/entitystore-memory/src/main/java/org/apache/polygene/entitystore/memory/assembly/MemoryEntityStoreAssembler.java
index 80cd4c3..6b11a85 100644
--- a/extensions/entitystore-memory/src/main/java/org/apache/polygene/entitystore/memory/assembly/MemoryEntityStoreAssembler.java
+++ b/extensions/entitystore-memory/src/main/java/org/apache/polygene/entitystore/memory/assembly/MemoryEntityStoreAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.entitystore.memory.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
@@ -33,8 +32,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( MemoryEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
diff --git a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java
index f36cca5..5c1c08a 100644
--- a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java
+++ b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java
@@ -33,6 +33,7 @@
         new MemoryEntityStoreAssembler().assemble( module );
         // END SNIPPET: assembly
         super.assemble( module );
+        module.defaultServices();
         // START SNIPPET: assembly
     }
     // END SNIPPET: assembly
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTestSuite.java
similarity index 62%
copy from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
copy to extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTestSuite.java
index 275cb27..01d4b33 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
+++ b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTestSuite.java
@@ -17,23 +17,21 @@
  *
  *
  */
+package org.apache.polygene.entitystore.memory;
 
-package org.apache.polygene.library.restlet.assembly.infrastructue;
-
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.layered.ModuleAssembler;
+import org.apache.polygene.entitystore.memory.assembly.MemoryEntityStoreAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
 
-public class SerializationModule
-    implements ModuleAssembler
+public class MemoryEntityStoreTestSuite extends EntityStoreTestSuite
 {
-    public static final String NAME = "Serialization Module";
-
     @Override
-    public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
+    protected void defineStorageModule( ModuleAssembly module )
     {
-        return module;
+        module.defaultServices();
+        new MemoryEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .assemble( module );
     }
 }
diff --git a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java
index 28dc102..3d51b2c 100644
--- a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java
@@ -33,5 +33,6 @@
     {
         super.assemble( module );
         new MemoryEntityStoreAssembler().assemble( module );
+        module.defaultServices();
     }
 }
diff --git a/extensions/entitystore-mongodb/build.gradle b/extensions/entitystore-mongodb/build.gradle
index 8ace38e..940db5a 100644
--- a/extensions/entitystore-mongodb/build.gradle
+++ b/extensions/entitystore-mongodb/build.gradle
@@ -32,7 +32,7 @@
 
   runtimeOnly polygene.core.runtime
 
-  testImplementation polygene.core.testsupport
+  testImplementation polygene.internals.testsupport
   testImplementation libraries.embed_mongo
 
   testRuntimeOnly libraries.logback
diff --git a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoAccessors.java b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBAccessors.java
similarity index 96%
rename from extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoAccessors.java
rename to extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBAccessors.java
index 2d3ddd8..d6b5723 100644
--- a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoAccessors.java
+++ b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBAccessors.java
@@ -22,7 +22,7 @@
 import com.mongodb.MongoClient;
 import com.mongodb.client.MongoDatabase;
 
-public interface MongoAccessors
+public interface MongoDBAccessors
 {
     MongoClient mongoInstanceUsed();
 
diff --git a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoEntityStoreConfiguration.java b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreConfiguration.java
similarity index 98%
rename from extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoEntityStoreConfiguration.java
rename to extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreConfiguration.java
index 75c95ac..2e8146e 100644
--- a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoEntityStoreConfiguration.java
+++ b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreConfiguration.java
@@ -25,7 +25,7 @@
 import org.apache.polygene.api.property.Property;
 
 // START SNIPPET: config
-public interface MongoEntityStoreConfiguration
+public interface MongoDBEntityStoreConfiguration
 {
 
     @Optional
diff --git a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreMixin.java b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
similarity index 96%
rename from extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreMixin.java
rename to extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
index 3766b82..306d6e7 100644
--- a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreMixin.java
+++ b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
@@ -58,15 +58,15 @@
 /**
  * MongoDB implementation of MapEntityStore.
  */
-public class MongoMapEntityStoreMixin
-    implements ServiceActivation, MapEntityStore, MongoAccessors
+public class MongoDBEntityStoreMixin
+    implements ServiceActivation, MapEntityStore, MongoDBAccessors
 {
     private static final String DEFAULT_DATABASE_NAME = "polygene:entitystore";
-    private static final String DEFAULT_COLLECTION_NAME = "polygene:entitystore:entities";
+    private static final String DEFAULT_COLLECTION_NAME = "entities";
     public static final String IDENTITY_COLUMN = "_id";
     public static final String STATE_COLUMN = "state";
     @This
-    private Configuration<MongoEntityStoreConfiguration> configuration;
+    private Configuration<MongoDBEntityStoreConfiguration> configuration;
     private List<ServerAddress> serverAddresses;
     private String databaseName;
     private String collectionName;
@@ -107,7 +107,7 @@
         throws UnknownHostException
     {
         configuration.refresh();
-        MongoEntityStoreConfiguration config = configuration.get();
+        MongoDBEntityStoreConfiguration config = configuration.get();
 
         // Combine hostname, port and nodes configuration properties
         // If no configuration, use 127.0.0.1:27017
diff --git a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreService.java b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreService.java
similarity index 92%
rename from extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreService.java
rename to extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreService.java
index 2145544..df2c510 100644
--- a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreService.java
+++ b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreService.java
@@ -36,14 +36,14 @@
  * <p>Based on @{@link JSONMapEntityStoreMixin}.</p>
  */
 @Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
-@Mixins( { JSONMapEntityStoreMixin.class, MongoMapEntityStoreMixin.class } )
-public interface MongoMapEntityStoreService
+@Mixins( { JSONMapEntityStoreMixin.class, MongoDBEntityStoreMixin.class } )
+public interface MongoDBEntityStoreService
     extends EntityStore,
             EntityStateVersions,
             ServiceActivation,
             JSONMapEntityStoreActivation,
             LockingAbstractComposite,
             Configuration,
-            MongoAccessors
+            MongoDBAccessors
 {
 }
diff --git a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/assembly/MongoDBEntityStoreAssembler.java b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/assembly/MongoDBEntityStoreAssembler.java
index a270305..f212a8d 100644
--- a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/assembly/MongoDBEntityStoreAssembler.java
+++ b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/assembly/MongoDBEntityStoreAssembler.java
@@ -20,27 +20,26 @@
 package org.apache.polygene.entitystore.mongodb.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
-import org.apache.polygene.entitystore.mongodb.MongoEntityStoreConfiguration;
-import org.apache.polygene.entitystore.mongodb.MongoMapEntityStoreService;
+import org.apache.polygene.entitystore.mongodb.MongoDBEntityStoreConfiguration;
+import org.apache.polygene.entitystore.mongodb.MongoDBEntityStoreService;
 
 public class MongoDBEntityStoreAssembler
     extends Assemblers.VisibilityIdentityConfig<MongoDBEntityStoreAssembler>
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
-        ServiceDeclaration service = module.services( MongoMapEntityStoreService.class ).visibleIn( visibility() );
+        super.assemble( module );
+        ServiceDeclaration service = module.services( MongoDBEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
             service.identifiedBy( identity() );
         }
         if( hasConfig() )
         {
-            configModule().entities( MongoEntityStoreConfiguration.class ).visibleIn( configVisibility() );
+            configModule().entities( MongoDBEntityStoreConfiguration.class ).visibleIn( configVisibility() );
         }
     }
 }
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
similarity index 87%
rename from extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
rename to extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
index 5a65389..c362490 100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
@@ -37,7 +37,7 @@
 import org.junit.Rule;
 import org.junit.rules.TestName;
 
-public class EmbedMongoMapEntityStoreTest extends AbstractEntityStoreTest
+public class EmbedMongoDBMapEntityStoreTest extends AbstractEntityStoreTest
 {
     private static final MongodStarter MONGO_STARTER = MongodStarter.getDefaultInstance();
 
@@ -74,13 +74,13 @@
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
 
-        MongoEntityStoreConfiguration mongoConfig = config.forMixin( MongoEntityStoreConfiguration.class )
-                                                          .declareDefaults();
-        mongoConfig.writeConcern().set( MongoEntityStoreConfiguration.WriteConcern.MAJORITY );
+        MongoDBEntityStoreConfiguration mongoConfig = config.forMixin( MongoDBEntityStoreConfiguration.class )
+                                                            .declareDefaults();
+        mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
         mongoConfig.database().set( "polygene-test" );
         mongoConfig.collection().set( testName.getMethodName() );
         mongoConfig.nodes().set( Collections.singletonList( "localhost:" + port ) );
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
similarity index 75%
copy from extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
copy to extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
index 5a65389..57c1e16 100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
@@ -26,18 +26,16 @@
 import java.io.IOException;
 import java.util.Collections;
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
 import org.apache.polygene.test.util.FreePortFinder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.rules.TestName;
 
-public class EmbedMongoMapEntityStoreTest extends AbstractEntityStoreTest
+public class EmbedMongoDBMapEntityStoreTestSuite extends EntityStoreTestSuite
 {
     private static final MongodStarter MONGO_STARTER = MongodStarter.getDefaultInstance();
 
@@ -68,19 +66,17 @@
     }
 
     @Override
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
+    protected void defineStorageModule( ModuleAssembly module )
     {
-        super.assemble( module );
+        module.defaultServices();
+        new MongoDBEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
 
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
-
-        new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
-
-        MongoEntityStoreConfiguration mongoConfig = config.forMixin( MongoEntityStoreConfiguration.class )
-                                                          .declareDefaults();
-        mongoConfig.writeConcern().set( MongoEntityStoreConfiguration.WriteConcern.MAJORITY );
+        MongoDBEntityStoreConfiguration mongoConfig = configModule.forMixin( MongoDBEntityStoreConfiguration.class )
+                                                                  .declareDefaults();
+        mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
         mongoConfig.database().set( "polygene-test" );
         mongoConfig.collection().set( testName.getMethodName() );
         mongoConfig.nodes().set( Collections.singletonList( "localhost:" + port ) );
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTest.java
similarity index 72%
rename from extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java
rename to extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTest.java
index 9c48fe5..8a7876a 100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTest.java
@@ -25,22 +25,17 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.junit.BeforeClass;
-
-import static org.apache.polygene.test.util.Assume.assumeConnectivity;
+import org.junit.ClassRule;
 
 /**
- * Test the MongoMapEntityStoreService.
- * <p>Installing mongodb and starting it should suffice as the test use mongodb defaults: 127.0.0.1:27017</p>
+ * Test the MongoDBEntityStoreService.
  */
-public class MongoMapEntityStoreTest extends AbstractEntityStoreTest
+public class MongoDBEntityStoreTest extends AbstractEntityStoreTest
 {
-    @BeforeClass
-    public static void beforeRedisMapEntityStoreTests()
-    {
-        assumeConnectivity( "localhost", 27017 );
-    }
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "mongo", 27017 );
 
     @Override
     // START SNIPPET: assembly
@@ -51,16 +46,18 @@
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         // END SNIPPET: assembly
 
-        MongoEntityStoreConfiguration mongoConfig = config.forMixin( MongoEntityStoreConfiguration.class ).declareDefaults();
-        mongoConfig.writeConcern().set( MongoEntityStoreConfiguration.WriteConcern.MAJORITY );
+        MongoDBEntityStoreConfiguration mongoConfig = config.forMixin( MongoDBEntityStoreConfiguration.class ).declareDefaults();
+        mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
         mongoConfig.database().set( "polygene:test" );
         mongoConfig.collection().set( "polygene:test:entities" );
+        mongoConfig.hostname().set( DOCKER.getDockerHost() );
+        mongoConfig.port().set( DOCKER.getExposedContainerPort( "27017/tcp" ) );
         // START SNIPPET: assembly
     }
 
@@ -73,7 +70,7 @@
         throws Exception
     {
         super.setUp();
-        MongoMapEntityStoreService es = serviceFinder.findService( MongoMapEntityStoreService.class ).get();
+        MongoDBEntityStoreService es = serviceFinder.findService( MongoDBEntityStoreService.class ).get();
         mongo = es.mongoInstanceUsed();
         dbName = es.dbInstanceUsed().getName();
     }
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTestSuite.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTestSuite.java
new file mode 100644
index 0000000..109ff43
--- /dev/null
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreTestSuite.java
@@ -0,0 +1,77 @@
+/*
+ *  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.polygene.entitystore.mongodb;
+
+import com.mongodb.Mongo;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+/**
+ * Test the MongoDBEntityStoreService.
+ */
+public class MongoDBEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "mongo", 27017 );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        new MongoDBEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        MongoDBEntityStoreConfiguration mongoConfig = configModule.forMixin( MongoDBEntityStoreConfiguration.class ).declareDefaults();
+        mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
+        mongoConfig.database().set( "polygene:test" );
+        mongoConfig.collection().set( "polygene:test:entities" );
+        mongoConfig.hostname().set( DOCKER.getDockerHost() );
+        mongoConfig.port().set( DOCKER.getExposedContainerPort( "27017/tcp" ) );
+    }
+
+    private Mongo mongo;
+    private String dbName;
+
+    @Override
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        MongoDBEntityStoreService es = storageModule.serviceFinder().findService( MongoDBEntityStoreService.class ).get();
+        mongo = es.mongoInstanceUsed();
+        dbName = es.dbInstanceUsed().getName();
+    }
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        mongo.dropDatabase( dbName );
+        super.tearDown();
+    }
+}
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreWithCacheTest.java
similarity index 71%
rename from extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java
rename to extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreWithCacheTest.java
index cad95ea..8fab686 100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreWithCacheTest.java
@@ -26,22 +26,17 @@
 import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.cache.AbstractEntityStoreWithCacheTest;
-import org.junit.BeforeClass;
-
-import static org.apache.polygene.test.util.Assume.assumeConnectivity;
+import org.apache.polygene.test.docker.DockerRule;
+import org.junit.ClassRule;
 
 /**
- * Test the MongoMapEntityStoreService usage with a CachePool.
- * <p>Installing mongodb and starting it should suffice as the test use mongodb defaults: 127.0.0.1:27017</p>
+ * Test the MongoDBEntityStoreService usage with a CachePool.
  */
-public class MongoMapEntityStoreWithCacheTest
+public class MongoDBEntityStoreWithCacheTest
     extends AbstractEntityStoreWithCacheTest
 {
-    @BeforeClass
-    public static void beforeRedisMapEntityStoreTests()
-    {
-        assumeConnectivity( "localhost", 27017 );
-    }
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "mongo", 27017 );
 
     @Override
     public void assemble( ModuleAssembly module )
@@ -50,14 +45,16 @@
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
 
-        MongoEntityStoreConfiguration mongoConfig = config.forMixin( MongoEntityStoreConfiguration.class ).declareDefaults();
-        mongoConfig.writeConcern().set( MongoEntityStoreConfiguration.WriteConcern.MAJORITY );
+        MongoDBEntityStoreConfiguration mongoConfig = config.forMixin( MongoDBEntityStoreConfiguration.class ).declareDefaults();
+        mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
         mongoConfig.database().set( "polygene:test" );
         mongoConfig.collection().set( "polygene:test:entities" );
+        mongoConfig.hostname().set( DOCKER.getDockerHost() );
+        mongoConfig.port().set( DOCKER.getExposedContainerPort( "27017/tcp" ) );
     }
 
     private Mongo mongo;
@@ -68,7 +65,7 @@
         throws Exception
     {
         super.setUp();
-        MongoMapEntityStoreService es = serviceFinder.findService( MongoMapEntityStoreService.class ).get();
+        MongoDBEntityStoreService es = serviceFinder.findService( MongoDBEntityStoreService.class ).get();
         mongo = es.mongoInstanceUsed();
         dbName = es.dbInstanceUsed().getName();
 
diff --git a/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreMixin.java b/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreMixin.java
index 7958840..9c61b50 100644
--- a/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreMixin.java
+++ b/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreMixin.java
@@ -213,7 +213,7 @@
             EntityDescriptor entityDescriptor = module.entityDescriptor( type );
             if( entityDescriptor == null )
             {
-                throw new NoSuchEntityTypeException( type, module.name(), module.typeLookup() );
+                throw new NoSuchEntityTypeException( type, module );
             }
 
             Map<QualifiedName, Object> properties = new HashMap<>();
@@ -569,17 +569,21 @@
                 for( Map.Entry<QualifiedName, List<EntityReference>> manyAssociation : state.manyAssociations()
                     .entrySet() )
                 {
-                    StringBuilder manyAssocs = new StringBuilder();
-                    for( EntityReference entityReference : manyAssociation.getValue() )
+                    if( manyAssociation.getValue().isEmpty() )
                     {
-                        if( manyAssocs.length() > 0 )
-                        {
-                            manyAssocs.append( "\n" );
-                        }
-                        manyAssocs.append( entityReference.identity().toString() );
+                        manyAssocsPrefs.remove( manyAssociation.getKey().name() );
                     }
-                    if( manyAssocs.length() > 0 )
+                    else
                     {
+                        StringBuilder manyAssocs = new StringBuilder();
+                        for( EntityReference entityReference : manyAssociation.getValue() )
+                        {
+                            if( manyAssocs.length() > 0 )
+                            {
+                                manyAssocs.append( "\n" );
+                            }
+                            manyAssocs.append( entityReference.identity().toString() );
+                        }
                         manyAssocsPrefs.put( manyAssociation.getKey().name(), manyAssocs.toString() );
                     }
                 }
@@ -592,18 +596,24 @@
                 for( Map.Entry<QualifiedName, Map<String, EntityReference>> namedAssociation : state.namedAssociations()
                     .entrySet() )
                 {
-                    StringBuilder namedAssocs = new StringBuilder();
-                    for( Map.Entry<String, EntityReference> namedRef : namedAssociation.getValue().entrySet() )
+                    if( namedAssociation.getValue().isEmpty() )
                     {
-                        if( namedAssocs.length() > 0 )
-                        {
-                            namedAssocs.append( "\n" );
-                        }
-                        namedAssocs.append( namedRef.getKey() ).append( "\n" ).append( namedRef.getValue().identity().toString() );
+                        namedAssocsPrefs.remove( namedAssociation.getKey().name() );
                     }
-                    if( namedAssocs.length() > 0 )
+                    else
                     {
-                        namedAssocsPrefs.put( namedAssociation.getKey().name(), namedAssocs.toString() );
+                        StringBuilder namedAssocs = new StringBuilder();
+                        for( Map.Entry<String, EntityReference> namedRef : namedAssociation.getValue().entrySet() )
+                        {
+                            if( namedAssocs.length() > 0 )
+                            {
+                                namedAssocs.append( "\n" );
+                            }
+                            namedAssocs.append( namedRef.getKey() ).append( "\n" ).append(
+                                namedRef.getValue().identity().toString() );
+                        }
+                        String key = namedAssociation.getKey().name();
+                        namedAssocsPrefs.put( key, namedAssocs.toString() );
                     }
                 }
             }
diff --git a/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/assembly/PreferencesEntityStoreAssembler.java b/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/assembly/PreferencesEntityStoreAssembler.java
index 53ea9de..4f6725a 100644
--- a/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/assembly/PreferencesEntityStoreAssembler.java
+++ b/extensions/entitystore-preferences/src/main/java/org/apache/polygene/entitystore/preferences/assembly/PreferencesEntityStoreAssembler.java
@@ -21,28 +21,26 @@
 
 import java.util.prefs.Preferences;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreInfo;
 import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreService;
 
-public class PreferencesEntityStoreAssembler
-    extends Assemblers.VisibilityIdentityConfig<PreferencesEntityStoreAssembler>
+public class PreferencesEntityStoreAssembler extends Assemblers.VisibilityIdentityConfig<PreferencesEntityStoreAssembler>
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         String applicationName = module.layer().application().name();
 
         Preferences root = Preferences.userRoot();
         Preferences node = root.node( applicationName );
         PreferencesEntityStoreInfo info = new PreferencesEntityStoreInfo( node );
         ServiceDeclaration service = module.services( PreferencesEntityStoreService.class )
-            .setMetaInfo( info )
-            .visibleIn( visibility() )
-            .instantiateOnStartup();
+                                           .setMetaInfo( info )
+                                           .visibleIn( visibility() )
+                                           .instantiateOnStartup();
         if( hasIdentity() )
         {
             service.identifiedBy( identity() );
diff --git a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java
index 9801ded..648d62a 100644
--- a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java
+++ b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java
@@ -22,8 +22,6 @@
 import java.util.prefs.Preferences;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreInfo;
-import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreService;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
@@ -50,5 +48,7 @@
         PreferencesEntityStoreInfo metaInfo = new PreferencesEntityStoreInfo( node );
         Thread.currentThread().setContextClassLoader( cl );
         module.services( PreferencesEntityStoreService.class ).setMetaInfo( metaInfo ).instantiateOnStartup();
+
+        module.defaultServices();
     }
 }
diff --git a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTestSuite.java b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTestSuite.java
new file mode 100644
index 0000000..4ca18b4
--- /dev/null
+++ b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTestSuite.java
@@ -0,0 +1,56 @@
+/*
+ *  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.polygene.entitystore.preferences;
+
+import java.util.prefs.BackingStoreException;
+import java.util.prefs.Preferences;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.preferences.assembly.PreferencesEntityStoreAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.rules.TemporaryFolder;
+
+public class PreferencesEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Rule
+    public TemporaryFolder tmpDir = new TemporaryFolder();
+    private Preferences rootNode;
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        String applicationName = module.layer().application().name();
+        rootNode = Preferences.userRoot().node( applicationName );
+
+        new PreferencesEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .assemble( module );
+    }
+
+    @After
+    public void tearDown()
+        throws BackingStoreException
+    {
+        rootNode.removeNode();
+    }
+}
diff --git a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreConfiguration.java b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreConfiguration.java
index c3ba3f1..8b001bc 100644
--- a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreConfiguration.java
+++ b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreConfiguration.java
@@ -23,7 +23,7 @@
 import org.apache.polygene.api.property.Property;
 
 /**
- * Configuration for RedisMapEntityStoreService.
+ * Configuration for RedisEntityStoreService.
  */
 // START SNIPPET: config
 public interface RedisEntityStoreConfiguration
diff --git a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreMixin.java b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreMixin.java
similarity index 99%
rename from extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreMixin.java
rename to extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreMixin.java
index 0fcb2c5..f3a3b11 100644
--- a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreMixin.java
+++ b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreMixin.java
@@ -42,7 +42,7 @@
 /**
  * Redis implementation of MapEntityStore.
  */
-public class RedisMapEntityStoreMixin
+public class RedisEntityStoreMixin
     implements ServiceActivation, RedisAccessors, MapEntityStore
 {
     private static final String DEFAULT_HOST = "127.0.0.1";
diff --git a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreService.java b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreService.java
similarity index 94%
rename from extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreService.java
rename to extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreService.java
index 0ebaa52..8e2ed6b 100644
--- a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreService.java
+++ b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/RedisEntityStoreService.java
@@ -36,8 +36,8 @@
  * <p>Based on @{@link JSONMapEntityStoreMixin}.</p>
  */
 @Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
-@Mixins( { JSONMapEntityStoreMixin.class, RedisMapEntityStoreMixin.class } )
-public interface RedisMapEntityStoreService
+@Mixins( { JSONMapEntityStoreMixin.class, RedisEntityStoreMixin.class } )
+public interface RedisEntityStoreService
         extends EntityStore,
                 EntityStateVersions,
                 ServiceActivation,
diff --git a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/assembly/RedisEntityStoreAssembler.java b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/assembly/RedisEntityStoreAssembler.java
index a0d8f04..7c1ebca 100644
--- a/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/assembly/RedisEntityStoreAssembler.java
+++ b/extensions/entitystore-redis/src/main/java/org/apache/polygene/entitystore/redis/assembly/RedisEntityStoreAssembler.java
@@ -20,11 +20,10 @@
 package org.apache.polygene.entitystore.redis.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.redis.RedisEntityStoreConfiguration;
-import org.apache.polygene.entitystore.redis.RedisMapEntityStoreService;
+import org.apache.polygene.entitystore.redis.RedisEntityStoreService;
 
 /**
  * Redis EntityStore assembly.
@@ -34,9 +33,9 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
-        ServiceDeclaration service = module.services( RedisMapEntityStoreService.class ).visibleIn( visibility() );
+        super.assemble( module );
+        ServiceDeclaration service = module.services( RedisEntityStoreService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
             service.identifiedBy( identity() );
diff --git a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTest.java
similarity index 90%
rename from extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java
rename to extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTest.java
index e654afc..401f703 100644
--- a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java
+++ b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTest.java
@@ -24,13 +24,13 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.redis.assembly.RedisEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.apache.polygene.test.internal.DockerRule;
 import org.junit.ClassRule;
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.JedisPool;
 
-public class RedisMapEntityStoreTest
+public class RedisEntityStoreTest
     extends AbstractEntityStoreTest
 {
     @ClassRule
@@ -44,7 +44,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new RedisEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         // END SNIPPET: assembly
@@ -63,7 +63,7 @@
         throws Exception
     {
         super.setUp();
-        RedisMapEntityStoreService es = serviceFinder.findService( RedisMapEntityStoreService.class ).get();
+        RedisEntityStoreService es = serviceFinder.findService( RedisEntityStoreService.class ).get();
         jedisPool = es.jedisPool();
     }
 
diff --git a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTestSuite.java
similarity index 65%
copy from extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
copy to extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTestSuite.java
index 1dba76a..6ae99a1 100644
--- a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreTestSuite.java
@@ -20,32 +20,31 @@
 package org.apache.polygene.entitystore.redis;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.redis.assembly.RedisEntityStoreAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.cache.AbstractEntityStoreWithCacheTest;
-import org.apache.polygene.test.internal.DockerRule;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
 import org.junit.ClassRule;
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.JedisPool;
 
-public class RedisMapEntityStoreWithCacheTest
-    extends AbstractEntityStoreWithCacheTest
+public class RedisEntityStoreTestSuite extends EntityStoreTestSuite
 {
     @ClassRule
     public static final DockerRule DOCKER = new DockerRule( "redis", 6379 );
 
     @Override
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
+    protected void defineStorageModule( ModuleAssembly module )
     {
-        super.assemble( module );
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
-        new RedisEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
-        RedisEntityStoreConfiguration redisConfig = config.forMixin( RedisEntityStoreConfiguration.class )
-                                                          .declareDefaults();
+        module.defaultServices();
+        new RedisEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        RedisEntityStoreConfiguration redisConfig = configModule.forMixin( RedisEntityStoreConfiguration.class )
+                                                                .declareDefaults();
         redisConfig.host().set( DOCKER.getDockerHost() );
         redisConfig.port().set( DOCKER.getExposedContainerPort( "6379/tcp" ) );
     }
@@ -57,7 +56,8 @@
         throws Exception
     {
         super.setUp();
-        RedisMapEntityStoreService es = serviceFinder.findService( RedisMapEntityStoreService.class ).get();
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        RedisEntityStoreService es = storageModule.findService( RedisEntityStoreService.class ).get();
         jedisPool = es.jedisPool();
     }
 
diff --git a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreWithCacheTest.java
similarity index 89%
rename from extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
rename to extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreWithCacheTest.java
index 1dba76a..c51909c 100644
--- a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisEntityStoreWithCacheTest.java
@@ -25,12 +25,12 @@
 import org.apache.polygene.entitystore.redis.assembly.RedisEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.cache.AbstractEntityStoreWithCacheTest;
-import org.apache.polygene.test.internal.DockerRule;
+import org.apache.polygene.test.docker.DockerRule;
 import org.junit.ClassRule;
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.JedisPool;
 
-public class RedisMapEntityStoreWithCacheTest
+public class RedisEntityStoreWithCacheTest
     extends AbstractEntityStoreWithCacheTest
 {
     @ClassRule
@@ -42,7 +42,7 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new RedisEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         RedisEntityStoreConfiguration redisConfig = config.forMixin( RedisEntityStoreConfiguration.class )
                                                           .declareDefaults();
@@ -57,7 +57,7 @@
         throws Exception
     {
         super.setUp();
-        RedisMapEntityStoreService es = serviceFinder.findService( RedisMapEntityStoreService.class ).get();
+        RedisEntityStoreService es = serviceFinder.findService( RedisEntityStoreService.class ).get();
         jedisPool = es.jedisPool();
     }
 
diff --git a/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreMixin.java b/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakEntityStoreMixin.java
similarity index 99%
rename from extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreMixin.java
rename to extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakEntityStoreMixin.java
index 9417df5..39fd13a 100644
--- a/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreMixin.java
+++ b/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakEntityStoreMixin.java
@@ -59,7 +59,7 @@
 /**
  * Riak Protobuf implementation of MapEntityStore.
  */
-public class RiakMapEntityStoreMixin implements ServiceActivation, MapEntityStore, RiakAccessors
+public class RiakEntityStoreMixin implements ServiceActivation, MapEntityStore, RiakAccessors
 {
     private static final String DEFAULT_HOST = "127.0.0.1";
     private static final int DEFAULT_PORT = 8087;
diff --git a/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreService.java b/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakEntityStoreService.java
similarity index 98%
rename from extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreService.java
rename to extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakEntityStoreService.java
index 8965a59..4f3b9ca 100644
--- a/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreService.java
+++ b/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/RiakEntityStoreService.java
@@ -40,7 +40,7 @@
  */
 @Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
 @Mixins( { JSONMapEntityStoreMixin.class, MapEntityStoreMixin.class } )
-public interface RiakMapEntityStoreService
+public interface RiakEntityStoreService
     extends EntityStore,
             EntityStateVersions,
             MapEntityStoreActivation,
diff --git a/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/assembly/RiakEntityStoreAssembler.java b/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/assembly/RiakEntityStoreAssembler.java
index 8174ed9..9c67e31 100644
--- a/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/assembly/RiakEntityStoreAssembler.java
+++ b/extensions/entitystore-riak/src/main/java/org/apache/polygene/entitystore/riak/assembly/RiakEntityStoreAssembler.java
@@ -18,12 +18,11 @@
 package org.apache.polygene.entitystore.riak.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.riak.RiakEntityStoreConfiguration;
-import org.apache.polygene.entitystore.riak.RiakMapEntityStoreMixin;
-import org.apache.polygene.entitystore.riak.RiakMapEntityStoreService;
+import org.apache.polygene.entitystore.riak.RiakEntityStoreMixin;
+import org.apache.polygene.entitystore.riak.RiakEntityStoreService;
 
 /**
  * Riak EntityStore assembly.
@@ -32,10 +31,11 @@
         extends Assemblers.VisibilityIdentityConfig<RiakEntityStoreAssembler>
 {
     @Override
-    public void assemble(ModuleAssembly module) throws AssemblyException
+    public void assemble(ModuleAssembly module)
     {
-        ServiceDeclaration service = module.services( RiakMapEntityStoreService.class ).
-                withMixins( RiakMapEntityStoreMixin.class ).
+        super.assemble( module );
+        ServiceDeclaration service = module.services( RiakEntityStoreService.class ).
+            withMixins( RiakEntityStoreMixin.class ).
                 visibleIn( visibility() );
         if( hasIdentity() )
         {
diff --git a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTest.java
similarity index 89%
rename from extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java
rename to extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTest.java
index c43d846..9a52e30 100644
--- a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java
+++ b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTest.java
@@ -22,11 +22,11 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.riak.assembly.RiakEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.apache.polygene.test.internal.DockerRule;
 import org.junit.ClassRule;
 
-public class RiakMapEntityStoreTest extends AbstractEntityStoreTest
+public class RiakEntityStoreTest extends AbstractEntityStoreTest
 {
     @ClassRule
     public static final DockerRule DOCKER = new DockerRule( "riak","riak_auth_mods started on node");
@@ -37,7 +37,7 @@
     public void setUp() throws Exception
     {
         super.setUp();
-        RiakMapEntityStoreService es = serviceFinder.findService( RiakMapEntityStoreService.class ).get();
+        RiakEntityStoreService es = serviceFinder.findService( RiakEntityStoreService.class ).get();
         riakFixture = new RiakFixture( es.riakClient(), es.riakNamespace() );
         riakFixture.waitUntilReady();
     }
@@ -56,7 +56,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new RiakEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         // END SNIPPET: assembly
diff --git a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTestSuite.java
similarity index 61%
copy from extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
copy to extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTestSuite.java
index ac4f3ec..14828ff 100644
--- a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreTestSuite.java
@@ -14,56 +14,57 @@
  *  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.polygene.entitystore.riak;
 
 import java.util.Collections;
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.riak.assembly.RiakEntityStoreAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.cache.AbstractEntityStoreWithCacheTest;
-import org.apache.polygene.test.internal.DockerRule;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
 import org.junit.ClassRule;
 
-public class RiakMapEntityStoreWithCacheTest extends AbstractEntityStoreWithCacheTest
+public class RiakEntityStoreTestSuite extends EntityStoreTestSuite
 {
     @ClassRule
-    public static final DockerRule DOCKER = new DockerRule( "riak","riak_auth_mods started on node");
+    public static final DockerRule DOCKER = new DockerRule( "riak", "riak_auth_mods started on node" );
 
     private RiakFixture riakFixture;
 
     @Override
-    public void setUp() throws Exception
+    protected void defineStorageModule( ModuleAssembly module )
     {
-        super.setUp();
-        RiakMapEntityStoreService es = serviceFinder.findService( RiakMapEntityStoreService.class ).get();
-        riakFixture = new RiakFixture( es.riakClient(), es.riakNamespace() );
-        riakFixture.waitUntilReady();
+        module.defaultServices();
+        new RiakEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        RiakEntityStoreConfiguration riakConfig = configModule.forMixin( RiakEntityStoreConfiguration.class )
+                                                              .declareDefaults();
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "8087/tcp" );
+        riakConfig.hosts().set( Collections.singletonList( host + ':' + port ) );
     }
 
     @Override
-    public void tearDown() throws Exception
+    public void tearDown()
+        throws Exception
     {
         riakFixture.deleteTestData();
         super.tearDown();
     }
 
     @Override
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
+    public void setUp()
+        throws Exception
     {
-        super.assemble( module );
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
-        new RiakEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
-        RiakEntityStoreConfiguration riakConfig = config.forMixin( RiakEntityStoreConfiguration.class )
-                                                        .declareDefaults();
-        String host = DOCKER.getDockerHost();
-        int port = DOCKER.getExposedContainerPort( "8087/tcp" );
-        riakConfig.hosts().set( Collections.singletonList( host + ':' + port ) );
+        super.setUp();
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        RiakEntityStoreService es = storageModule.findService( RiakEntityStoreService.class ).get();
+        riakFixture = new RiakFixture( es.riakClient(), es.riakNamespace() );
+        riakFixture.waitUntilReady();
     }
 }
diff --git a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreWithCacheTest.java
similarity index 88%
rename from extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
rename to extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreWithCacheTest.java
index ac4f3ec..13f5b36 100644
--- a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakEntityStoreWithCacheTest.java
@@ -26,10 +26,10 @@
 import org.apache.polygene.entitystore.riak.assembly.RiakEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.cache.AbstractEntityStoreWithCacheTest;
-import org.apache.polygene.test.internal.DockerRule;
+import org.apache.polygene.test.docker.DockerRule;
 import org.junit.ClassRule;
 
-public class RiakMapEntityStoreWithCacheTest extends AbstractEntityStoreWithCacheTest
+public class RiakEntityStoreWithCacheTest extends AbstractEntityStoreWithCacheTest
 {
     @ClassRule
     public static final DockerRule DOCKER = new DockerRule( "riak","riak_auth_mods started on node");
@@ -40,7 +40,7 @@
     public void setUp() throws Exception
     {
         super.setUp();
-        RiakMapEntityStoreService es = serviceFinder.findService( RiakMapEntityStoreService.class ).get();
+        RiakEntityStoreService es = serviceFinder.findService( RiakEntityStoreService.class ).get();
         riakFixture = new RiakFixture( es.riakClient(), es.riakNamespace() );
         riakFixture.waitUntilReady();
     }
@@ -58,7 +58,7 @@
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new RiakEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         RiakEntityStoreConfiguration riakConfig = config.forMixin( RiakEntityStoreConfiguration.class )
                                                         .declareDefaults();
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreConfiguration.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
similarity index 95%
rename from extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreConfiguration.java
rename to extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
index cd832c0..19658ea 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreConfiguration.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
@@ -22,7 +22,7 @@
 import org.apache.polygene.library.sql.common.SQLConfiguration;
 
 // START SNIPPET: config
-public interface SQLMapEntityStoreConfiguration extends SQLConfiguration
+public interface SQLEntityStoreConfiguration extends SQLConfiguration
 {
     /**
      * Name of the database schema to use.
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreMixin.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
similarity index 97%
rename from extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreMixin.java
rename to extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
index 682a5f7..293ce58 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreMixin.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
@@ -55,7 +55,7 @@
 import org.jooq.conf.Settings;
 import org.jooq.impl.DSL;
 
-public class SQLMapEntityStoreMixin
+public class SQLEntityStoreMixin
     implements ServiceActivation, MapEntityStore
 {
     private static final String TABLE_NAME_LIQUIBASE_PARAMETER = "es-sql.table";
@@ -76,7 +76,7 @@
     private ServiceDescriptor descriptor;
 
     @This
-    private Configuration<SQLMapEntityStoreConfiguration> configuration;
+    private Configuration<SQLEntityStoreConfiguration> configuration;
 
     private Schema schema;
     private Table<Record> table;
@@ -89,7 +89,7 @@
     public void activateService() throws Exception
     {
         configuration.refresh();
-        SQLMapEntityStoreConfiguration config = configuration.get();
+        SQLEntityStoreConfiguration config = configuration.get();
 
         // Prepare jooq DSL
         SQLDialect dialect = descriptor.metaInfo( SQLDialect.class );
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreService.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
similarity index 93%
rename from extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreService.java
rename to extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
index 341de3b..9e4e0e7 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreService.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
@@ -32,8 +32,8 @@
  * SQL EntityStore service.
  */
 @Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
-@Mixins( { JSONMapEntityStoreMixin.class, SQLMapEntityStoreMixin.class } )
-public interface SQLMapEntityStoreService
+@Mixins( { JSONMapEntityStoreMixin.class, SQLEntityStoreMixin.class } )
+public interface SQLEntityStoreService
     extends ServiceActivation,
     JSONMapEntityStoreActivation,
     EntityStore,
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLMapEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
similarity index 88%
rename from extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLMapEntityStoreAssembler.java
rename to extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
index aac6dfc..0f86490 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLMapEntityStoreAssembler.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
@@ -22,8 +22,8 @@
 import org.apache.polygene.bootstrap.Assemblers;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.SQLMapEntityStoreConfiguration;
-import org.apache.polygene.entitystore.sql.SQLMapEntityStoreService;
+import org.apache.polygene.entitystore.sql.SQLEntityStoreConfiguration;
+import org.apache.polygene.entitystore.sql.SQLEntityStoreService;
 import org.apache.polygene.library.sql.liquibase.LiquibaseAssembler;
 import org.apache.polygene.library.sql.liquibase.LiquibaseConfiguration;
 import org.jooq.SQLDialect;
@@ -33,10 +33,10 @@
 /**
  * Base SQL EntityStore assembly.
  */
-public abstract class AbstractSQLMapEntityStoreAssembler<AssemblerType>
+public abstract class AbstractSQLEntityStoreAssembler<AssemblerType>
     extends Assemblers.VisibilityIdentityConfig<AssemblerType>
 {
-    public static final Identity DEFAULT_ENTITYSTORE_IDENTITY = new StringIdentity( "entitystore-sql" );
+    public static final Identity DEFAULT_ENTITYSTORE_IDENTITY = StringIdentity.identityOf( "entitystore-sql" );
     private static final String DEFAULT_CHANGELOG_PATH = "org/apache/polygene/entitystore/sql/changelog.xml";
 
     private String changelogPath = DEFAULT_CHANGELOG_PATH;
@@ -44,6 +44,7 @@
     @Override
     public void assemble( ModuleAssembly module )
     {
+        super.assemble( module );
         SQLDialect dialect = getSQLDialect();
         if( dialect == null )
         {
@@ -67,7 +68,7 @@
         }
         liquibase.assemble( module );
 
-        module.services( SQLMapEntityStoreService.class )
+        module.services( SQLEntityStoreService.class )
               .identifiedBy( identity )
               .visibleIn( visibility() )
               .setMetaInfo( dialect )
@@ -75,7 +76,7 @@
 
         if( hasConfig() )
         {
-            configModule().entities( SQLMapEntityStoreConfiguration.class ).visibleIn( configVisibility() );
+            configModule().entities( SQLEntityStoreConfiguration.class ).visibleIn( configVisibility() );
         }
     }
 
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
index 6288d85..4e88d01 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
@@ -25,7 +25,7 @@
  * Derby EntityStore assembly.
  */
 public class DerbySQLEntityStoreAssembler
-    extends AbstractSQLMapEntityStoreAssembler<DerbySQLEntityStoreAssembler>
+    extends AbstractSQLEntityStoreAssembler<DerbySQLEntityStoreAssembler>
 {
     @Override
     protected SQLDialect getSQLDialect()
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
index 018251e..928e660 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
@@ -25,7 +25,7 @@
  * H2 EntityStore assembly.
  */
 public class H2SQLEntityStoreAssembler
-    extends AbstractSQLMapEntityStoreAssembler<H2SQLEntityStoreAssembler>
+    extends AbstractSQLEntityStoreAssembler<H2SQLEntityStoreAssembler>
 {
     @Override
     protected SQLDialect getSQLDialect()
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
index ff46c82..dec7be5 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
@@ -25,7 +25,7 @@
  * MySQL EntityStore assembly.
  */
 public class MySQLEntityStoreAssembler
-    extends AbstractSQLMapEntityStoreAssembler<MySQLEntityStoreAssembler>
+    extends AbstractSQLEntityStoreAssembler<MySQLEntityStoreAssembler>
 {
     @Override
     protected SQLDialect getSQLDialect()
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
index 4400b8e..8e3e31f 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
@@ -25,7 +25,7 @@
  * PostgreSQL EntityStore assembly.
  */
 public class PostgreSQLEntityStoreAssembler
-    extends AbstractSQLMapEntityStoreAssembler<PostgreSQLEntityStoreAssembler>
+    extends AbstractSQLEntityStoreAssembler<PostgreSQLEntityStoreAssembler>
 {
     @Override
     protected SQLDialect getSQLDialect()
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
index 1b7fa5e..2615316 100644
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
+++ b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
@@ -25,7 +25,7 @@
  * SQLite EntityStore assembly.
  */
 public class SQLiteEntityStoreAssembler
-    extends AbstractSQLMapEntityStoreAssembler<SQLiteEntityStoreAssembler>
+    extends AbstractSQLEntityStoreAssembler<SQLiteEntityStoreAssembler>
 {
     @Override
     protected SQLDialect getSQLDialect()
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
index f66ca9c..4bd1578 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
@@ -46,7 +46,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService
@@ -80,8 +80,8 @@
             "Delete " + getClass().getSimpleName() + " test data" ) );
         try
         {
-            SQLMapEntityStoreConfiguration config = uow.get( SQLMapEntityStoreConfiguration.class,
-                                                             DEFAULT_ENTITYSTORE_IDENTITY );
+            SQLEntityStoreConfiguration config = uow.get( SQLEntityStoreConfiguration.class,
+                                                          DEFAULT_ENTITYSTORE_IDENTITY );
             Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
             connection.setAutoCommit( false );
             try( Statement stmt = connection.createStatement() )
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..7fbfb2a
--- /dev/null
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
@@ -0,0 +1,94 @@
+/*
+ *  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.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+
+import static org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class DerbySQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "derby-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "derby-datasource-service" )
+            .identifiedBy( "derby-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new DerbySQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module storageModule = application.findModule( "Infrastructure Layer","Storage Module" );
+        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
+        UnitOfWork uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase(
+            "Delete " + getClass().getSimpleName() + " test data" ) );
+        try
+        {
+            SQLEntityStoreConfiguration config = uow.get( SQLEntityStoreConfiguration.class,
+                                                          DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = storageModule.serviceFinder().findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DELETE FROM %s.%s",
+                                             config.schemaName().get(),
+                                             config.entityTableName().get() ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
index 1aed71f..4b4b759 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
@@ -39,7 +39,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..f763238
--- /dev/null
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
@@ -0,0 +1,56 @@
+/*
+ *  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.polygene.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.H2SQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+
+public class H2SQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "h2-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "h2-datasource-service" )
+            .identifiedBy( "h2-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new H2SQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+}
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
index c82bd61..a940e95 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
@@ -33,8 +33,8 @@
 import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.apache.polygene.test.internal.DockerRule;
 import org.junit.ClassRule;
 
 import static org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
@@ -64,7 +64,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService
@@ -107,8 +107,8 @@
         try
         {
             Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
-            SQLMapEntityStoreConfiguration configuration = uow.get( SQLMapEntityStoreConfiguration.class,
-                                                                    DEFAULT_ENTITYSTORE_IDENTITY );
+            SQLEntityStoreConfiguration configuration = uow.get( SQLEntityStoreConfiguration.class,
+                                                                 DEFAULT_ENTITYSTORE_IDENTITY );
             connection.setAutoCommit( false );
             try( Statement stmt = connection.createStatement() )
             {
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..e2b0564
--- /dev/null
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
@@ -0,0 +1,122 @@
+/*
+ *  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.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import java.util.HashMap;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.service.ServiceFinder;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class MySQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule(
+        "mysql",
+        new HashMap<String, String>()
+        {{
+            put( "MYSQL_ROOT_PASSWORD", "" );
+            put( "MYSQL_ALLOW_EMPTY_PASSWORD", "yes" );
+            put( "MYSQL_DATABASE", "jdbc_test_db" );
+            put( "MYSQL_ROOT_HOST", "172.17.0.1" );
+        }},
+        30000L
+//        , "mysqld: ready for connections"   TODO: add this after next release of tdomzal/junit-docker-rule
+    );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "mysql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "mysql-datasource-service" )
+            .identifiedBy( "mysql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new MySQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        String mysqlHost = DOCKER.getDockerHost();
+        int mysqlPort = DOCKER.getExposedContainerPort( "3306/tcp" );
+        configModule.forMixin( DataSourceConfiguration.class ).declareDefaults()
+                    .url().set( "jdbc:mysql://" + mysqlHost + ":" + mysqlPort
+                                + "/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC"
+                                + "&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true" );
+    }
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
+        ServiceFinder serviceFinder = storageModule.serviceFinder();
+        UnitOfWork uow = uowf.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+                                                             );
+        try
+        {
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            SQLEntityStoreConfiguration configuration = uow.get( SQLEntityStoreConfiguration.class,
+                                                                 DEFAULT_ENTITYSTORE_IDENTITY );
+            connection.setAutoCommit( false );
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "TRUNCATE %s.%s",
+                                             configuration.schemaName().get(),
+                                             configuration.entityTableName().get() ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
index 1da7b58..daa9949 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
@@ -33,46 +33,12 @@
 import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.apache.polygene.test.internal.DockerRule;
 import org.junit.ClassRule;
 
 import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
 
-/**
- * WARN This test run only if localhost:5432 is listening.
- *
- * To run it you need to have a user & database set up in postgresql. Here are two snippets to create and drop the
- * needed test environment.
- *
- * Use 'password' as password for the jdbc_test_login user.
- *
- * Eventually create a database cluster:
- *
- * <pre>
- * initdb -D /usr/local/pgsql/data
- * </pre>
- *
- * Start PostgreSQL. Then, create test user and database:
- *
- * <pre>
- * createuser -A -D -P -E -W jdbc_test_login
- * createdb -O jdbc_test_login -W jdbc_test_db
- * </pre>
- *
- * To clear the data:
- *
- * <pre>
- * dropdb -W jdbc_test_db
- * createdb -O jdbc_test_login -W jdbc_test_db
- * </pre>
- *
- * To remove the test user:
- *
- * <pre>
- * dropuser -W jdbc_test_login
- * </pre>
- */
 public class PostgreSQLEntityStoreTest
     extends AbstractEntityStoreTest
 {
@@ -89,7 +55,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..d1dd952
--- /dev/null
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
@@ -0,0 +1,111 @@
+/*
+ *  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.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.service.ServiceFinder;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.common.SQLConfiguration;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class PostgreSQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "postgres",
+                                                            3000L,
+                                                            "PostgreSQL init process complete; ready for start up." );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "postgresql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "postgresql-datasource-service" )
+            .identifiedBy( "postgresql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new PostgreSQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "5432/tcp" );
+        configModule.forMixin( DataSourceConfiguration.class ).declareDefaults()
+                    .url().set( "jdbc:postgresql://" + host + ":" + port + "/jdbc_test_db" );
+        // START SNIPPET: assembly
+    }
+    // END SNIPPET: assembly
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
+        ServiceFinder serviceFinder = storageModule.serviceFinder();
+        UnitOfWork uow = uowf.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+                                           );
+        try
+        {
+            SQLConfiguration config = uow.get( SQLConfiguration.class, DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            String schemaName = config.schemaName().get();
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DROP SCHEMA \"%s\" CASCADE", schemaName ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
index 07402b5..83e8a21 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
@@ -47,7 +47,7 @@
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
new file mode 100644
index 0000000..6dc5fbe
--- /dev/null
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
@@ -0,0 +1,65 @@
+/*
+ *  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.polygene.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.SQLiteEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.BeforeClass;
+
+import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
+
+public class SQLiteEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @BeforeClass
+    public static void beforeClass_IBMJDK()
+    {
+        assumeNoIbmJdk();
+    }
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "sqlite-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "sqlite-datasource-service" )
+            .identifiedBy( "sqlite-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new SQLiteEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+}
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchClusterConfiguration.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchClusterConfiguration.java
index 346a58d..ee3eae7 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchClusterConfiguration.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchClusterConfiguration.java
@@ -25,7 +25,7 @@
 
 // START SNIPPET: config
 public interface ElasticSearchClusterConfiguration
-        extends ElasticSearchConfiguration
+    extends ElasticSearchIndexingConfiguration
 {
 
     /**
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
index 18c49eb..502471b 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
@@ -130,7 +130,7 @@
             SearchResponse response = request.execute().actionGet();
 
             return StreamSupport.stream( response.getHits().spliterator(), false )
-                                .map( hit -> EntityReference.parseEntityReference( hit.id() ) );
+                                .map( hit -> EntityReference.parseEntityReference( hit.getId() ) );
         }
 
         @Override
@@ -154,9 +154,9 @@
             // Execute
             SearchResponse response = request.execute().actionGet();
 
-            if( response.getHits().totalHits() == 1 )
+            if( response.getHits().getTotalHits() == 1 )
             {
-                return EntityReference.parseEntityReference( response.getHits().getAt( 0 ).id() );
+                return EntityReference.parseEntityReference( response.getHits().getAt( 0 ).getId() );
             }
 
             return null;
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexExporter.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexExporter.java
index 41ba67a..3796deb 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexExporter.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexExporter.java
@@ -26,10 +26,8 @@
 import org.apache.polygene.spi.query.IndexExporter;
 
 @Mixins( ElasticSearchIndexExporter.Mixin.class )
-public interface ElasticSearchIndexExporter
-        extends IndexExporter
+public interface ElasticSearchIndexExporter extends IndexExporter
 {
-
     class Mixin
             implements ElasticSearchIndexExporter
     {
@@ -49,5 +47,4 @@
         }
 
     }
-
 }
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexer.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexer.java
index c8caa7d..99bcdab 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexer.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexer.java
@@ -48,6 +48,7 @@
 import org.apache.polygene.spi.serialization.JsonSerializer;
 import org.elasticsearch.action.bulk.BulkRequestBuilder;
 import org.elasticsearch.action.bulk.BulkResponse;
+import org.elasticsearch.common.xcontent.XContentType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -149,7 +150,7 @@
                 // Handle errors
                 if( bulkResponse.hasFailures() )
                 {
-                    throw new ElasticSearchIndexException( bulkResponse.buildFailureMessage() );
+                    throw new ElasticSearchIndexingException( bulkResponse.buildFailureMessage() );
                 }
 
                 LOGGER.debug( "Indexing changed Entity states took {}ms", bulkResponse.getTookInMillis() );
@@ -169,7 +170,7 @@
         {
             bulkBuilder.add( support.client().
                 prepareIndex( support.index(), support.entitiesType(), identity ).
-                                        setSource( json ) );
+                    setSource( json, XContentType.JSON ) );
         }
 
         /**
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchConfiguration.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexingConfiguration.java
similarity index 96%
rename from extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchConfiguration.java
rename to extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexingConfiguration.java
index df0c96a..27ba86d 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchConfiguration.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexingConfiguration.java
@@ -24,9 +24,8 @@
 import org.apache.polygene.api.property.Property;
 
 // START SNIPPET: config
-public interface ElasticSearchConfiguration
+public interface ElasticSearchIndexingConfiguration
 {
-
     /**
      * Cluster name.
      * Defaults to 'polygene_cluster'.
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexingException.java
similarity index 73%
rename from extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java
rename to extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexingException.java
index b792a17..27b6a19 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexingException.java
@@ -19,18 +19,18 @@
  */
 package org.apache.polygene.index.elasticsearch;
 
-public class ElasticSearchIndexException
-        extends RuntimeException
+import org.apache.polygene.api.indexing.IndexingException;
+
+public class ElasticSearchIndexingException extends IndexingException
 {
 
-    public ElasticSearchIndexException( String string )
+    public ElasticSearchIndexingException( String message )
     {
-        super( string );
+        super( message );
     }
 
-    public ElasticSearchIndexException( String string, Throwable thrwbl )
+    public ElasticSearchIndexingException( String message, Throwable cause )
     {
-        super( string, thrwbl );
+        super( message, cause );
     }
-
 }
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchSupport.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchSupport.java
index 36331d8..c62e0d6 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchSupport.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchSupport.java
@@ -19,11 +19,10 @@
  */
 package org.apache.polygene.index.elasticsearch;
 
-import org.elasticsearch.client.Client;
 import org.apache.polygene.api.service.ServiceActivation;
+import org.elasticsearch.client.Client;
 
-public interface ElasticSearchSupport
-        extends ServiceActivation
+public interface ElasticSearchSupport extends ServiceActivation
 {
 
     Client client();
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClientIndexQueryAssembler.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClientIndexQueryAssembler.java
index c6a0bdc..7b118d4 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClientIndexQueryAssembler.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClientIndexQueryAssembler.java
@@ -17,9 +17,8 @@
  */
 package org.apache.polygene.index.elasticsearch.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.index.elasticsearch.ElasticSearchConfiguration;
+import org.apache.polygene.index.elasticsearch.ElasticSearchIndexingConfiguration;
 import org.apache.polygene.index.elasticsearch.client.ESClientIndexQueryService;
 import org.apache.polygene.index.elasticsearch.internal.AbstractElasticSearchAssembler;
 import org.elasticsearch.client.Client;
@@ -35,8 +34,9 @@
     }
 
     @Override
-    public void assemble( final ModuleAssembly module ) throws AssemblyException
+    public void assemble( final ModuleAssembly module )
     {
+        super.assemble( module );
         module.services( ESClientIndexQueryService.class )
               .taggedWith( "elasticsearch", "query", "indexing" )
               .identifiedBy( identity() )
@@ -46,7 +46,7 @@
 
         if( hasConfig() )
         {
-            configModule().entities( ElasticSearchConfiguration.class )
+            configModule().entities( ElasticSearchIndexingConfiguration.class )
                           .visibleIn( configVisibility() );
         }
     }
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClusterIndexQueryAssembler.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClusterIndexQueryAssembler.java
index f2d803d..2158059 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClusterIndexQueryAssembler.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESClusterIndexQueryAssembler.java
@@ -19,7 +19,6 @@
  */
 package org.apache.polygene.index.elasticsearch.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.index.elasticsearch.ElasticSearchClusterConfiguration;
 import org.apache.polygene.index.elasticsearch.cluster.ESClusterIndexQueryService;
@@ -30,8 +29,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( ESClusterIndexQueryService.class )
               .taggedWith( "elasticsearch", "query", "indexing" )
               .identifiedBy( identity() )
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESFilesystemIndexQueryAssembler.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESFilesystemIndexQueryAssembler.java
index 1998fd8..d401321 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESFilesystemIndexQueryAssembler.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/assembly/ESFilesystemIndexQueryAssembler.java
@@ -19,9 +19,8 @@
  */
 package org.apache.polygene.index.elasticsearch.assembly;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.index.elasticsearch.ElasticSearchConfiguration;
+import org.apache.polygene.index.elasticsearch.ElasticSearchIndexingConfiguration;
 import org.apache.polygene.index.elasticsearch.filesystem.ESFilesystemIndexQueryService;
 import org.apache.polygene.index.elasticsearch.internal.AbstractElasticSearchAssembler;
 
@@ -30,8 +29,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( ESFilesystemIndexQueryService.class )
               .taggedWith( "elasticsearch", "query", "indexing" )
               .identifiedBy( identity() )
@@ -40,7 +39,7 @@
 
         if( hasConfig() )
         {
-            configModule().entities( ElasticSearchConfiguration.class ).
+            configModule().entities( ElasticSearchIndexingConfiguration.class ).
                 visibleIn( configVisibility() );
         }
     }
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/client/ESClientSupport.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/client/ESClientSupport.java
index 24ee996..229e7c3 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/client/ESClientSupport.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/client/ESClientSupport.java
@@ -21,14 +21,14 @@
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.api.service.ServiceDescriptor;
-import org.apache.polygene.index.elasticsearch.ElasticSearchConfiguration;
+import org.apache.polygene.index.elasticsearch.ElasticSearchIndexingConfiguration;
 import org.apache.polygene.index.elasticsearch.internal.AbstractElasticSearchSupport;
 import org.elasticsearch.client.Client;
 
 public class ESClientSupport extends AbstractElasticSearchSupport
 {
     @This
-    private Configuration<ElasticSearchConfiguration> configuration;
+    private Configuration<ElasticSearchIndexingConfiguration> configuration;
 
     @Uses
     private ServiceDescriptor descriptor;
@@ -37,7 +37,7 @@
     protected void activateElasticSearch() throws Exception
     {
         configuration.refresh();
-        ElasticSearchConfiguration config = configuration.get();
+        ElasticSearchIndexingConfiguration config = configuration.get();
 
         index = config.index().get() == null ? DEFAULT_INDEX_NAME : config.index().get();
         indexNonAggregatedAssociations = config.indexNonAggregatedAssociations().get();
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/filesystem/ESFilesystemSupport.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/filesystem/ESFilesystemSupport.java
index 99d581f..d7a1f54 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/filesystem/ESFilesystemSupport.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/filesystem/ESFilesystemSupport.java
@@ -26,7 +26,7 @@
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.This;
-import org.apache.polygene.index.elasticsearch.ElasticSearchConfiguration;
+import org.apache.polygene.index.elasticsearch.ElasticSearchIndexingConfiguration;
 import org.apache.polygene.index.elasticsearch.internal.AbstractElasticSearchSupport;
 import org.apache.polygene.library.fileconfig.FileConfiguration;
 import org.elasticsearch.common.settings.Settings;
@@ -36,7 +36,7 @@
     extends AbstractElasticSearchSupport
 {
     @This
-    private Configuration<ElasticSearchConfiguration> configuration;
+    private Configuration<ElasticSearchIndexingConfiguration> configuration;
 
     @This
     private HasIdentity hasIdentity;
@@ -51,7 +51,7 @@
         throws Exception
     {
         configuration.refresh();
-        ElasticSearchConfiguration config = configuration.get();
+        ElasticSearchIndexingConfiguration config = configuration.get();
 
         String clusterName = config.clusterName().get() == null ? DEFAULT_CLUSTER_NAME : config.clusterName().get();
         index = config.index().get() == null ? DEFAULT_INDEX_NAME : config.index().get();
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/internal/AbstractElasticSearchSupport.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/internal/AbstractElasticSearchSupport.java
index d899958..e623c6e 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/internal/AbstractElasticSearchSupport.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/internal/AbstractElasticSearchSupport.java
@@ -19,11 +19,12 @@
  */
 package org.apache.polygene.index.elasticsearch.internal;
 
+import org.apache.polygene.index.elasticsearch.ElasticSearchSupport;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.common.settings.Settings;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 import org.elasticsearch.common.xcontent.XContentFactory;
-import org.apache.polygene.index.elasticsearch.ElasticSearchSupport;
+import org.elasticsearch.common.xcontent.XContentType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -67,7 +68,8 @@
                                            .endObject()
                                    .endObject()
                                .endObject()
-                               .string() );
+                               .string(),
+                XContentType.JSON);
             XContentBuilder mapping = XContentFactory.jsonBuilder()
                                                      .startObject()
                                                          .startObject( entitiesType() )
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ESEmbeddedRule.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ESEmbeddedRule.java
index df3e422..8c9807c 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ESEmbeddedRule.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ESEmbeddedRule.java
@@ -97,11 +97,8 @@
     {
         try
         {
-            return new SingletonAssembler()
-            {
-                @Override
-                public void assemble( final ModuleAssembly module ) throws AssemblyException
-                {
+            return new SingletonAssembler(
+                module -> {
                     module.layer().application().setName( name );
                     ModuleAssembly config = module.layer().module( "config" );
                     new EntityTestAssembler().assemble( config );
@@ -114,7 +111,7 @@
                         .withConfig( config, Visibility.layer )
                         .assemble( module );
                 }
-            };
+            );
         }
         catch( ActivationException | AssemblyException ex )
         {
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchComplexQueryTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchComplexQueryTest.java
index 8dcea1b..65e9280 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchComplexQueryTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchComplexQueryTest.java
@@ -70,7 +70,7 @@
         new ESClientIndexQueryAssembler( ELASTIC_SEARCH.client() )
             .withConfig( config, Visibility.layer )
             .assemble( module );
-        ElasticSearchConfiguration esConfig = config.forMixin( ElasticSearchConfiguration.class ).declareDefaults();
+        ElasticSearchIndexingConfiguration esConfig = config.forMixin( ElasticSearchIndexingConfiguration.class ).declareDefaults();
         esConfig.index().set( ELASTIC_SEARCH.indexName( ElasticSearchQueryTest.class.getName(),
                                                         testName.getMethodName() ) );
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
index 61d26dd..66a6eab 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinderTest.java
@@ -68,7 +68,7 @@
         new ESClientIndexQueryAssembler( ELASTIC_SEARCH.client() )
             .withConfig( config, Visibility.layer )
             .assemble( module );
-        ElasticSearchConfiguration esConfig = config.forMixin( ElasticSearchConfiguration.class ).declareDefaults();
+        ElasticSearchIndexingConfiguration esConfig = config.forMixin( ElasticSearchIndexingConfiguration.class ).declareDefaults();
         esConfig.index().set( ELASTIC_SEARCH.indexName( ElasticSearchQueryTest.class.getName(),
                                                         testName.getMethodName() ) );
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java
index a55ff31..f89ad83 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryMultimoduleTest.java
@@ -23,7 +23,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.index.elasticsearch.assembly.ESClientIndexQueryAssembler;
 import org.apache.polygene.library.fileconfig.FileConfigurationAssembler;
 import org.apache.polygene.library.fileconfig.FileConfigurationOverride;
@@ -40,7 +39,6 @@
 
         module = module.layer().module( "module2" );
         new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( module );
-        new DefaultUnitOfWorkAssembler().assemble( module );
 
         // Config module
         LayerAssembly configLayer = module.layer().application().layer( "config" );
@@ -53,7 +51,7 @@
             .withConfig( config, Visibility.application )
             .visibleIn( Visibility.layer )
             .assemble( module );
-        ElasticSearchConfiguration esConfig = config.forMixin( ElasticSearchConfiguration.class ).declareDefaults();
+        ElasticSearchIndexingConfiguration esConfig = config.forMixin( ElasticSearchIndexingConfiguration.class ).declareDefaults();
         esConfig.index().set( ELASTIC_SEARCH.indexName( ElasticSearchQueryTest.class.getName(),
                                                         testName.getMethodName() ) );
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
index 6b6feab..7843c26 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchQueryTest.java
@@ -73,7 +73,7 @@
         new ESClientIndexQueryAssembler( ELASTIC_SEARCH.client() )
             .withConfig( config, Visibility.layer )
             .assemble( module );
-        ElasticSearchConfiguration esConfig = config.forMixin( ElasticSearchConfiguration.class ).declareDefaults();
+        ElasticSearchIndexingConfiguration esConfig = config.forMixin( ElasticSearchIndexingConfiguration.class ).declareDefaults();
         esConfig.index().set( ELASTIC_SEARCH.indexName( ElasticSearchQueryTest.class.getName(),
                                                         testName.getMethodName() ) );
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
index a52babb..c6578f0 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ElasticSearchTest.java
@@ -137,7 +137,7 @@
         new ESClientIndexQueryAssembler( ELASTIC_SEARCH.client() )
             .withConfig( config, Visibility.layer )
             .assemble( module );
-        ElasticSearchConfiguration esConfig = config.forMixin( ElasticSearchConfiguration.class ).declareDefaults();
+        ElasticSearchIndexingConfiguration esConfig = config.forMixin( ElasticSearchIndexingConfiguration.class ).declareDefaults();
         esConfig.index().set( ELASTIC_SEARCH.indexName( ElasticSearchQueryTest.class.getName(),
                                                         testName.getMethodName() ) );
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
index a8bd09b..8e48aeb 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
@@ -103,7 +103,7 @@
         new ESClientIndexQueryAssembler( ELASTIC_SEARCH.client() )
             .withConfig( config, Visibility.layer )
             .assemble( module );
-        ElasticSearchConfiguration esConfig = config.forMixin( ElasticSearchConfiguration.class ).declareDefaults();
+        ElasticSearchIndexingConfiguration esConfig = config.forMixin( ElasticSearchIndexingConfiguration.class ).declareDefaults();
         esConfig.index().set( ELASTIC_SEARCH.indexName( ElasticSearchQueryTest.class.getName(),
                                                         testName.getMethodName() ) );
         esConfig.indexNonAggregatedAssociations().set( Boolean.TRUE );
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/RdfIndexingEngineService.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/RdfIndexingService.java
similarity index 80%
rename from extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/RdfIndexingEngineService.java
rename to extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/RdfIndexingService.java
index 089c255..aefd780 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/RdfIndexingEngineService.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/RdfIndexingService.java
@@ -20,11 +20,11 @@
 
 package org.apache.polygene.index.rdf;
 
-import org.apache.polygene.index.rdf.indexing.RdfExporter;
-import org.apache.polygene.index.rdf.indexing.RdfIndexingService;
+import org.apache.polygene.index.rdf.indexing.RdfIndexExporter;
+import org.apache.polygene.index.rdf.indexing.RdfIndexerService;
 import org.apache.polygene.index.rdf.query.RdfQueryService;
 
-public interface RdfIndexingEngineService
-    extends RdfQueryService, RdfIndexingService, RdfExporter
+public interface RdfIndexingService
+    extends RdfQueryService, RdfIndexerService, RdfIndexExporter
 {
 }
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/UnsupportedLanguageException.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/UnsupportedLanguageException.java
index 3e02eb9..08c0d00 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/UnsupportedLanguageException.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/UnsupportedLanguageException.java
@@ -19,10 +19,10 @@
  */
 package org.apache.polygene.index.rdf;
 
+import org.apache.polygene.api.indexing.IndexingException;
 import org.openrdf.query.QueryLanguage;
 
-public class UnsupportedLanguageException
-    extends RuntimeException
+public class UnsupportedLanguageException extends IndexingException
 {
     private QueryLanguage language;
 
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfMemoryStoreAssembler.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfMemoryStoreAssembler.java
index b4738db..5299c48 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfMemoryStoreAssembler.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfMemoryStoreAssembler.java
@@ -21,9 +21,8 @@
 package org.apache.polygene.index.rdf.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.index.rdf.RdfIndexingEngineService;
+import org.apache.polygene.index.rdf.RdfIndexingService;
 import org.apache.polygene.index.rdf.query.RdfQueryParserFactory;
 import org.apache.polygene.library.rdf.entity.EntityStateSerializer;
 import org.apache.polygene.library.rdf.entity.EntityTypeSerializer;
@@ -46,12 +45,12 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( MemoryRepositoryService.class )
               .visibleIn( repositoryVisibility )
               .instantiateOnStartup();
-        module.services( RdfIndexingEngineService.class )
+        module.services( RdfIndexingService.class )
               .taggedWith( "rdf", "query", "indexing" )
               .visibleIn( visibility() )
               .instantiateOnStartup();
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfNativeSesameStoreAssembler.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfNativeSesameStoreAssembler.java
index 57173db..5014acc 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfNativeSesameStoreAssembler.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfNativeSesameStoreAssembler.java
@@ -20,9 +20,8 @@
 package org.apache.polygene.index.rdf.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.index.rdf.RdfIndexingEngineService;
+import org.apache.polygene.index.rdf.RdfIndexingService;
 import org.apache.polygene.index.rdf.query.RdfQueryParserFactory;
 import org.apache.polygene.library.rdf.entity.EntityStateSerializer;
 import org.apache.polygene.library.rdf.entity.EntityTypeSerializer;
@@ -47,12 +46,12 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( NativeRepositoryService.class )
               .visibleIn( repositoryVisibility )
               .instantiateOnStartup();
-        module.services( RdfIndexingEngineService.class )
+        module.services( RdfIndexingService.class )
               .taggedWith( "rdf", "query", "indexing" )
               .visibleIn( visibility() )
               .instantiateOnStartup();
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfRdbmsSesameStoreAssembler.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfRdbmsSesameStoreAssembler.java
index 5629697..521476f 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfRdbmsSesameStoreAssembler.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfRdbmsSesameStoreAssembler.java
@@ -20,9 +20,8 @@
 package org.apache.polygene.index.rdf.assembly;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.index.rdf.RdfIndexingEngineService;
+import org.apache.polygene.index.rdf.RdfIndexingService;
 import org.apache.polygene.index.rdf.query.RdfQueryParserFactory;
 import org.apache.polygene.library.rdf.entity.EntityStateSerializer;
 import org.apache.polygene.library.rdf.entity.EntityTypeSerializer;
@@ -47,12 +46,12 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( RdbmsRepositoryService.class )
               .visibleIn( repositoryVisibility )
               .instantiateOnStartup();
-        module.services( RdfIndexingEngineService.class )
+        module.services( RdfIndexingService.class )
               .taggedWith( "rdf", "query", "indexing" )
               .visibleIn( visibility() )
               .instantiateOnStartup();
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfExporter.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexExporter.java
similarity index 79%
rename from extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfExporter.java
rename to extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexExporter.java
index a69c017..b33eea9 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfExporter.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexExporter.java
@@ -23,22 +23,21 @@
 import java.io.IOException;
 import java.io.PrintStream;
 import java.io.PrintWriter;
+import org.apache.polygene.api.injection.scope.Service;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.spi.query.IndexExporter;
 import org.openrdf.repository.Repository;
 import org.openrdf.repository.RepositoryConnection;
 import org.openrdf.repository.RepositoryException;
 import org.openrdf.rio.RDFFormat;
 import org.openrdf.rio.RDFWriter;
 import org.openrdf.rio.Rio;
-import org.apache.polygene.api.injection.scope.Service;
-import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.spi.query.IndexExporter;
 
 /**
  * JAVADOC
  */
-@Mixins( RdfExporter.RdfExporterMixin.class )
-public interface RdfExporter
-    extends IndexExporter
+@Mixins( RdfIndexExporter.RdfExporterMixin.class )
+public interface RdfIndexExporter extends IndexExporter
 {
     /**
      * JAVADOC
@@ -54,26 +53,7 @@
             throws IOException
         {
             RDFWriter rdfWriter = Rio.createWriter( RDFFormat.TRIG, out );
-            try
-            {
-                final RepositoryConnection connection = repository.getConnection();
-                try
-                {
-                    connection.export( rdfWriter );
-                }
-                catch( Exception e )
-                {
-                    e.printStackTrace();
-                }
-                finally
-                {
-                    connection.close();
-                }
-            }
-            catch( RepositoryException e )
-            {
-                throw new IOException( e );
-            }
+            exportToWriter( rdfWriter );
         }
 
         @Override
@@ -81,6 +61,12 @@
             throws IOException
         {
             RDFWriter rdfWriter = Rio.createWriter( RDFFormat.RDFXML, out );
+            exportToWriter( rdfWriter );
+        }
+
+        private void exportToWriter( RDFWriter rdfWriter )
+            throws IOException
+        {
             try
             {
                 final RepositoryConnection connection = repository.getConnection();
@@ -91,6 +77,7 @@
                 catch( Exception e )
                 {
                     e.printStackTrace();
+                    throw new IOException( "Problem writing to RdfWriter", e );
                 }
                 finally
                 {
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexingService.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexerService.java
similarity index 94%
rename from extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexingService.java
rename to extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexerService.java
index 11c5ce7..38f501a 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexingService.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/indexing/RdfIndexerService.java
@@ -49,20 +49,19 @@
 import org.openrdf.repository.RepositoryConnection;
 import org.openrdf.repository.RepositoryException;
 
-@Mixins( RdfIndexingService.RdfEntityIndexerMixin.class )
-@Activators( RdfIndexingService.Activator.class )
-public interface RdfIndexingService
-    extends StateChangeListener
+@Mixins( RdfIndexerService.RdfEntityIndexerMixin.class )
+@Activators( RdfIndexerService.Activator.class )
+public interface RdfIndexerService extends StateChangeListener
 {
     void initialize();
 
     File dataDir();
 
-    class Activator extends ActivatorAdapter<ServiceReference<RdfIndexingService>>
+    class Activator extends ActivatorAdapter<ServiceReference<RdfIndexerService>>
     {
 
         @Override
-        public void afterActivation( ServiceReference<RdfIndexingService> activated )
+        public void afterActivation( ServiceReference<RdfIndexerService> activated )
             throws Exception
         {
             activated.get().initialize();
@@ -73,7 +72,7 @@
      * JAVADOC Add JavaDoc
      */
     abstract class RdfEntityIndexerMixin
-        implements RdfIndexingService
+        implements RdfIndexerService
     {
         @Service
         private ServiceReference<Repository> repository;
@@ -126,7 +125,7 @@
             catch( Throwable e )
             {
                 e.printStackTrace();
-                //TODO What shall we do with the exception?
+                //TODO What shall we do with the exception? Probably figure out if we can recover, and possibly queue the state changes and retry later.
             }
         }
 
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java
index 2d80bd8..a515f74 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java
@@ -90,19 +90,15 @@
             }
             catch( RepositoryException e )
             {
-                throw new EntityFinderException( e );
+                throw new EntityFinderException( "Exception when executing query: " + query + "\nwith bindings " + bindings, e );
             }
-            catch( MalformedQueryException e )
+            catch( QueryEvaluationException | MalformedQueryException e )
             {
-                throw new EntityFinderException( e );
-            }
-            catch( QueryEvaluationException e )
-            {
-                throw new EntityFinderException( e );
+                throw new EntityFinderException( "Query is invalid: " + query, e );
             }
             catch( Exception e )
             {
-                throw new EntityFinderException( e );
+                throw new EntityFinderException( "Unexpected Exception while executing: " + query, e );
             }
         }
 
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RDFPerformanceTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RDFPerformanceTest.java
index 014d8fb..86bd8e3 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RDFPerformanceTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RDFPerformanceTest.java
@@ -102,7 +102,7 @@
         List<ExampleEntity> entities = new ArrayList<ExampleEntity>();
         for (Integer x = 0; x < howMany; ++x)
         {
-            ExampleEntity exampleEntity = this.unitOfWorkFactory.currentUnitOfWork().newEntity( ExampleEntity.class, new StringIdentity( "entity" + x ) );
+            ExampleEntity exampleEntity = this.unitOfWorkFactory.currentUnitOfWork().newEntity( ExampleEntity.class, StringIdentity.identityOf( "entity" + x ) );
 
             for (ExampleEntity entity : entities)
             {
@@ -188,7 +188,7 @@
         UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork();
         for (int i = 0; i < 1000; i++)
         {
-            ExampleEntity entity50 = uow.get(ExampleEntity.class, new StringIdentity( "entity50" ) );
+            ExampleEntity entity50 = uow.get(ExampleEntity.class, StringIdentity.identityOf( "entity50" ) );
             Query<ExampleEntity> query = uow.newQuery( this.queryBuilderFactory.newQueryBuilder( ExampleEntity.class ).
                     where( QueryExpressions.contains( QueryExpressions.templateFor( ExampleEntity.class ).manyAssoc(), entity50) ));
             System.out.println(query.count());
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfComplexQueryTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfComplexQueryTest.java
index 31c2d3c..63ca3fd 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfComplexQueryTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfComplexQueryTest.java
@@ -37,7 +37,7 @@
             throws AssemblyException
     {
         super.assemble( module );
-        module.services( RdfIndexingEngineService.class ).instantiateOnStartup();
+        module.services( RdfIndexingService.class ).instantiateOnStartup();
         module.objects( EntityStateSerializer.class, EntityTypeSerializer.class );
         module.services( MemoryRepositoryService.class ).identifiedBy( "rdf-indexing" ).instantiateOnStartup();
     }
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfEntityFinderTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfEntityFinderTest.java
index 86723ce..73bde3b 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfEntityFinderTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfEntityFinderTest.java
@@ -34,7 +34,7 @@
     {
         super.assemble( module );
         module.objects( EntityStateSerializer.class, EntityTypeSerializer.class );
-        module.services( RdfIndexingEngineService.class ).instantiateOnStartup();
+        module.services( RdfIndexingService.class ).instantiateOnStartup();
         module.services( MemoryRepositoryService.class ).identifiedBy( "rdf-indexing" ).instantiateOnStartup();
         // module.services( NativeRdfRepositoryService.class ).identifiedBy( "rdf-indexing" );
         // module.addComposites( NativeRdfConfiguration.class );
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfNamedQueryMultimoduleTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfNamedQueryMultimoduleTest.java
index 23c8f13..6f93f36 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfNamedQueryMultimoduleTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfNamedQueryMultimoduleTest.java
@@ -24,7 +24,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfMemoryStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 
@@ -40,12 +39,10 @@
         assembleValues( module, Visibility.module );
 
         ModuleAssembly storeModule = layer.module( "store" );
-        new DefaultUnitOfWorkAssembler().assemble( storeModule );
         new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( storeModule );
         assembleValues( storeModule, Visibility.module );
 
         ModuleAssembly indexModule = layer.module( "index" );
-        new DefaultUnitOfWorkAssembler().assemble( indexModule );
         new RdfMemoryStoreAssembler( Visibility.layer, Visibility.module ).assemble( indexModule );
     }
 
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryMultimoduleTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryMultimoduleTest.java
index 0ed4774..308182d 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryMultimoduleTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryMultimoduleTest.java
@@ -24,7 +24,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfNativeSesameStoreAssembler;
 import org.apache.polygene.library.rdf.repository.NativeConfiguration;
 import org.apache.polygene.test.EntityTestAssembler;
@@ -48,11 +47,9 @@
         ModuleAssembly storeModule = layer.module( "store" );
         new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( storeModule );
         assembleValues( storeModule, Visibility.module );
-        new DefaultUnitOfWorkAssembler().assemble( storeModule );
 
         ModuleAssembly indexModule = layer.module( "index" );
         new RdfNativeSesameStoreAssembler( Visibility.layer, Visibility.module ).assemble( indexModule );
-        new DefaultUnitOfWorkAssembler().assemble( indexModule );
 
         LayerAssembly configLayer = module.layer().application().layer( "config" );
         module.layer().uses( configLayer );
@@ -61,7 +58,6 @@
         config.forMixin( NativeConfiguration.class ).declareDefaults()
               .dataDirectory().set( tmpDir.getRoot().getAbsolutePath() );
         new EntityTestAssembler().assemble( config );
-        new DefaultUnitOfWorkAssembler().assemble( config );
     }
 
 }
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryTest.java
index ae49da8..da3c4d8 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/RdfQueryTest.java
@@ -22,7 +22,6 @@
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfNativeSesameStoreAssembler;
 import org.apache.polygene.library.rdf.repository.NativeConfiguration;
 import org.apache.polygene.test.EntityTestAssembler;
@@ -51,7 +50,6 @@
         config.forMixin( NativeConfiguration.class ).declareDefaults()
               .dataDirectory().set( tmpDir.getRoot().getAbsolutePath() );
         new EntityTestAssembler().assemble( config );
-        new DefaultUnitOfWorkAssembler().assemble( config );
     }
 
     @Test
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java
index 2694153..9e9bd14 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java
@@ -25,7 +25,6 @@
 import java.util.Collections;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.entity.EntityBuilder;
-import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.query.QueryBuilder;
 import org.apache.polygene.api.query.QueryBuilderFactory;
@@ -33,15 +32,13 @@
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.jdbm.JdbmConfiguration;
+import org.apache.polygene.entitystore.jdbm.JdbmEntityStoreConfiguration;
 import org.apache.polygene.entitystore.jdbm.assembly.JdbmEntityStoreAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfMemoryStoreAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfNativeSesameStoreAssembler;
@@ -145,7 +142,7 @@
 
         uow = unitOfWorkFactory.newUnitOfWork();
         QueryBuilder<ItemType> qb = queryBuilderFactory.newQueryBuilder( ItemType.class );
-        Iterable<ItemType> initialList = copyOf( uow.newQuery( qb ));
+        Iterable<ItemType> initialList = copyOf( uow.newQuery( qb ) );
 
         assertTrue( "Band is not in the initial list", hasItemTypeNamed( "Band", initialList ) );
         assertTrue( "Bracelet is not in the initial list", hasItemTypeNamed( "Bracelet", initialList ) );
@@ -158,10 +155,14 @@
         qb = queryBuilderFactory.newQueryBuilder( ItemType.class );
         Iterable<ItemType> listAfterFirstQueryAndAdd = copyOf( uow.newQuery( qb ) );
 
-        assertTrue( "Band is not in the list after the first query and add", hasItemTypeNamed( "Band", listAfterFirstQueryAndAdd ) );
-        assertTrue( "Bracelet is not in the list after the first query and add", hasItemTypeNamed( "Bracelet", listAfterFirstQueryAndAdd ) );
-        assertTrue( "Necklace is not in the list after the first query and add", hasItemTypeNamed( "Necklace", listAfterFirstQueryAndAdd ) );
-        assertTrue( "Watch is not in the list after the first query and add", hasItemTypeNamed( "Watch", listAfterFirstQueryAndAdd ) );
+        assertTrue( "Band is not in the list after the first query and add",
+                    hasItemTypeNamed( "Band", listAfterFirstQueryAndAdd ) );
+        assertTrue( "Bracelet is not in the list after the first query and add",
+                    hasItemTypeNamed( "Bracelet", listAfterFirstQueryAndAdd ) );
+        assertTrue( "Necklace is not in the list after the first query and add",
+                    hasItemTypeNamed( "Necklace", listAfterFirstQueryAndAdd ) );
+        assertTrue( "Watch is not in the list after the first query and add",
+                    hasItemTypeNamed( "Watch", listAfterFirstQueryAndAdd ) );
 
         newItemType( uow, "Ear ring" );
         uow.complete();
@@ -177,33 +178,27 @@
     }
 
     private Application createApplication( final ModuleAssemblyBuilder queryServiceModuleBuilder,
-                                              final ModuleAssemblyBuilder entityStoreModuleBuilder,
-                                              final LayerAssemblyBuilder domainLayerBuilder
+                                           final ModuleAssemblyBuilder entityStoreModuleBuilder,
+                                           final LayerAssemblyBuilder domainLayerBuilder
     )
         throws AssemblyException
     {
         Energy4Java polygene = new Energy4Java();
-        Application application = polygene.newApplication( new ApplicationAssembler()
-        {
-            @Override
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-                throws AssemblyException
-            {
-                ApplicationAssembly applicationAssembly = applicationFactory.newApplicationAssembly();
+        Application application = polygene.newApplication( factory -> {
+            ApplicationAssembly applicationAssembly = factory.newApplicationAssembly();
 
-                LayerAssembly configLayer = applicationAssembly.layer( "Config" );
-                configModule.buildModuleAssembly( configLayer, "Configuration" );
+            LayerAssembly configLayer = applicationAssembly.layer( "Config" );
+            configModule.buildModuleAssembly( configLayer, "Configuration" );
 
-                LayerAssembly infrastructureLayer = applicationAssembly.layer( "Infrastructure" );
-                infrastructureLayer.uses( configLayer );
+            LayerAssembly infrastructureLayer = applicationAssembly.layer( "Infrastructure" );
+            infrastructureLayer.uses( configLayer );
 
-                queryServiceModuleBuilder.buildModuleAssembly( infrastructureLayer, "Query Service" );
-                entityStoreModuleBuilder.buildModuleAssembly( infrastructureLayer, "Entity Store" );
+            queryServiceModuleBuilder.buildModuleAssembly( infrastructureLayer, "Query Service" );
+            entityStoreModuleBuilder.buildModuleAssembly( infrastructureLayer, "Entity Store" );
 
-                LayerAssembly domainLayer = domainLayerBuilder.buildLayerAssembly( applicationAssembly );
-                domainLayer.uses( infrastructureLayer );
-                return applicationAssembly;
-            }
+            LayerAssembly domainLayer = domainLayerBuilder.buildLayerAssembly( applicationAssembly );
+            domainLayer.uses( infrastructureLayer );
+            return applicationAssembly;
         } );
         return application;
     }
@@ -220,118 +215,51 @@
             throws AssemblyException;
     }
 
-    final ModuleAssemblyBuilder nativeRdf = new ModuleAssemblyBuilder()
-    {
-        @Override
-        public ModuleAssembly buildModuleAssembly( LayerAssembly layer, String name )
-            throws AssemblyException
-        {
-            return addModule( layer, name, new RdfNativeSesameStoreAssembler() );
-        }
-    };
+    final ModuleAssemblyBuilder nativeRdf =
+        ( layer, name ) -> addModule( layer, name, new RdfNativeSesameStoreAssembler() );
 
-    final ModuleAssemblyBuilder inMemoryStore = new ModuleAssemblyBuilder()
-    {
-        @Override
-        public ModuleAssembly buildModuleAssembly( LayerAssembly layer, String name )
-            throws AssemblyException
-        {
-            return addModule( layer, name, new EntityTestAssembler().visibleIn( Visibility.application ) );
-        }
-    };
+    final ModuleAssemblyBuilder inMemoryStore =
+        ( layer, name ) -> addModule( layer, name, new EntityTestAssembler().visibleIn( Visibility.application ) );
 
-    final ModuleAssemblyBuilder inMemoryRdf = new ModuleAssemblyBuilder()
-    {
-        @Override
-        public ModuleAssembly buildModuleAssembly( LayerAssembly layer, String name )
-            throws AssemblyException
-        {
-            return addModule( layer, name, new RdfMemoryStoreAssembler() );
-        }
-    };
+    final ModuleAssemblyBuilder inMemoryRdf =
+        ( layer, name ) -> addModule( layer, name, new RdfMemoryStoreAssembler() );
 
-    final ModuleAssemblyBuilder jdbmStore = new ModuleAssemblyBuilder()
-    {
-        @Override
-        public ModuleAssembly buildModuleAssembly( LayerAssembly layer, String name )
-            throws AssemblyException
-        {
-            return addModule( layer, name, jdbmEntityStoreAssembler() );
-        }
-    };
+    final ModuleAssemblyBuilder jdbmStore =
+        ( layer, name ) -> addModule( layer, name, module -> {
+            new JdbmEntityStoreAssembler().visibleIn( Visibility.application ).assemble( module );
+            module.defaultServices().visibleIn( Visibility.application );
+        } );
 
-    final ModuleAssemblyBuilder configModule = new ModuleAssemblyBuilder()
-    {
-        @Override
-        public ModuleAssembly buildModuleAssembly( LayerAssembly layer, String name )
-            throws AssemblyException
-        {
-            return addModule( layer, name, entityStoreConfigAssembler() );
-        }
-    };
+    final ModuleAssemblyBuilder configModule =
+        ( layer, name ) -> addModule( layer, name, entityStoreConfigAssembler() );
 
-    final LayerAssemblyBuilder domain = new LayerAssemblyBuilder()
-    {
-        @Override
-        public LayerAssembly buildLayerAssembly( ApplicationAssembly appAssembly )
-            throws AssemblyException
-        {
-            LayerAssembly domainLayer = appAssembly.layer( "Domain" );
-            addModule( domainLayer, "Domain", new Assembler()
-            {
-                @Override
-                @SuppressWarnings( "unchecked" )
-                public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-                {
-                    module.entities( ItemTypeEntity.class );
-                }
-            } );
+    final LayerAssemblyBuilder domain =
+        application -> {
+            LayerAssembly domainLayer = application.layer( "Domain" );
+            addModule( domainLayer, "Domain", module -> module.entities( ItemTypeEntity.class ) );
             return domainLayer;
-        }
-    };
+        };
 
     private Assembler entityStoreConfigAssembler()
     {
-        return new Assembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                new EntityTestAssembler().assemble( module );
+        return module -> {
+            new EntityTestAssembler().assemble( module );
 
-                module.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
-                module.forMixin( NativeConfiguration.class )
-                    .declareDefaults()
-                    .dataDirectory()
-                    .set( rdfDirectory().getAbsolutePath() );
+            module.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
+            module.forMixin( NativeConfiguration.class )
+                  .declareDefaults()
+                  .dataDirectory()
+                  .set( rdfDirectory().getAbsolutePath() );
 
-                module.entities( JdbmConfiguration.class ).visibleIn( Visibility.application );
-                module.forMixin( JdbmConfiguration.class )
-                    .declareDefaults()
-                    .file()
-                    .set( jdbmDirectory().getAbsolutePath() );
-            }
-        };
-    }
-
-    private Assembler jdbmEntityStoreAssembler()
-    {
-        return new Assembler()
-        {
-            @Override
-            @SuppressWarnings( "unchecked" )
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                new JdbmEntityStoreAssembler().visibleIn( Visibility.application ).assemble( module );
-            }
+            module.entities( JdbmEntityStoreConfiguration.class ).visibleIn( Visibility.application );
+            module.forMixin( JdbmEntityStoreConfiguration.class )
+                  .declareDefaults()
+                  .file()
+                  .set( jdbmDirectory().getAbsolutePath() );
         };
     }
 
     private ModuleAssembly addModule( LayerAssembly layerAssembly, String name, Assembler assembler )
-        throws AssemblyException
     {
         ModuleAssembly moduleAssembly = layerAssembly.module( name );
         assembler.assemble( moduleAssembly );
@@ -371,7 +299,7 @@
 
     private Iterable<ItemType> copyOf( Iterable<ItemType> iterable )
     {
-        Collection<ItemType> copy = new ArrayList<ItemType>();
+        Collection<ItemType> copy = new ArrayList<>();
         for( ItemType i : iterable )
         {
             copy.add( i );
@@ -391,8 +319,7 @@
         Property<String> name();
     }
 
-    interface ItemTypeEntity
-        extends ItemType, EntityComposite
+    interface ItemTypeEntity extends ItemType
     {
     }
 }
diff --git a/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/EmbeddedSolrService.java b/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/EmbeddedSolrService.java
index 29653a3..1d2dbb3 100644
--- a/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/EmbeddedSolrService.java
+++ b/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/EmbeddedSolrService.java
@@ -35,6 +35,8 @@
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.library.fileconfig.FileConfiguration;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
+
 @Mixins( EmbeddedSolrService.Mixin.class )
 @Activators( EmbeddedSolrService.Activator.class )
 public interface EmbeddedSolrService
@@ -112,8 +114,7 @@
 
          // Clear instance fields for GC purposes
          Field instanceField = SolrCore.class.getDeclaredField( "instance" );
-         instanceField.setAccessible( true );
-         instanceField.set( null, null );
+         accessible( instanceField ).set( null, null );
 
          SolrConfig.config = null;
       }
diff --git a/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/SolrQueryService.java b/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/SolrQueryService.java
index 445f7ea..13daa9f 100644
--- a/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/SolrQueryService.java
+++ b/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/SolrQueryService.java
@@ -33,8 +33,7 @@
  */
 @Mixins( { SolrEntityIndexerMixin.class, SolrEntityQueryMixin.class } )
 @Activators( SolrQueryService.Activator.class )
-public interface SolrQueryService
-        extends EntityFinder, StateChangeListener, SolrSearch
+public interface SolrQueryService extends EntityFinder, StateChangeListener, SolrSearch
 {
 
     void inflateSolrSchema();
diff --git a/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/assembly/SolrIndexingAssembler.java b/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/assembly/SolrIndexingAssembler.java
index 4932cdc..ab0e3c8 100644
--- a/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/assembly/SolrIndexingAssembler.java
+++ b/extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/assembly/SolrIndexingAssembler.java
@@ -31,6 +31,7 @@
     @Override
     public void assemble( ModuleAssembly module )
     {
+        super.assemble( module );
         module.services( EmbeddedSolrService.class ).identifiedBy( "solr" ).instantiateOnStartup();
         module.services( SolrQueryService.class )
               .taggedWith( "solr", "search", "indexing", "query" )
diff --git a/extensions/indexing-sql/dev-status.xml b/extensions/indexing-sql/dev-status.xml
index 762e250..71f671f 100644
--- a/extensions/indexing-sql/dev-status.xml
+++ b/extensions/indexing-sql/dev-status.xml
@@ -24,13 +24,13 @@
         http://polygene.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
         <!--none,early,beta,stable,mature-->
-        <codebase>stable</codebase>
+        <codebase>none</codebase>
 
         <!-- none, brief, good, complete -->
-        <documentation>brief</documentation>
+        <documentation>none</documentation>
 
         <!-- none, some, good, complete -->
-        <unittests>good</unittests>
+        <unittests>none</unittests>
     </status>
     <licenses>
         <license>ALv2</license>
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingEngineConfiguration.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingConfiguration.java
similarity index 93%
rename from extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingEngineConfiguration.java
rename to extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingConfiguration.java
index 5920ed6..33e6b66 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingEngineConfiguration.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingConfiguration.java
@@ -23,7 +23,7 @@
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.library.sql.common.SQLConfiguration;
 
-public interface SQLIndexingEngineConfiguration extends SQLConfiguration
+public interface SQLIndexingConfiguration extends SQLConfiguration
 {
     @UseDefaults( "POLYGENE_INDEX" )
     @Override
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingEngineService.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingService.java
similarity index 97%
rename from extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingEngineService.java
rename to extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingService.java
index e43d465..b3bdcd4 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingEngineService.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/SQLIndexingService.java
@@ -38,7 +38,7 @@
     SQLEntityFinder.class,
     SQLStateChangeListener.class
 } )
-public interface SQLIndexingEngineService
+public interface SQLIndexingService
         extends StateChangeListener, EntityFinder
 {
 }
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java
index 776c3c9..6c931be 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java
@@ -28,15 +28,14 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.index.reindexer.ReindexerConfiguration;
 import org.apache.polygene.index.reindexer.ReindexerService;
-import org.apache.polygene.index.sql.SQLIndexingEngineConfiguration;
+import org.apache.polygene.index.sql.SQLIndexingConfiguration;
 import org.apache.polygene.index.sql.support.common.ReindexingStrategy;
 import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 
-public abstract class AbstractSQLIndexQueryAssembler<AssemblerType>
-    extends Assemblers.VisibilityIdentityConfig<AssemblerType>
+public abstract class AbstractSQLIndexQueryAssembler<AssemblerType> extends Assemblers.VisibilityIdentityConfig<AssemblerType>
 {
-    public static final Identity DEFAULT_IDENTITY = new StringIdentity( "indexing-sql" );
+    public static final Identity DEFAULT_IDENTITY = StringIdentity.identityOf( "indexing-sql" );
 
     private Class<? extends ReindexingStrategy> reindexingStrategy = ReindexingStrategy.NeverNeed.class;
 
@@ -62,8 +61,8 @@
 
     @Override
     public final void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         try
         {
             SQLVendor sqlVendor = getSQLVendor();
@@ -91,7 +90,7 @@
 
         if( hasConfig() )
         {
-            configModule().entities( SQLIndexingEngineConfiguration.class,
+            configModule().entities( SQLIndexingConfiguration.class,
                                      ReindexerConfiguration.class ).
                               visibleIn( configVisibility() );
         }
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java
index b5e8cc6..3d4320e 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java
@@ -25,10 +25,8 @@
 import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 
-public class PostgreSQLIndexQueryAssembler
-    extends AbstractSQLIndexQueryAssembler<PostgreSQLIndexQueryAssembler>
+public class PostgreSQLIndexQueryAssembler extends AbstractSQLIndexQueryAssembler<PostgreSQLIndexQueryAssembler>
 {
-
     @Override
     protected SQLVendor getSQLVendor()
         throws IOException
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLService.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLService.java
index 6f05878..84e367c 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLService.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLService.java
@@ -20,7 +20,7 @@
 package org.apache.polygene.index.sql.support.postgresql;
 
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.index.sql.SQLIndexingEngineService;
+import org.apache.polygene.index.sql.SQLIndexingService;
 import org.apache.polygene.index.sql.internal.SQLEntityFinder;
 import org.apache.polygene.index.sql.internal.SQLStateChangeListener;
 import org.apache.polygene.index.sql.support.api.SQLAppStartup;
@@ -47,7 +47,7 @@
     PostgreSQLIndexExporter.class
 })
 public interface PostgreSQLService
-    extends SQLAppStartup, SQLIndexing, SQLQuerying, IndexExporter, SQLIndexingEngineService
+    extends SQLAppStartup, SQLIndexing, SQLQuerying, IndexExporter, SQLIndexingService
 {
 
 }
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java
index 47e0503..a250d66 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java
@@ -87,13 +87,16 @@
     implements SQLIndexing
 {
 
-    public static final Integer AMOUNT_OF_COLUMNS_IN_ENTITY_TABLE = 5;
+    protected static final Integer AMOUNT_OF_COLUMNS_IN_ENTITY_TABLE = 5;
 
-    public static final Integer AMOUNT_OF_COLUMNS_IN_ALL_QNAMES_TABLE = 2;
+    @SuppressWarnings( "WeakerAccess" )
+    protected static final Integer AMOUNT_OF_COLUMNS_IN_ALL_QNAMES_TABLE = 2;
 
-    public static final Integer AMOUNT_OF_COLUMNS_IN_ASSO_TABLE = 2;
+    @SuppressWarnings( "WeakerAccess" )
+    protected static final Integer AMOUNT_OF_COLUMNS_IN_ASSO_TABLE = 2;
 
-    public static final Integer AMOUNT_OF_COLUMNS_IN_MANY_ASSO_TABLE = 3;
+    @SuppressWarnings( "WeakerAccess" )
+    protected static final Integer AMOUNT_OF_COLUMNS_IN_MANY_ASSO_TABLE = 3;
 
     @Structure
     private Application _app;
@@ -299,10 +302,11 @@
         }
     }
 
+    @SuppressWarnings( "WeakerAccess" )
     protected InsertStatement createInsertStatement( String schemaName, String tableName,
                                                      Integer amountOfColumns,
                                                      SQLVendor vendor
-    )
+                                                   )
     {
         ModificationFactory m = vendor.getModificationFactory();
         LiteralFactory l = vendor.getLiteralFactory();
@@ -315,16 +319,14 @@
         }
 
         return m.insert().setTableName( t.tableName( schemaName, tableName ) )
-            .setColumnSource( columnBuilder.createExpression() ).createExpression();
+                .setColumnSource( columnBuilder.createExpression() ).createExpression();
     }
 
     protected abstract InsertStatement createInsertStatementWithAutoGeneratedIDForEntitiesTable(
-        String schemaName, String tableName, SQLVendor vendor
-    );
+        String schemaName, String tableName, SQLVendor vendor );
 
-    protected void addEntityInfoToInsertToEntityTablePS( EntityState state, PreparedStatement ps,
-                                                         int startingIndex
-    )
+    @SuppressWarnings( "SameParameterValue" )
+    protected void addEntityInfoToInsertToEntityTablePS( EntityState state, PreparedStatement ps, int startingIndex )
         throws SQLException
     {
         ps.setString( startingIndex, state.entityReference().identity().toString() );
@@ -333,9 +335,8 @@
         ps.setString( startingIndex + 3, this._app.version() );
     }
 
-    protected Long findEntityPK( EntityState state,
-                                 Lazy<PreparedStatement, SQLException> queryPKPS
-    )
+    @SuppressWarnings( "WeakerAccess" )
+    protected Long findEntityPK( EntityState state, Lazy<PreparedStatement, SQLException> queryPKPS )
         throws SQLException
     {
         // TODO build cache: Polygene Identity -> PK
@@ -363,11 +364,11 @@
     protected abstract long getPKFromAutoGeneratedIDInsert(
         EntityState state, PreparedStatement autoGeneratedIDStatement, SQLVendor vendor,
         Connection connection
-    )
+                                                          )
         throws SQLException;
 
-    protected UpdateStatement
-    createUpdateEntityTableStatement( String schemaName, SQLVendor vendor )
+    @SuppressWarnings( "WeakerAccess" )
+    protected UpdateStatement createUpdateEntityTableStatement( String schemaName, SQLVendor vendor )
     {
         ModificationFactory m = vendor.getModificationFactory();
         BooleanFactory b = vendor.getBooleanFactory();
@@ -397,9 +398,8 @@
         return builder.createExpression();
     }
 
-    protected QueryExpression createQueryEntityPkByIdentityStatement( String schemaName,
-                                                                      SQLVendor vendor
-    )
+    @SuppressWarnings( "WeakerAccess" )
+    protected QueryExpression createQueryEntityPkByIdentityStatement( String schemaName, SQLVendor vendor )
     {
         BooleanFactory b = vendor.getBooleanFactory();
         LiteralFactory l = vendor.getLiteralFactory();
@@ -421,25 +421,25 @@
         return q.createQuery( query.createExpression() );
     }
 
-    protected DeleteStatement createDeleteFromEntityTableStatement( String schemaName,
-                                                                    SQLVendor vendor
-    )
+    @SuppressWarnings( "WeakerAccess" )
+    protected DeleteStatement createDeleteFromEntityTableStatement( String schemaName, SQLVendor vendor )
     {
         return this.createDeleteFromTableStatement( schemaName, DBNames.ENTITY_TABLE_NAME,
                                                     DBNames.ENTITY_TABLE_IDENTITY_COLUMN_NAME, vendor );
     }
 
-    protected DeleteStatement
-    createClearEntityDataStatement( String schemaName, SQLVendor vendor )
+    @SuppressWarnings( "WeakerAccess" )
+    protected DeleteStatement createClearEntityDataStatement( String schemaName, SQLVendor vendor )
     {
         return this.createDeleteFromTableStatement( schemaName, DBNames.ALL_QNAMES_TABLE_NAME,
                                                     DBNames.ENTITY_TABLE_PK_COLUMN_NAME, vendor );
     }
 
+    @SuppressWarnings( "WeakerAccess" )
     protected DeleteStatement createDeleteFromTableStatement( String schemaName, String tableName,
                                                               String columnName,
                                                               SQLVendor vendor
-    )
+                                                            )
     {
         ModificationFactory m = vendor.getModificationFactory();
         BooleanFactory b = vendor.getBooleanFactory();
@@ -452,12 +452,13 @@
         // ";" //
         DeleteBySearchBuilder delete = m.deleteBySearch();
         delete.setTargetTable( m.createTargetTable( t.tableName( schemaName, tableName ) ) )
-            .getWhere()
-            .reset( b.eq( c.colName( columnName ), l.param() ) );
+              .getWhere()
+              .reset( b.eq( c.colName( columnName ), l.param() ) );
 
         return delete.createExpression();
     }
 
+    @SuppressWarnings( "WeakerAccess" )
     protected InsertStatement createPropertyInsert( QNameInfo qNameInfo, SQLVendor vendor )
     {
         String tableName = qNameInfo.getTableName();
@@ -466,7 +467,7 @@
         LiteralFactory l = vendor.getLiteralFactory();
 
         ColumnSourceByValuesBuilder columnBuilder = m.columnSourceByValues()
-            .addValues( l.param(), l.param(), l.param() );
+                                                     .addValues( l.param(), l.param(), l.param() );
         if( qNameInfo.getCollectionDepth() > 0 )
         {
             columnBuilder.addValues( l.func( "text2ltree", l.param() ) );
@@ -474,12 +475,13 @@
         columnBuilder.addValues( l.param() );
 
         return m.insert().setTableName( t.tableName( this._state.schemaName().get(), tableName ) )
-            .setColumnSource( columnBuilder.createExpression() ).createExpression();
+                .setColumnSource( columnBuilder.createExpression() ).createExpression();
     }
 
+    @SuppressWarnings( "WeakerAccess" )
     protected InsertStatement createAssoInsert( QNameInfo qNameInfo, SQLVendor vendor,
                                                 Integer amountOfParams
-    )
+                                              )
     {
         ModificationFactory m = vendor.getModificationFactory();
         LiteralFactory l = vendor.getLiteralFactory();
@@ -512,6 +514,7 @@
             .createExpression();
     }
 
+    @SuppressWarnings( "WeakerAccess" )
     protected InsertStatement createInsertEntityTypeStatement( String schemaName, SQLVendor vendor )
     {
         return this.createInsertStatement( schemaName, ENTITY_TYPES_JOIN_TABLE_NAME, 2, vendor );
@@ -520,7 +523,7 @@
     private void syncQNamesInsertPSs( Connection connection,
                                       Map<QualifiedName, PreparedStatement> qNameInsertPSs,
                                       Set<QualifiedName> qNames
-    )
+                                    )
         throws SQLException
     {
         Set<QualifiedName> copy = new HashSet<>( qNames );
@@ -530,8 +533,7 @@
             QNameInfo info = this._state.qNameInfos().get().get( qName );
             if( info == null )
             {
-                throw new InternalError(
-                    "Could not find database information about qualified name [" + qName + "]" );
+                throw new SqlIndexingException( "Could not find database information about qualified name [" + qName + "]" );
             }
 
             QNameType type = info.getQNameType();
@@ -549,8 +551,7 @@
             }
             else
             {
-                throw new IllegalArgumentException( "Did not know what to do with QName of type "
-                                                    + type + "." );
+                throw new SqlIndexingException( "Did not know what to do with QName of type " + type + "." );
             }
         }
     }
@@ -575,7 +576,7 @@
 
     private PreparedStatement createInsertManyAssociationPS( Connection connection,
                                                              QNameInfo qNameInfo
-    )
+                                                           )
         throws SQLException
     {
         SQLVendor vendor = this.descriptor.metaInfo( SQLVendor.class );
@@ -594,34 +595,34 @@
     private Integer insertPropertyQNames( Connection connection,
                                           Map<QualifiedName, PreparedStatement> qNameInsertPSs,
                                           PreparedStatement insertAllQNamesPS, EntityState state, Long entityPK
-    )
+                                        )
         throws SQLException
     {
         Set<QualifiedName> qNames = this._state.entityUsedQNames().get().get( state.entityDescriptor() );
         this.syncQNamesInsertPSs( connection, qNameInsertPSs, qNames );
-        final Integer propertyPK[] = {0};
+        final Integer propertyPK[] = { 0 };
         state.entityDescriptor().state().properties()
-            .filter( pDesc -> SQLSkeletonUtil.isQueryable( pDesc.accessor() ) )
-            .forEach( pDesc -> {
-                try
-                {
-                    propertyPK[0] = this.insertProperty(
-                        qNameInsertPSs,
-                        insertAllQNamesPS,
-                        propertyPK[0],
-                        entityPK,
-                        pDesc.qualifiedName(),
-                        state.propertyValueOf( pDesc.qualifiedName() ),
-                        null //
-                    );
-                }
-                catch( SQLException e )
-                {
-                    throw new EntityStoreException( "Underlying exception when inserting property " + pDesc,
-                                                    SQLUtil.withAllSQLExceptions( e ) );
-                }
-            } );
-        return propertyPK[0];
+             .filter( pDesc -> SQLSkeletonUtil.isQueryable( pDesc.accessor() ) )
+             .forEach( pDesc -> {
+                 try
+                 {
+                     propertyPK[ 0 ] = this.insertProperty(
+                         qNameInsertPSs,
+                         insertAllQNamesPS,
+                         propertyPK[ 0 ],
+                         entityPK,
+                         pDesc.qualifiedName(),
+                         state.propertyValueOf( pDesc.qualifiedName() ),
+                         null //
+                                                          );
+                 }
+                 catch( SQLException e )
+                 {
+                     throw new EntityStoreException( "Underlying exception when inserting property " + pDesc,
+                                                     SQLUtil.withAllSQLExceptions( e ) );
+                 }
+             } );
+        return propertyPK[ 0 ];
     }
 
     private void insertAssoAndManyAssoQNames( Map<QualifiedName, PreparedStatement> qNameInsertPSs,
@@ -629,71 +630,71 @@
                                               EntityState state,
                                               final Integer localPK,
                                               Long entityPK
-    )
+                                            )
         throws SQLException
     {
-        final Integer[] qNamePK = {localPK};
+        final Integer[] qNamePK = { localPK };
         state.entityDescriptor().state().associations()
-            .filter( aDesc -> SQLSkeletonUtil.isQueryable( aDesc.accessor() ) )
-            .forEach( aDesc -> {
-                try
-                {
-                    QualifiedName qName = aDesc.qualifiedName();
-                    PreparedStatement ps = qNameInsertPSs.get( qName );
-                    EntityReference ref = state.associationValueOf( qName );
-                    if( ref != null )
-                    {
-                        insertToAllQNamesPS.setInt( 1, qNamePK[0] );
-                        insertToAllQNamesPS.setLong( 2, entityPK );
-                        insertToAllQNamesPS.addBatch();
+             .filter( aDesc -> SQLSkeletonUtil.isQueryable( aDesc.accessor() ) )
+             .forEach( aDesc -> {
+                 try
+                 {
+                     QualifiedName qName = aDesc.qualifiedName();
+                     PreparedStatement ps = qNameInsertPSs.get( qName );
+                     EntityReference ref = state.associationValueOf( qName );
+                     if( ref != null )
+                     {
+                         insertToAllQNamesPS.setInt( 1, qNamePK[ 0 ] );
+                         insertToAllQNamesPS.setLong( 2, entityPK );
+                         insertToAllQNamesPS.addBatch();
 
-                        ps.setInt( 1, qNamePK[0] );
-                        ps.setLong( 2, entityPK );
-                        ps.setString( 3, ref.identity().toString() );
-                        ps.addBatch();
+                         ps.setInt( 1, qNamePK[ 0 ] );
+                         ps.setLong( 2, entityPK );
+                         ps.setString( 3, ref.identity().toString() );
+                         ps.addBatch();
 
-                        qNamePK[0] += 1;
-                    }
-                }
-                catch( SQLException e )
-                {
-                    throw new EntityStoreException( "Underlying exception when inserting association " + aDesc,
-                                                    SQLUtil.withAllSQLExceptions( e ) );
-                }
-            } );
+                         qNamePK[ 0 ] += 1;
+                     }
+                 }
+                 catch( SQLException e )
+                 {
+                     throw new EntityStoreException( "Underlying exception when inserting association " + aDesc,
+                                                     SQLUtil.withAllSQLExceptions( e ) );
+                 }
+             } );
 
         state.entityDescriptor().state().manyAssociations()
-            .filter( mDesc -> SQLSkeletonUtil.isQueryable( mDesc.accessor() ) )
-            .forEach( mDesc -> {
-                try
-                {
-                    QualifiedName qName = mDesc.qualifiedName();
-                    PreparedStatement ps = qNameInsertPSs.get( qName );
-                    Integer index = 0;
-                    for( EntityReference ref : state.manyAssociationValueOf( qName ) )
-                    {
-                        if( ref != null )
-                        {
-                            insertToAllQNamesPS.setInt( 1, qNamePK[0] );
-                            insertToAllQNamesPS.setLong( 2, entityPK );
-                            insertToAllQNamesPS.addBatch();
+             .filter( mDesc -> SQLSkeletonUtil.isQueryable( mDesc.accessor() ) )
+             .forEach( mDesc -> {
+                 try
+                 {
+                     QualifiedName qName = mDesc.qualifiedName();
+                     PreparedStatement ps = qNameInsertPSs.get( qName );
+                     Integer index = 0;
+                     for( EntityReference ref : state.manyAssociationValueOf( qName ) )
+                     {
+                         if( ref != null )
+                         {
+                             insertToAllQNamesPS.setInt( 1, qNamePK[ 0 ] );
+                             insertToAllQNamesPS.setLong( 2, entityPK );
+                             insertToAllQNamesPS.addBatch();
 
-                            ps.setInt( 1, qNamePK[0] );
-                            ps.setLong( 2, entityPK );
-                            ps.setInt( 3, index );
-                            ps.setString( 4, ref.identity().toString() );
-                            ps.addBatch();
-                            qNamePK[0] += 1;
-                        }
-                        ++index;
-                    }
-                }
-                catch( SQLException e )
-                {
-                    throw new EntityStoreException( "Underlying exception when inserting manyassociation " + mDesc,
-                                                    SQLUtil.withAllSQLExceptions( e ) );
-                }
-            } );
+                             ps.setInt( 1, qNamePK[ 0 ] );
+                             ps.setLong( 2, entityPK );
+                             ps.setInt( 3, index );
+                             ps.setString( 4, ref.identity().toString() );
+                             ps.addBatch();
+                             qNamePK[ 0 ] += 1;
+                         }
+                         ++index;
+                     }
+                 }
+                 catch( SQLException e )
+                 {
+                     throw new EntityStoreException( "Underlying exception when inserting manyassociation " + mDesc,
+                                                     SQLUtil.withAllSQLExceptions( e ) );
+                 }
+             } );
     }
 
     private Integer insertProperty(
@@ -704,7 +705,7 @@
         QualifiedName qName,
         Object property,
         Integer parentQNameID
-    )
+                                  )
         throws SQLException
     {
         Integer result = propertyPK;
@@ -744,7 +745,7 @@
         QualifiedName qName,
         Collection<?> property,
         Integer parentQNameID
-    )
+                                           )
         throws SQLException
     {
         QNameInfo info = this._state.qNameInfos().get().get( qName );
@@ -762,7 +763,7 @@
     private Integer storeCollectionInfo( PreparedStatement insertAllQNamesPS, Integer propertyPK,
                                          Long entityPK,
                                          Integer parentQNameID, PreparedStatement ps, QNameInfo info
-    )
+                                       )
         throws SQLException
     {
         insertAllQNamesPS.setInt( 1, propertyPK );
@@ -798,7 +799,7 @@
                                           Integer parentPK,
                                           Type finalType,
                                           Boolean isFinalTypePrimitive
-    )
+                                        )
         throws SQLException
     {
         Integer index = 0;
@@ -836,7 +837,7 @@
         Object item,
         Boolean isFinalTypePrimitive,
         Type finalType
-    )
+                                       )
         throws SQLException
     {
         insertAllQNamesPS.setInt( 1, propertyPK );
@@ -869,7 +870,7 @@
         QualifiedName qName,
         Object property,
         Integer parentQNameID
-    )
+                                          )
         throws SQLException
     {
         QNameInfo info = this._state.qNameInfos().get().get( qName );
@@ -896,7 +897,7 @@
         QualifiedName qName,
         Object property,
         Integer parentQNameID
-    )
+                                               )
         throws SQLException
     {
 
@@ -920,7 +921,7 @@
                                          Integer localPK,
                                          Long entityPK,
                                          Object property
-    )
+                                       )
         throws SQLException
     {
         ValueDescriptor vDesc = this._qi4SPI.valueDescriptorFor( property );
@@ -930,15 +931,15 @@
 
             try
             {
-                propertyPK[0] = this.insertProperty(
+                propertyPK[ 0 ] = this.insertProperty(
                     qNameInsertPSs,
                     insertAllQNamesPS,
-                    propertyPK[0],
+                    propertyPK[ 0 ],
                     entityPK,
                     pDesc.qualifiedName(),
                     state.propertyFor( pDesc.accessor() ).get(),
                     localPK
-                );
+                                                     );
             }
             catch( SQLException e )
             {
@@ -947,13 +948,13 @@
             }
         } );
 
-        return propertyPK[0];
+        return propertyPK[ 0 ];
     }
 
     private void storePrimitiveUsingPS( PreparedStatement ps, Integer nextFreeIndex,
                                         Object primitive,
                                         Type primitiveType
-    )
+                                      )
         throws SQLException
     {
         if( primitiveType instanceof ParameterizedType )
@@ -968,7 +969,7 @@
                 nextFreeIndex,
                 this._state.enumPKs().get().get(
                     QualifiedName.fromClass( (Class<?>) primitiveType, primitive.toString() ).toString() )
-            );
+                     );
         }
         else
         {
@@ -999,7 +1000,7 @@
                                                 EntityState state,
                                                 Long entityPK,
                                                 Map<Long, Integer> qNamePKs
-    )
+                                              )
         throws SQLException
     {
 
@@ -1024,7 +1025,7 @@
                                    EntityState state,
                                    Long entityPK,
                                    Map<Long, Integer> qNamePKs
-    )
+                                 )
         throws SQLException
     {
         Integer nextQnamePK = this.insertPropertyQNames( connection,
@@ -1047,9 +1048,9 @@
             Integer typePK = this._state.entityTypePKs().get().get( clazz.getName() );
             if( typePK == null )
             {
-                throw new InternalError( "Tried to get entity : " + clazz
-                                         + ", but only aware of the following entities: "
-                                         + this._state.entityTypePKs().get().keySet() );
+                throw new SqlIndexingException( "Tried to get entity : " + clazz
+                                                + ", but only aware of the following entities: "
+                                                + this._state.entityTypePKs().get().keySet() );
             }
             try
             {
@@ -1059,7 +1060,7 @@
             }
             catch( SQLException e )
             {
-                throw new EntityStoreException( "Underlying Exception when inserting " + entityPK,
+                throw new SqlIndexingException( "Underlying Exception when inserting " + entityPK,
                                                 SQLUtil.withAllSQLExceptions( e ) );
             }
         } );
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java
index e2d2cc6..6a8aa12 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java
@@ -1654,9 +1654,14 @@
         + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_END )
         + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_START ) + "(.*)"
         + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_END )
-        + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_START ) + "(" + "[^"
+        + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_START )
+        + "([^"
         + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_END + DESCRIPTOR_TYPE_SEPARATOR )
-        + "]+)" + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_END ) + "$" );
+        + "]+)"
+        + "(,[^"
+        + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_END + DESCRIPTOR_TYPE_SEPARATOR )
+        + "]+)*"
+        + Pattern.quote( DESCRIPTOR_COMPONENT_SEPARATOR_END ) + "$" );
 
     protected static String compositeDescriptorToString( LayerDescriptor layer,
                                                          ModuleDescriptor module, CompositeDescriptor descriptor )
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
index bf665c6..4b1d9a2 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
@@ -34,7 +34,6 @@
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.type.CollectionType;
 import org.apache.polygene.api.type.EntityCompositeType;
-import org.apache.polygene.api.type.ValueCompositeType;
 import org.apache.polygene.api.type.ValueType;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.spi.entity.EntityState;
@@ -307,6 +306,12 @@
         }
 
         @Override
+        public boolean hasAssociation( QualifiedName name )
+        {
+            return wrappedAssociationStateDescriptor.hasAssociation( name );
+        }
+
+        @Override
         public AssociationDescriptor getManyAssociationByName( String name )
             throws IllegalArgumentException
         {
@@ -321,6 +326,12 @@
         }
 
         @Override
+        public boolean hasManyAssociation( QualifiedName name )
+        {
+            return false;
+        }
+
+        @Override
         public AssociationDescriptor getNamedAssociationByName( String name )
             throws IllegalArgumentException
         {
@@ -335,6 +346,12 @@
         }
 
         @Override
+        public boolean hasNamedAssociation( QualifiedName name )
+        {
+            return false;
+        }
+
+        @Override
         public Stream<? extends AssociationDescriptor> associations()
         {
             return wrappedAssociationStateDescriptor.associations();
@@ -367,6 +384,12 @@
         }
 
         @Override
+        public boolean hasProperty( QualifiedName name )
+        {
+            return wrappedAssociationStateDescriptor.hasProperty( name );
+        }
+
+        @Override
         public Stream<? extends PropertyDescriptor> properties()
         {
             return wrappedAssociationStateDescriptor.properties().filter( PROPERTY_SPEC );
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SqlIndexingException.java
similarity index 68%
copy from extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java
copy to extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SqlIndexingException.java
index b792a17..31de389 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchIndexException.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SqlIndexingException.java
@@ -14,23 +14,21 @@
  *  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.polygene.index.elasticsearch;
+package org.apache.polygene.index.sql.support.skeletons;
 
-public class ElasticSearchIndexException
-        extends RuntimeException
+import org.apache.polygene.api.indexing.IndexingException;
+
+@SuppressWarnings( "WeakerAccess" )
+public class SqlIndexingException extends IndexingException
 {
-
-    public ElasticSearchIndexException( String string )
+    public SqlIndexingException( String message )
     {
-        super( string );
+        super( message );
     }
 
-    public ElasticSearchIndexException( String string, Throwable thrwbl )
+    public SqlIndexingException( String message, Throwable cause )
     {
-        super( string, thrwbl );
+        super( message, cause );
     }
-
 }
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
index da9e217..d9ad732 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLComplexQueryTest.java
@@ -21,7 +21,7 @@
 
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.test.internal.DockerRule;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.indexing.AbstractComplexQueryTest;
 import org.junit.ClassRule;
 
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
index 58869a6..887d2d1 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
@@ -36,7 +36,7 @@
 import org.apache.polygene.library.sql.generator.vendor.PostgreSQLVendor;
 import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.apache.polygene.test.internal.DockerRule;
+import org.apache.polygene.test.docker.DockerRule;
 import org.junit.Assert;
 import org.junit.ClassRule;
 import org.junit.Test;
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
index e909827..ca96386 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLEntityFinderTest.java
@@ -21,8 +21,8 @@
 
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.indexing.AbstractEntityFinderTest;
-import org.apache.polygene.test.internal.DockerRule;
 import org.junit.ClassRule;
 
 public class PostgreSQLEntityFinderTest
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
index 2d4dde5..d919be4 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLQueryTest.java
@@ -21,7 +21,7 @@
 
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.test.internal.DockerRule;
+import org.apache.polygene.test.docker.DockerRule;
 import org.apache.polygene.test.indexing.AbstractQueryTest;
 import org.junit.ClassRule;
 import org.junit.Ignore;
diff --git a/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleMetricsProvider.java b/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleMetricsProvider.java
index 18a5483..21b87ec 100644
--- a/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleMetricsProvider.java
+++ b/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/CodahaleMetricsProvider.java
@@ -26,8 +26,7 @@
 import org.apache.polygene.api.service.ServiceActivation;
 
 @Mixins( CodahaleMetricsMixin.class )
-public interface CodahaleMetricsProvider
-        extends MetricsProvider, ServiceActivation
+public interface CodahaleMetricsProvider extends MetricsProvider, ServiceActivation
 {
     MetricRegistry metricRegistry();
 
diff --git a/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/assembly/CodahaleMetricsAssembler.java b/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/assembly/CodahaleMetricsAssembler.java
index a737c06..f2bd5d6 100644
--- a/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/assembly/CodahaleMetricsAssembler.java
+++ b/extensions/metrics-codahale/src/main/java/org/apache/polygene/metrics/codahale/assembly/CodahaleMetricsAssembler.java
@@ -30,7 +30,6 @@
 import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.metrics.codahale.CodahaleMetricsProvider;
@@ -108,8 +107,8 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-            throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service =
             module.services( CodahaleMetricsProvider.class )
                   .setMetaInfo( declaration )
diff --git a/extensions/migration/src/test/java/org/apache/polygene/migration/MigrationTest.java b/extensions/migration/src/test/java/org/apache/polygene/migration/MigrationTest.java
index 27fe187..b47656c 100644
--- a/extensions/migration/src/test/java/org/apache/polygene/migration/MigrationTest.java
+++ b/extensions/migration/src/test/java/org/apache/polygene/migration/MigrationTest.java
@@ -31,7 +31,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.migration.assembly.EntityMigrationOperation;
 import org.apache.polygene.migration.assembly.MigrationBuilder;
 import org.apache.polygene.migration.assembly.MigrationContext;
@@ -58,7 +57,6 @@
         throws AssemblyException
     {
         new EntityTestAssembler().assemble( module );
-        new DefaultUnitOfWorkAssembler().assemble( module );
 
         module.objects( MigrationEventLogger.class );
         module.importedServices( MigrationEventLogger.class ).importedBy( NewObjectImporter.class );
@@ -105,16 +103,12 @@
         // Set up version 1
         List<String> data_v1;
         {
-            SingletonAssembler v1 = new SingletonAssembler()
-            {
-                @Override
-                public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-                {
-                    MigrationTest.this.assemble( module );
-                    module.layer().application().setVersion( "1.0" );
+            SingletonAssembler v1 = new SingletonAssembler(
+                moduleAssembly -> {
+                    MigrationTest.this.assemble( moduleAssembly );
+                    moduleAssembly.layer().application().setVersion( "1.0" );
                 }
-            };
+            );
 
             UnitOfWork uow = v1.module().unitOfWorkFactory().newUnitOfWork();
             TestEntity1_0 entity = uow.newEntity( TestEntity1_0.class );
@@ -134,16 +128,12 @@
         // Set up version 1.1
         List<String> data_v1_1;
         {
-            SingletonAssembler v1_1 = new SingletonAssembler()
-            {
-                @Override
-                public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-                {
-                    MigrationTest.this.assemble( module );
-                    module.layer().application().setVersion( "1.1" );
+            SingletonAssembler v1_1 = new SingletonAssembler(
+                moduleAssembly -> {
+                    MigrationTest.this.assemble( moduleAssembly );
+                    moduleAssembly.layer().application().setVersion( "1.1" );
                 }
-            };
+            );
 
             BackupRestore testData = v1_1.module().findService( BackupRestore.class ).get();
             testData.restore( data_v1.stream() );
@@ -163,16 +153,12 @@
 
         // Set up version 2.0
         {
-            SingletonAssembler v2_0 = new SingletonAssembler()
-            {
-                @Override
-                public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-                {
-                    MigrationTest.this.assemble( module );
-                    module.layer().application().setVersion( "2.0" );
+            SingletonAssembler v2_0 = new SingletonAssembler(
+                moduleAssembly -> {
+                    MigrationTest.this.assemble( moduleAssembly );
+                    moduleAssembly.layer().application().setVersion( "2.0" );
                 }
-            };
+            );
 
             BackupRestore testData = v2_0.module().findService( BackupRestore.class ).get();
 
@@ -191,16 +177,12 @@
 
         // Set up version 3.0
         {
-            SingletonAssembler v3_0 = new SingletonAssembler()
-            {
-                @Override
-                public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-                {
-                    MigrationTest.this.assemble( module );
-                    module.layer().application().setVersion( "3.0" );
+            SingletonAssembler v3_0 = new SingletonAssembler(
+                moduleAssembly -> {
+                    MigrationTest.this.assemble( moduleAssembly );
+                    moduleAssembly.layer().application().setVersion( "3.0" );
                 }
-            };
+            );
 
             BackupRestore testData = v3_0.module().findService( BackupRestore.class ).get();
             testData.restore( data_v1_1.stream() );
diff --git a/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java b/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
index 38c91a8..858cfc7 100644
--- a/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
+++ b/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
@@ -34,7 +34,7 @@
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.jdbm.JdbmConfiguration;
+import org.apache.polygene.entitystore.jdbm.JdbmEntityStoreConfiguration;
 import org.apache.polygene.entitystore.jdbm.assembly.JdbmEntityStoreAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfNativeSesameStoreAssembler;
 import org.apache.polygene.library.rdf.repository.NativeConfiguration;
@@ -74,10 +74,10 @@
 
         // Configuration
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
-        config.entities( JdbmConfiguration.class, NativeConfiguration.class, ReindexerConfiguration.class )
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+        config.entities( JdbmEntityStoreConfiguration.class, NativeConfiguration.class, ReindexerConfiguration.class )
               .visibleIn( Visibility.layer );
-        config.forMixin( JdbmConfiguration.class ).declareDefaults()
+        config.forMixin( JdbmEntityStoreConfiguration.class ).declareDefaults()
               .file().set( new File( tmpDir.getRoot(), ENTITIES_DIR ).getAbsolutePath() );
         config.forMixin( NativeConfiguration.class ).declareDefaults()
               .dataDirectory().set( new File( tmpDir.getRoot(), INDEX_DIR ).getAbsolutePath() );
diff --git a/extensions/serialization-javaxjson/src/main/java/org/apache/polygene/serialization/javaxjson/assembly/JavaxJsonSerializationAssembler.java b/extensions/serialization-javaxjson/src/main/java/org/apache/polygene/serialization/javaxjson/assembly/JavaxJsonSerializationAssembler.java
index 10a8622..0bd397c 100644
--- a/extensions/serialization-javaxjson/src/main/java/org/apache/polygene/serialization/javaxjson/assembly/JavaxJsonSerializationAssembler.java
+++ b/extensions/serialization-javaxjson/src/main/java/org/apache/polygene/serialization/javaxjson/assembly/JavaxJsonSerializationAssembler.java
@@ -45,6 +45,7 @@
     @Override
     public void assemble( ModuleAssembly module )
     {
+        super.assemble( module );
         ServiceDeclaration declaration = module.services( JavaxJsonSerialization.class )
                                                .withTypes( Serialization.class,
                                                            Serializer.class, Deserializer.class,
diff --git a/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java b/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java
index f054561..b8bd69d 100644
--- a/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java
+++ b/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java
@@ -17,8 +17,16 @@
  */
 package org.apache.polygene.serialization.javaxjson;
 
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.serialization.javaxjson.assembly.JavaxJsonSerializationAssembler;
 import org.apache.polygene.test.entity.AbstractConfigurationDeserializationTest;
 
 public class JavaxJsonConfigurationDeserializationTest extends AbstractConfigurationDeserializationTest
 {
+    @Override
+    public void assemble( ModuleAssembly module )
+    {
+        new JavaxJsonSerializationAssembler().assemble( module );
+        super.assemble( module );
+    }
 }
diff --git a/extensions/serialization-javaxxml/src/main/java/org/apache/polygene/serialization/javaxxml/assembly/JavaxXmlSerializationAssembler.java b/extensions/serialization-javaxxml/src/main/java/org/apache/polygene/serialization/javaxxml/assembly/JavaxXmlSerializationAssembler.java
index e6a69f5..2385715 100644
--- a/extensions/serialization-javaxxml/src/main/java/org/apache/polygene/serialization/javaxxml/assembly/JavaxXmlSerializationAssembler.java
+++ b/extensions/serialization-javaxxml/src/main/java/org/apache/polygene/serialization/javaxxml/assembly/JavaxXmlSerializationAssembler.java
@@ -45,6 +45,7 @@
     @Override
     public void assemble( ModuleAssembly module )
     {
+        super.assemble( module );
         ServiceDeclaration declaration = module.services( JavaxXmlSerialization.class )
                                                .withTypes( Serialization.class,
                                                            Serializer.class, Deserializer.class,
diff --git a/extensions/serialization-messagepack/src/main/java/org/apache/polygene/serialization/messagepack/assembly/MessagePackSerializationAssembler.java b/extensions/serialization-messagepack/src/main/java/org/apache/polygene/serialization/messagepack/assembly/MessagePackSerializationAssembler.java
index 7f87458..a262e80 100644
--- a/extensions/serialization-messagepack/src/main/java/org/apache/polygene/serialization/messagepack/assembly/MessagePackSerializationAssembler.java
+++ b/extensions/serialization-messagepack/src/main/java/org/apache/polygene/serialization/messagepack/assembly/MessagePackSerializationAssembler.java
@@ -41,6 +41,7 @@
     @Override
     public void assemble( ModuleAssembly module )
     {
+        super.assemble( module );
         ServiceDeclaration declaration = module.services( MessagePackSerialization.class )
                                                .withTypes( Serialization.class,
                                                            Serializer.class, Deserializer.class,
diff --git a/gradle.properties b/gradle.properties
index ee0e41c..e9e70aa 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -16,4 +16,6 @@
 #  limitations under the License.
 #
 
+systemProp.file.encoding=UTF-8
+
 org.gradle.jvmargs=-Xms2g -Xmx2g
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 51288f9..e72a4d1 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 2271d9f..e7e0968 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -20,5 +20,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
-
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-all.zip
diff --git a/gradlew b/gradlew
index 4453cce..cccdd3d 100755
--- a/gradlew
+++ b/gradlew
@@ -33,11 +33,11 @@
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
 
-warn ( ) {
+warn () {
     echo "$*"
 }
 
-die ( ) {
+die () {
     echo
     echo "$*"
     echo
@@ -155,7 +155,7 @@
 fi
 
 # Escape application args
-save ( ) {
+save () {
     for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
     echo " "
 }
diff --git a/internals/testsupport-internal/build.gradle b/internals/testsupport-internal/build.gradle
index a38d41c..f04063b 100644
--- a/internals/testsupport-internal/build.gradle
+++ b/internals/testsupport-internal/build.gradle
@@ -24,9 +24,8 @@
 jar { manifest { name = "Apache Polygene™ Internals - Test Support" } }
 
 dependencies {
-  api polygene.core.testsupport
+    api polygene.core.testsupport
 
-  implementation libraries.docker_junit
-
-  runtimeOnly polygene.core.runtime
+    implementation libraries.docker_junit
+    runtimeOnly polygene.core.runtime
 }
diff --git a/internals/testsupport-internal/src/main/docker/mongo/Dockerfile b/internals/testsupport-internal/src/main/docker/mongo/Dockerfile
new file mode 100644
index 0000000..8212526
--- /dev/null
+++ b/internals/testsupport-internal/src/main/docker/mongo/Dockerfile
@@ -0,0 +1,16 @@
+# 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.
+
+FROM @mongo@
diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DelayChecker.java b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DelayChecker.java
similarity index 97%
rename from internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DelayChecker.java
rename to internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DelayChecker.java
index 574381d..36de1ea 100644
--- a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DelayChecker.java
+++ b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DelayChecker.java
@@ -15,7 +15,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.polygene.test.internal;
+package org.apache.polygene.test.docker;
 
 import pl.domzal.junit.docker.rule.wait.StartCondition;
 import pl.domzal.junit.docker.rule.wait.StartConditionCheck;
diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DockerRule.java
similarity index 98%
rename from internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java
rename to internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DockerRule.java
index 35b4f12..07cf07a 100644
--- a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java
+++ b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/DockerRule.java
@@ -15,7 +15,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.polygene.test.internal;
+package org.apache.polygene.test.docker;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -86,7 +86,7 @@
                 .builder()
                 .imageName( "org.apache.polygene:org.apache.polygene.internal.docker-" + image )
                 .publishAllPorts( true )
-                .waitForTimeout( 60000 )
+                .waitForTimeout( 180 )
                 .waitFor( rule -> new AndChecker( rule, waitFor ) );
             environment.forEach( builder::env );
             dockerRule = builder.build();
diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/package.html b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/package.html
similarity index 94%
rename from internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/package.html
rename to internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/package.html
index 6288f30..48031f2 100644
--- a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/package.html
+++ b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/docker/package.html
@@ -16,10 +16,10 @@
   ~  limitations under the License.
   ~
   ~
-  -->
+-->
 
 <html>
 <body>
-<h1>Polygene Internal TestSupport.</h1>
+<h1>Polygene Internal Docker TestSupport.</h1>
 </body>
 </html>
\ No newline at end of file
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
index c205f64..0b90143 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
@@ -214,7 +214,7 @@
         public AlarmPoint createAlarm( String name, AlarmCategory category )
         {
             UnitOfWork uow = uowf.currentUnitOfWork();
-            EntityBuilder<AlarmPoint> builder = uow.newEntityBuilder( AlarmPoint.class, new StringIdentity( name ) );
+            EntityBuilder<AlarmPoint> builder = uow.newEntityBuilder( AlarmPoint.class, StringIdentity.identityOf( name ) );
             builder.instance().category().set( category );
             AlarmPoint.AlarmState state = builder.instanceFor( AlarmPoint.AlarmState.class );
             state.systemName().set( name );
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemAssembler.java b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemAssembler.java
index 8386b52..405ca99 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemAssembler.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.alarm;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 
@@ -29,8 +28,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration alarmSystem = module.services( AlarmSystemService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
diff --git a/libraries/alarm/src/test/java/org/apache/polygene/library/alarm/AlarmProxyTest.java b/libraries/alarm/src/test/java/org/apache/polygene/library/alarm/AlarmProxyTest.java
index 478ef93..cd6c292 100644
--- a/libraries/alarm/src/test/java/org/apache/polygene/library/alarm/AlarmProxyTest.java
+++ b/libraries/alarm/src/test/java/org/apache/polygene/library/alarm/AlarmProxyTest.java
@@ -21,13 +21,13 @@
 package org.apache.polygene.library.alarm;
 
 import org.apache.polygene.api.identity.StringIdentity;
-import org.junit.Test;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.notNullValue;
@@ -60,7 +60,7 @@
         try
         {
 // START SNIPPET: documentation
-            myAlarmPoint = factory.create( new StringIdentity( "This Alarm Identity" ), "ProActiveCRM", "Sales", AlarmClass.B );
+            myAlarmPoint = factory.create( StringIdentity.identityOf( "This Alarm Identity" ), "ProActiveCRM", "Sales", AlarmClass.B );
             myAlarmPoint.history().maxSize().set( 20 );
 // END SNIPPET: documentation
 
@@ -71,7 +71,7 @@
             assertThat( myAlarmPoint.history().activateCounter(), equalTo( 1 ) );
             AlarmEvent event = myAlarmPoint.history().firstEvent();
             assertThat( event, notNullValue() );
-            assertThat( event.identity().get(), equalTo( new StringIdentity( "This Alarm Identity" ) ) );
+            assertThat( event.identity().get(), equalTo( StringIdentity.identityOf( "This Alarm Identity" ) ) );
             assertThat( event.newStatus().get().name( null ), equalTo( "Activated" ) );
             assertThat( event.oldStatus().get().name( null ), equalTo( "Normal" ) );
         }
diff --git a/libraries/constraints/build.gradle b/libraries/constraints/build.gradle
index 5181d76..84e52b2 100644
--- a/libraries/constraints/build.gradle
+++ b/libraries/constraints/build.gradle
@@ -27,6 +27,8 @@
 dependencies {
   api polygene.core.bootstrap
 
+  api libraries.commons_validator
+
   runtimeOnly polygene.core.runtime
 
   testImplementation polygene.core.testsupport
diff --git a/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/HostPortConstraint.java b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/HostPortConstraint.java
new file mode 100644
index 0000000..53719f5
--- /dev/null
+++ b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/HostPortConstraint.java
@@ -0,0 +1,43 @@
+/*
+ *  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.polygene.library.constraints;
+
+import org.apache.commons.validator.routines.UrlValidator;
+import org.apache.polygene.api.constraint.Constraint;
+import org.apache.polygene.library.constraints.annotation.HostPort;
+
+/**
+ * Implement @HostPort constraint.
+ */
+public class HostPortConstraint
+    implements Constraint<HostPort, String>
+{
+    private static final UrlValidator VALIDATOR = new UrlValidator( new String[]{ "http" }, UrlValidator.NO_FRAGMENTS );
+
+    @Override
+    public boolean isValid( HostPort annotation, String value )
+    {
+        if( value.startsWith( "localhost" ) )
+        {
+            value = "localhost.my" + value.substring( 9 );
+        }
+        return VALIDATOR.isValid( "http://" + value );
+    }
+}
diff --git a/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/HostPortListConstraint.java b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/HostPortListConstraint.java
new file mode 100644
index 0000000..4a39876
--- /dev/null
+++ b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/HostPortListConstraint.java
@@ -0,0 +1,58 @@
+/*
+ *  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.polygene.library.constraints;
+
+import org.apache.commons.validator.routines.UrlValidator;
+import org.apache.polygene.api.constraint.Constraint;
+import org.apache.polygene.library.constraints.annotation.HostPortList;
+
+import static java.util.Arrays.stream;
+
+/**
+ * Implement @HostPortList constraint.
+ */
+public class HostPortListConstraint
+    implements Constraint<HostPortList, String>
+{
+    private static final UrlValidator VALIDATOR = new UrlValidator( new String[]{ "http" }, UrlValidator.NO_FRAGMENTS );
+
+    @Override
+    public boolean isValid( HostPortList annotation, String value )
+    {
+        return stream( value.split( "[ ,]+" ) )
+            .map( this::handleLocalHost )
+            .map( this::prefixProtocol )
+            .allMatch( VALIDATOR::isValid );
+    }
+
+    private String handleLocalHost( String entry )
+    {
+        if( entry.startsWith( "localhost" ) )
+        {
+            return "localhost.my" + entry.substring( 9 );
+        }
+        return entry;
+    }
+
+    private String prefixProtocol( String value )
+    {
+        return "http://" + value;
+    }
+}
diff --git a/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/annotation/HostPort.java b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/annotation/HostPort.java
new file mode 100644
index 0000000..6a3b508
--- /dev/null
+++ b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/annotation/HostPort.java
@@ -0,0 +1,37 @@
+/*
+ *  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.polygene.library.constraints.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import org.apache.polygene.api.constraint.ConstraintDeclaration;
+import org.apache.polygene.api.constraint.Constraints;
+import org.apache.polygene.library.constraints.HostPortConstraint;
+
+/**
+ * Marks a property as being a string, with a "host:port", where host is a valid hostname, IPv4 address or IPv6 address
+ * and port is in the range of 0 to 65535. The port is optional.
+ */
+@ConstraintDeclaration
+@Retention( RetentionPolicy.RUNTIME )
+@Constraints( HostPortConstraint.class )
+public @interface HostPort
+{
+}
diff --git a/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/annotation/HostPortList.java b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/annotation/HostPortList.java
new file mode 100644
index 0000000..2d0b34b
--- /dev/null
+++ b/libraries/constraints/src/main/java/org/apache/polygene/library/constraints/annotation/HostPortList.java
@@ -0,0 +1,37 @@
+/*
+ *  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.polygene.library.constraints.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import org.apache.polygene.api.constraint.ConstraintDeclaration;
+import org.apache.polygene.api.constraint.Constraints;
+import org.apache.polygene.library.constraints.HostPortListConstraint;
+
+/**
+ * Marks a property as being a string, with a comma or space separated list of "host:port", where host is a
+ * valid hostname, IPv4 address or IPv6 address and port is in the range of 0 to 65535
+ */
+@ConstraintDeclaration
+@Retention( RetentionPolicy.RUNTIME )
+@Constraints( HostPortListConstraint.class )
+public @interface HostPortList
+{
+}
diff --git a/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/ConstraintTest.java b/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/ConstraintTest.java
index 2c526b5..8b697b9 100644
--- a/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/ConstraintTest.java
+++ b/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/ConstraintTest.java
@@ -31,8 +31,7 @@
 
 import static org.junit.Assert.fail;
 
-public class ConstraintTest
-    extends AbstractPolygeneTest
+public class ConstraintTest extends AbstractPolygeneTest
 {
 
     @Override
diff --git a/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/HostPortConstraintTest.java b/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/HostPortConstraintTest.java
new file mode 100644
index 0000000..477f95d
--- /dev/null
+++ b/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/HostPortConstraintTest.java
@@ -0,0 +1,119 @@
+/*
+ *  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.polygene.library.constraints;
+
+import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.library.constraints.annotation.HostPort;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
+
+public class HostPortConstraintTest extends AbstractPolygeneTest
+{
+
+    @Test
+    public void givenValidHostWithoutPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "habba.zout.com" );
+    }
+
+    @Test
+    public void givenValidHostPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "habba.zout.com:1234" );
+    }
+
+    @Test
+    public void givenLocalHostWithoutPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "localhost" );
+    }
+
+    @Test
+    public void givenLocalHostWithSmallPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "localhost:9" );
+    }
+
+    @Test
+    public void givenLocalHostWithLargePortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "localhost:1234" );
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void givenInvalidHostNameWhenSettingPropertyExpectConstrainViolation()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1:2:3_i:1234" );
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void givenInvalidPortNumberWhenSettingPropertyExpectConstrainViolation()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1.2.3.4:123456" );
+    }
+
+    @Test
+    public void givenValidIp4NumberPortNumberWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1.2.3.4:1234" );
+    }
+
+    @Test
+    public void givenValidIp6NumberPortNumberWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "[::1]:1234" );
+    }
+
+    @Override
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        module.transients( SomeValue.class );
+    }
+
+    public interface SomeValue
+    {
+        @HostPort
+        @Optional
+        Property<String> hostPort();
+    }
+}
diff --git a/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/HostPortListConstraintTest.java b/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/HostPortListConstraintTest.java
new file mode 100644
index 0000000..430ffd7
--- /dev/null
+++ b/libraries/constraints/src/test/java/org/apache/polygene/library/constraints/HostPortListConstraintTest.java
@@ -0,0 +1,159 @@
+/*
+ *  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.polygene.library.constraints;
+
+import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.library.constraints.annotation.HostPortList;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
+
+public class HostPortListConstraintTest extends AbstractPolygeneTest
+{
+
+    @Test
+    public void givenValidHostWithoutPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "habba.zout.com" );
+    }
+
+    @Test
+    public void givenValidHostListWithoutPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "habba.zout.com, localhost google.com" );
+    }
+
+    @Test
+    public void givenValidHostListWithSomePortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "habba.zout.com, localhost:8080, google.com" );
+    }
+
+    @Test
+    public void givenValidHostPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "habba.zout.com:1234" );
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void givenInvalidHostNameWhenSettingPropertyExpectConstrainViolation()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1:2:3_i:1234" );
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void givenInvalidPortNumberWhenSettingPropertyExpectConstrainViolation()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1.2.3.4:123456" );
+    }
+
+    @Test
+    public void givenValidIp4NumberPortNumberWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1.2.3.4:1234" );
+    }
+
+    @Test
+    public void givenValidIp6NumberPortNumberWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "[::1]:1234" );
+    }
+
+    @Test
+    public void givenValidListOfOneHostPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "localhost:32775" );
+    }
+
+    @Test
+    public void givenValidListHostPortWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "habba.zout.com:1234,12.34.56.78:1234" );
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void givenInvalidListHostNameWhenSettingPropertyExpectConstrainViolation()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1.2.3.4:12,1:2:3_i:1234" );
+    }
+
+    @Test( expected = ConstraintViolationException.class )
+    public void givenInvalidListPortNumberWhenSettingPropertyExpectConstrainViolation()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1.2.3.4:1234 1.2.3.4:123456" );
+    }
+
+    @Test
+    public void givenValidListIp4NumberPortNumberWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "1.2.3.4:1234 google.com" );
+    }
+
+    @Test
+    public void givenValidListIp6NumberPortNumberWhenSettingPropertyExpectSuccess()
+        throws Exception
+    {
+        SomeValue someValue = transientBuilderFactory.newTransient( SomeValue.class );
+        someValue.hostPort().set( "[::1]:1234" );
+    }
+
+    @Override
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        module.transients( SomeValue.class );
+    }
+
+    public interface SomeValue
+    {
+        @HostPortList
+        @Optional
+        Property<String> hostPort();
+    }
+}
diff --git a/libraries/fileconfig/src/main/java/org/apache/polygene/library/fileconfig/FileConfigurationAssembler.java b/libraries/fileconfig/src/main/java/org/apache/polygene/library/fileconfig/FileConfigurationAssembler.java
index 36631c6..bdc8d89 100644
--- a/libraries/fileconfig/src/main/java/org/apache/polygene/library/fileconfig/FileConfigurationAssembler.java
+++ b/libraries/fileconfig/src/main/java/org/apache/polygene/library/fileconfig/FileConfigurationAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.fileconfig;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 
@@ -40,8 +39,8 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( FileConfigurationService.class ).visibleIn( visibility() );
         if( hasIdentity() )
         {
diff --git a/libraries/fileconfig/src/test/java/org/apache/polygene/library/fileconfig/FileConfigurationTest.java b/libraries/fileconfig/src/test/java/org/apache/polygene/library/fileconfig/FileConfigurationTest.java
index 6f34efb..4cf5ac2 100644
--- a/libraries/fileconfig/src/test/java/org/apache/polygene/library/fileconfig/FileConfigurationTest.java
+++ b/libraries/fileconfig/src/test/java/org/apache/polygene/library/fileconfig/FileConfigurationTest.java
@@ -21,12 +21,10 @@
 
 import java.io.File;
 import java.io.IOException;
+import org.apache.polygene.api.activation.ActivationException;
+import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Rule;
 import org.junit.Test;
-import org.apache.polygene.api.activation.ActivationException;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.rules.TemporaryFolder;
 
 import static org.junit.Assert.assertEquals;
@@ -39,19 +37,15 @@
 
     @Test
     public void testFileConfiguration()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> {
                 // START SNIPPET: simple
                 new FileConfigurationAssembler().assemble( module );
                 // END SNIPPET: simple
             }
-        };
+        );
 
         FileConfiguration config = assembler.module().findService( FileConfiguration.class ).get();
         assertNotNull( config.configurationDirectory() );
@@ -69,7 +63,7 @@
 
     @Test
     public void testFileConfigurationOverride()
-        throws IOException, ActivationException, AssemblyException
+        throws IOException, ActivationException
     {
         File testFile = tmpDir.getRoot();
         final File confDir = testFile;
@@ -77,12 +71,8 @@
         final File tempDir = testFile;
         final File cacheDir = testFile;
         final File logDir = testFile;
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> {
                 // START SNIPPET: override
                 FileConfigurationOverride override = new FileConfigurationOverride()
                     .withConfiguration( confDir )
@@ -93,7 +83,7 @@
                 new FileConfigurationAssembler().withOverride( override ).assemble( module );
                 // END SNIPPET: override
             }
-        };
+        );
 
         FileConfiguration config = assembler.module().findService( FileConfiguration.class ).get();
 
@@ -106,22 +96,18 @@
 
     @Test
     public void testFileConfigurationOverrideConvention()
-        throws IOException, ActivationException, AssemblyException
+        throws IOException, ActivationException
     {
         File rootDir = tmpDir.getRoot();
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> {
                 // START SNIPPET: override-convention
                 new FileConfigurationAssembler()
                     .withOverride( new FileConfigurationOverride().withConventionalRoot( rootDir ) )
                     .assemble( module );
                 // END SNIPPET: override-convention
             }
-        };
+        );
 
         FileConfiguration config = assembler.module().findService( FileConfiguration.class ).get();
 
diff --git a/libraries/http/build.gradle b/libraries/http/build.gradle
index 6002d53..651249b 100644
--- a/libraries/http/build.gradle
+++ b/libraries/http/build.gradle
@@ -76,7 +76,7 @@
     {
       enabled = false
     }
-    testClassesDir = sourceSets.vhostTest.output.classesDir
+    testClassesDirs = sourceSets.vhostTest.output.classesDirs
     classpath = sourceSets.vhostTest.runtimeClasspath
     systemProperties 'networkaddress.cache.ttl': '0'
     systemProperties 'sun.net.spi.nameservice.provider.1': 'dns,LocalManagedDns'
diff --git a/libraries/http/src/main/java/org/apache/polygene/library/http/JettyServiceAssembler.java b/libraries/http/src/main/java/org/apache/polygene/library/http/JettyServiceAssembler.java
index 8a7b765..d7ebf49 100644
--- a/libraries/http/src/main/java/org/apache/polygene/library/http/JettyServiceAssembler.java
+++ b/libraries/http/src/main/java/org/apache/polygene/library/http/JettyServiceAssembler.java
@@ -19,14 +19,13 @@
  */
 package org.apache.polygene.library.http;
 
-import org.eclipse.jetty.server.Server;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.service.importer.InstanceImporter;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ImportedServiceDeclaration;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
+import org.eclipse.jetty.server.Server;
 
 public class JettyServiceAssembler
     extends Assemblers.VisibilityIdentityConfig<JettyServiceAssembler>
@@ -54,8 +53,8 @@
 
     @Override
     public final void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( httpService() ).
             visibleIn( visibility() ).
             instantiateOnStartup();
diff --git a/libraries/http/src/main/java/org/apache/polygene/library/http/SecureJettyConfiguration.java b/libraries/http/src/main/java/org/apache/polygene/library/http/SecureJettyConfiguration.java
index a75e296..64192a3 100644
--- a/libraries/http/src/main/java/org/apache/polygene/library/http/SecureJettyConfiguration.java
+++ b/libraries/http/src/main/java/org/apache/polygene/library/http/SecureJettyConfiguration.java
@@ -34,7 +34,7 @@
  */
 // START SNIPPET: configssl
 public interface SecureJettyConfiguration
-        extends JettyConfiguration
+    extends JettyConfiguration
 {
 
     /**
diff --git a/libraries/http/src/vhost-test/java/org/apache/polygene/library/http/VirtualHostJettyServiceTest.java b/libraries/http/src/vhost-test/java/org/apache/polygene/library/http/VirtualHostJettyServiceTest.java
index 88afe0e..8e363c1 100644
--- a/libraries/http/src/vhost-test/java/org/apache/polygene/library/http/VirtualHostJettyServiceTest.java
+++ b/libraries/http/src/vhost-test/java/org/apache/polygene/library/http/VirtualHostJettyServiceTest.java
@@ -22,7 +22,6 @@
 import java.io.IOException;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.http.dns.LocalManagedDns;
 import org.apache.polygene.test.EntityTestAssembler;
@@ -61,7 +60,6 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         ModuleAssembly configModule = module;
         new EntityTestAssembler().assemble( configModule );
diff --git a/libraries/jmx/src/docs/jmx.txt b/libraries/jmx/src/docs/jmx.txt
index 7817d72..4e4af6a 100644
--- a/libraries/jmx/src/docs/jmx.txt
+++ b/libraries/jmx/src/docs/jmx.txt
@@ -35,7 +35,7 @@
 Services configuration is editable through their corresponding JMX beans.
 You can also restart your services so the new configuration is picked up.
 
-image:library-jmx.png[]
+image:library-jmx.png[width="800px"]
 
 
 
diff --git a/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/ConfigurationManagerService.java b/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/ConfigurationManagerService.java
index 50485d1..ed5964d 100644
--- a/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/ConfigurationManagerService.java
+++ b/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/ConfigurationManagerService.java
@@ -243,7 +243,7 @@
             EditableConfiguration( MBeanInfo info, String identity, Map<String, AccessibleObject> propertyNames )
             {
                 this.info = info;
-                this.identity = new StringIdentity(identity);
+                this.identity = StringIdentity.identityOf( identity );
                 this.propertyNames = propertyNames;
             }
 
diff --git a/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/JMXAssembler.java b/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/JMXAssembler.java
index 616c68e..46ca053 100644
--- a/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/JMXAssembler.java
+++ b/libraries/jmx/src/main/java/org/apache/polygene/library/jmx/JMXAssembler.java
@@ -22,7 +22,6 @@
 
 import javax.management.MBeanServer;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
 /**
@@ -33,7 +32,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.importedServices( MBeanServer.class ).importedBy( MBeanServerImporter.class );
         module.services( ApplicationManagerService.class ).instantiateOnStartup();
diff --git a/libraries/jmx/src/test/java/org/apache/polygene/library/jmx/JMXTest.java b/libraries/jmx/src/test/java/org/apache/polygene/library/jmx/JMXTest.java
index 92a79f1..4db31b2 100644
--- a/libraries/jmx/src/test/java/org/apache/polygene/library/jmx/JMXTest.java
+++ b/libraries/jmx/src/test/java/org/apache/polygene/library/jmx/JMXTest.java
@@ -34,7 +34,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.util.JmxFixture;
@@ -50,7 +49,6 @@
     public void assemble(ModuleAssembly module) throws AssemblyException
     {
         new EntityTestAssembler().assemble( module );
-        new DefaultUnitOfWorkAssembler().assemble( module );
 
         module.services( TestService.class, TestService2.class, TestService3.class ).instantiateOnStartup();
         module.entities( TestConfiguration.class );
@@ -73,16 +71,9 @@
     public static void main(String[] args )
         throws InterruptedException, ActivationException, AssemblyException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                    throws AssemblyException
-            {
-                new JMXTest().assemble(module);
-            }
-
-        };
+        SingletonAssembler assembler = new SingletonAssembler(
+            moduleAssembly -> new JMXTest().assemble(moduleAssembly)
+        );
         // This allows user to connect using VisualVM/JConsole
         while ( true ) {
             Thread.sleep( 10_000 );
diff --git a/libraries/logging/src/main/java/org/apache/polygene/library/logging/log/assemblies/LoggingAssembler.java b/libraries/logging/src/main/java/org/apache/polygene/library/logging/log/assemblies/LoggingAssembler.java
index d9aa75f..937cc15 100644
--- a/libraries/logging/src/main/java/org/apache/polygene/library/logging/log/assemblies/LoggingAssembler.java
+++ b/libraries/logging/src/main/java/org/apache/polygene/library/logging/log/assemblies/LoggingAssembler.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.library.logging.log.assemblies;
 
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.logging.log.service.LoggingServiceComposite;
 
@@ -30,7 +29,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.services( LoggingServiceComposite.class );
     }
diff --git a/libraries/logging/src/main/java/org/apache/polygene/library/logging/trace/assemblies/TracingAssembler.java b/libraries/logging/src/main/java/org/apache/polygene/library/logging/trace/assemblies/TracingAssembler.java
index fe4542c..7dda7cc 100644
--- a/libraries/logging/src/main/java/org/apache/polygene/library/logging/trace/assemblies/TracingAssembler.java
+++ b/libraries/logging/src/main/java/org/apache/polygene/library/logging/trace/assemblies/TracingAssembler.java
@@ -22,7 +22,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.logging.trace.service.StandardTraceServiceComposite;
 import org.apache.polygene.library.logging.trace.service.TraceServiceConfiguration;
@@ -32,7 +31,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.services( StandardTraceServiceComposite.class ).visibleIn( Visibility.application );
         module.entities( TraceServiceConfiguration.class );
diff --git a/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/Model2XMLTest.java b/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/Model2XMLTest.java
index 4b5b542..865219a 100644
--- a/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/Model2XMLTest.java
+++ b/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/Model2XMLTest.java
@@ -19,19 +19,22 @@
  */
 package org.apache.polygene.library.rdf;
 
-import org.junit.Test;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.composite.TransientComposite;
-import org.apache.polygene.api.structure.ApplicationDescriptor;
-import org.apache.polygene.bootstrap.*;
-import org.apache.polygene.library.rdf.model.Model2XML;
-import org.w3c.dom.Document;
-
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.composite.TransientComposite;
+import org.apache.polygene.api.structure.ApplicationDescriptor;
+import org.apache.polygene.bootstrap.ApplicationAssembly;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.Energy4Java;
+import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.library.rdf.model.Model2XML;
+import org.junit.Test;
+import org.w3c.dom.Document;
 
 /**
  * TODO
@@ -41,31 +44,26 @@
     @Test
     public void testModel2XML() throws AssemblyException, TransformerException
     {
-        Energy4Java is = new Energy4Java(  );
-        ApplicationDescriptor model = is.newApplicationModel( new ApplicationAssembler()
-        {
-            @Override
-            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory ) throws AssemblyException
-            {
-                ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
+        Energy4Java polygene = new Energy4Java(  );
+        ApplicationDescriptor model = polygene.newApplicationModel( factory -> {
+            ApplicationAssembly assembly = factory.newApplicationAssembly();
 
-                assembly.setName( "Test application" );
+            assembly.setName( "Test application" );
 
-                LayerAssembly webLayer = assembly.layer( "Web" );
-                LayerAssembly domainLayer = assembly.layer( "Domain" );
-                LayerAssembly infrastructureLayer = assembly.layer( "Infrastructure" );
+            LayerAssembly webLayer = assembly.layer( "Web" );
+            LayerAssembly domainLayer = assembly.layer( "Domain" );
+            LayerAssembly infrastructureLayer = assembly.layer( "Infrastructure" );
 
-                webLayer.uses( domainLayer, infrastructureLayer );
-                domainLayer.uses( infrastructureLayer );
+            webLayer.uses( domainLayer, infrastructureLayer );
+            domainLayer.uses( infrastructureLayer );
 
-                ModuleAssembly rest = webLayer.module( "REST" );
-                rest.transients( TestTransient.class ).visibleIn( Visibility.layer );
-                
-                domainLayer.module( "Domain" );
-                infrastructureLayer.module( "Database" );
+            ModuleAssembly rest = webLayer.module( "REST" );
+            rest.transients( TestTransient.class ).visibleIn( Visibility.layer );
 
-                return assembly;
-            }
+            domainLayer.module( "Domain" );
+            infrastructureLayer.module( "Database" );
+
+            return assembly;
         } );
 
         Document document = new Model2XML().apply( model );
diff --git a/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntitySerializerTest.java b/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntitySerializerTest.java
index fb5b0c3..64512cb 100644
--- a/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntitySerializerTest.java
+++ b/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntitySerializerTest.java
@@ -109,14 +109,14 @@
             valueBuilder.prototype().test3().set( valueBuilder2.newInstance() );
             TestValue testValue = valueBuilder.newInstance();
 
-            EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class, new StringIdentity( "test1" ) );
+            EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class, StringIdentity.identityOf( "test1" ) );
             TestEntity rickardTemplate = builder.instance();
             rickardTemplate.name().set( "Rickard" );
             rickardTemplate.title().set( "Mr" );
             rickardTemplate.value().set( testValue );
             TestEntity testEntity = builder.newInstance();
 
-            EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder( TestEntity.class, new StringIdentity( "test2" ) );
+            EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder( TestEntity.class, StringIdentity.identityOf( "test2" ) );
             TestEntity niclasTemplate = builder2.instance();
             niclasTemplate.name().set( "Niclas" );
             niclasTemplate.title().set( "Mr" );
diff --git a/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntityTypeSerializerTest.java b/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntityTypeSerializerTest.java
index 6c1d279..8e8d8d7 100644
--- a/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntityTypeSerializerTest.java
+++ b/libraries/rdf/src/test/java/org/apache/polygene/library/rdf/entity/EntityTypeSerializerTest.java
@@ -20,14 +20,10 @@
 
 package org.apache.polygene.library.rdf.entity;
 
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.openrdf.model.Statement;
-import org.openrdf.rio.RDFHandlerException;
+import java.io.PrintWriter;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityDescriptor;
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
@@ -40,9 +36,12 @@
 import org.apache.polygene.library.rdf.Rdfs;
 import org.apache.polygene.library.rdf.serializer.RdfXmlSerializer;
 import org.apache.polygene.spi.entitystore.EntityStore;
-
-import java.io.PrintWriter;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.Before;
+import org.junit.Test;
+import org.openrdf.model.Statement;
+import org.openrdf.rio.RDFHandlerException;
 
 
 /**
@@ -96,14 +95,14 @@
             valueBuilder.prototype().test3().set( vb2.newInstance() );
             TestValue testValue = valueBuilder.newInstance();
 
-            EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder(TestEntity.class, new StringIdentity( "test1") );
+            EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder(TestEntity.class, StringIdentity.identityOf( "test1" ) );
             TestEntity rickardTemplate = builder.instance();
             rickardTemplate.name().set( "Rickard" );
             rickardTemplate.title().set( "Mr" );
             rickardTemplate.value().set( testValue );
             TestEntity testEntity = builder.newInstance();
 
-            EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder(TestEntity.class, new StringIdentity( "test2") );
+            EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder(TestEntity.class, StringIdentity.identityOf( "test2" ) );
             TestEntity niclasTemplate = builder2.instance();
             niclasTemplate.name().set( "Niclas" );
             niclasTemplate.title().set( "Mr" );
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ClientAssembler.java b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ClientAssembler.java
index 91cb279..d0d4120 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ClientAssembler.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ClientAssembler.java
@@ -22,7 +22,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.rest.client.api.ContextResourceClient;
 import org.apache.polygene.library.rest.client.api.ContextResourceClientFactory;
@@ -39,7 +38,7 @@
    implements Assembler
 {
     @Override
-   public void assemble( ModuleAssembly module ) throws AssemblyException
+   public void assemble( ModuleAssembly module )
    {
       module.objects( ContextResourceClientFactory.class, ContextResourceClient.class ).visibleIn( Visibility.application );
 
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java
index e979d43..80db1bf 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java
@@ -128,6 +128,8 @@
 
         module.objects( DescribableContext.class );
         module.transients( TestComposite.class );
+
+        module.defaultServices();
     }
 
     @Override
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
index 9d66d36..f2653ab 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
@@ -102,6 +102,8 @@
         module.values( BuildSpec.class, BuildResult.class, ServerStatus.class, TagBuildCommand.class, RunBuildCommand.class );
 
         module.objects( RootRestlet.class, RootResource.class, RootContext.class );
+
+        module.defaultServices();
     }
 
     @Override
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
index bb241df..a1fb7a0 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
@@ -33,15 +33,12 @@
 import org.apache.polygene.library.rest.client.api.ContextResourceClientFactory;
 import org.apache.polygene.library.rest.client.api.ErrorHandler;
 import org.apache.polygene.library.rest.client.api.HandlerCommand;
-import org.apache.polygene.library.rest.client.spi.ResponseHandler;
-import org.apache.polygene.library.rest.client.spi.ResponseReader;
 import org.apache.polygene.library.rest.client.spi.ResultHandler;
 import org.apache.polygene.library.rest.common.ValueAssembler;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.restlet.Client;
-import org.restlet.Response;
 import org.restlet.data.Protocol;
 import org.restlet.data.Reference;
 import org.restlet.resource.ResourceException;
@@ -67,6 +64,7 @@
         assumeConnectivity( "github.com", 443 );
     }
 
+    @SuppressWarnings( "FieldCanBeLocal" )
     private ContextResourceClient crc;
 
     @Override
@@ -76,48 +74,42 @@
         // General setup of client
         new ClientAssembler().assemble( module );
         new ValueAssembler().assemble( module );
+
+        module.defaultServices();
     }
 
     @Test
     public void testReadRssFeed()
     {
         Client client = new Client( Protocol.HTTPS );
-        Reference ref = new Reference( "https://github.com/Qi4j/qi4j-sdk/commits/develop.atom" );
+        Reference ref = new Reference( "https://github.com/Apache/polygene-java/commits/develop.atom" );
         ContextResourceClientFactory contextResourceClientFactory = objectFactory.newObject( ContextResourceClientFactory.class, client );
 
-        contextResourceClientFactory.registerResponseReader( new ResponseReader()
-        {
-            @Override
-            public Object readResponse( Response response, Class<?> resultType )
-                throws ResourceException
+        contextResourceClientFactory.registerResponseReader( ( response, resultType ) -> {
+            if( resultType.equals( Document.class ) )
             {
-                if( resultType.equals( Document.class ) )
+                try
                 {
-                    try
-                    {
-                        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
-                        documentBuilderFactory.setNamespaceAware( false );
-                        return documentBuilderFactory.newDocumentBuilder().parse( response.getEntity().getStream() );
-                    }
-                    catch( Exception e )
-                    {
-                        throw new ResourceException( e );
-                    }
+                    DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+                    documentBuilderFactory.setNamespaceAware( false );
+                    return documentBuilderFactory.newDocumentBuilder().parse( response.getEntity().getStream() );
                 }
-
-                return null;
+                catch( Exception e )
+                {
+                    throw new ResourceException( e );
+                }
             }
+
+            return null;
         } );
 
-        contextResourceClientFactory.setErrorHandler( new ErrorHandler().onError( ErrorHandler.RECOVERABLE_ERROR, new ResponseHandler()
-        {
-            @Override
-            public HandlerCommand handleResponse( Response response, ContextResourceClient client )
-            {
-                System.out.println( ">> REFRESH on recoverable error: " + response.getStatus() );
-                return refresh();
-            }
-        } ) );
+        contextResourceClientFactory.setErrorHandler(
+            new ErrorHandler()
+                .onError( ErrorHandler.RECOVERABLE_ERROR,
+                          ( response, client1 ) -> {
+                              System.out.println( ">> REFRESH on recoverable error: " + response.getStatus() );
+                              return refresh();
+                          } ) );
 
         crc = contextResourceClientFactory.newClient( ref );
 
diff --git a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/ValueAssembler.java b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/ValueAssembler.java
index fa897e2..456d965 100644
--- a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/ValueAssembler.java
+++ b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/ValueAssembler.java
@@ -23,7 +23,6 @@
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
 import static org.apache.polygene.api.util.Classes.isAssignableFrom;
@@ -37,7 +36,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         findClasses( Resource.class ).filter( isAssignableFrom( ValueComposite.class ) )
                                      .forEach( resourceType -> module.values( resourceType )
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java
index 4b701fb..2fb2fe1 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java
@@ -34,7 +34,7 @@
 import org.apache.polygene.api.association.ManyAssociation;
 import org.apache.polygene.api.association.NamedAssociation;
 import org.apache.polygene.api.common.Optional;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.constraint.Name;
 import org.apache.polygene.api.entity.EntityComposite;
@@ -808,7 +808,7 @@
                 // CVE are considered client faults
                 String messages = "";
                 Locale locale = ObjectSelection.type( Locale.class );
-                for( ConstraintViolation constraintViolation : e.constraintViolations() )
+                for( ValueConstraintViolation constraintViolation : e.constraintViolations() )
                 {
                     if( !messages.isEmpty() )
                     {
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/assembler/RestServerAssembler.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/assembler/RestServerAssembler.java
index 4c12c3c..37a67bc 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/assembler/RestServerAssembler.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/assembler/RestServerAssembler.java
@@ -26,7 +26,6 @@
 import java.util.List;
 import java.util.Properties;
 import java.util.function.Predicate;
-import org.apache.velocity.app.VelocityEngine;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.service.importer.NewObjectImporter;
 import org.apache.polygene.bootstrap.Assembler;
@@ -41,6 +40,7 @@
 import org.apache.polygene.library.rest.server.restlet.responsewriter.AbstractResponseWriter;
 import org.apache.polygene.library.rest.server.restlet.responsewriter.DefaultResponseWriter;
 import org.apache.polygene.library.rest.server.spi.ResponseWriter;
+import org.apache.velocity.app.VelocityEngine;
 import org.restlet.service.MetadataService;
 
 import static java.util.stream.Collectors.toList;
@@ -57,7 +57,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         Properties props = new Properties();
         try
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ConstraintViolationMessages.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ConstraintViolationMessages.java
index 17b43d5..253284d 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ConstraintViolationMessages.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ConstraintViolationMessages.java
@@ -24,14 +24,14 @@
 import java.util.ResourceBundle;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 
 /**
  * TODO
  */
 public class ConstraintViolationMessages
 {
-    public String getMessage( ConstraintViolation violation, Locale locale )
+    public String getMessage( ValueConstraintViolation violation, Locale locale )
         throws IllegalArgumentException
     {
         try
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
index b04edef..03d70c3 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
@@ -32,7 +32,7 @@
 import org.apache.polygene.api.constraint.ConstraintDeclaration;
 import org.apache.polygene.api.constraint.Constraints;
 import org.apache.polygene.api.injection.scope.Structure;
-import org.apache.polygene.api.object.NoSuchObjectException;
+import org.apache.polygene.api.object.NoSuchObjectTypeException;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.library.rest.server.api.ObjectSelection;
 import org.apache.polygene.library.rest.server.api.constraint.InteractionConstraint;
@@ -150,7 +150,7 @@
                     {
                         constraint = module.newObject( constraintClass );
                     }
-                    catch( NoSuchObjectException e )
+                    catch( NoSuchObjectTypeException e )
                     {
                         constraint = constraintClass.newInstance();
                     }
@@ -214,7 +214,7 @@
                     {
                         constraint = module.newObject( constraintClass );
                     }
-                    catch( NoSuchObjectException e )
+                    catch( NoSuchObjectTypeException e )
                     {
                         constraint = constraintClass.newInstance();
                     }
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
index db767ff..33b69b8 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
@@ -51,7 +51,7 @@
     public void init( @Service Iterable<ServiceReference<RequestReader>> requestReaderReferences )
     {
         Logger logger = LoggerFactory.getLogger( getClass() );
-        Identity requestreaderdelegator = new StringIdentity("requestreaderdelegator");
+        Identity requestreaderdelegator = StringIdentity.identityOf( "requestreaderdelegator" );
 
         // Add custom readers first
         for( ServiceReference<RequestReader> requestReader : requestReaderReferences )
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
index 18fd7fa..29da261 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
@@ -48,7 +48,7 @@
     public void init( @Service Iterable<ServiceReference<ResponseWriter>> resultWriters )
     {
         Logger logger = LoggerFactory.getLogger( getClass() );
-        Identity responsewriterdelegator = new StringIdentity( "responsewriterdelegator" );
+        Identity responsewriterdelegator = StringIdentity.identityOf( "responsewriterdelegator" );
 
         // Add custom writers first
         for( ServiceReference<ResponseWriter> resultWriter : resultWriters )
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java
index b968da4..60f26c8 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java
@@ -251,7 +251,7 @@
                         entityAsForm = new Form();
                     }
 
-                    Identity entityIdentity = new StringIdentity( getValue( "entity", queryAsForm, entityAsForm ) );
+                    Identity entityIdentity = StringIdentity.identityOf( getValue( "entity", queryAsForm, entityAsForm ) );
                     args[0] = uowf.currentUnitOfWork().get( method.getParameterTypes()[0], entityIdentity );
 
                     return args;
@@ -480,7 +480,7 @@
             }
             else if( parameterType.isInterface() )
             {
-                arg = uowf.currentUnitOfWork().get( parameterType, new StringIdentity( argString ) );
+                arg = uowf.currentUnitOfWork().get( parameterType, StringIdentity.identityOf( argString ) );
             }
             else
             {
diff --git a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java
index 0b07b3e..4bce3cd 100644
--- a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java
+++ b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java
@@ -83,7 +83,6 @@
     protected Representation get( Variant variant )
         throws ResourceException
     {
-        System.out.println( "VARIANT: " + variant.getMediaType() );
         // Generate the right representation according to its media type.
         if( MediaType.APPLICATION_JSON.equals( variant.getMediaType() ) )
         {
diff --git a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java
index 99a538c..17d4ae1 100644
--- a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java
+++ b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java
@@ -106,7 +106,7 @@
     {
         // /entity/{reference}
         Map<String, Object> attributes = getRequest().getAttributes();
-        identity = new StringIdentity( (String) attributes.get( "reference" ) );
+        identity = StringIdentity.identityOf( (String) attributes.get( "reference" ) );
     }
 
     @Override
@@ -474,7 +474,6 @@
                             try
                             {
                                 unitOfWork.entityStateOf( module, reference );
-
                                 namedAssociation.remove( name );
                                 namedAssociation.put( name, reference );
 
diff --git a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/IndexResource.java b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/IndexResource.java
index 971b405..41798c0 100644
--- a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/IndexResource.java
+++ b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/IndexResource.java
@@ -20,10 +20,14 @@
 
 package org.apache.polygene.library.rest.admin;
 
-import java.io.*;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.PrintWriter;
 import java.util.Arrays;
 import org.apache.polygene.api.injection.scope.Service;
-import org.apache.polygene.index.rdf.indexing.RdfExporter;
+import org.apache.polygene.index.rdf.indexing.RdfIndexExporter;
 import org.restlet.data.MediaType;
 import org.restlet.representation.OutputRepresentation;
 import org.restlet.representation.Representation;
@@ -38,7 +42,7 @@
     extends ServerResource
 {
     @Service
-    private RdfExporter exporter;
+    private RdfIndexExporter exporter;
 
     public IndexResource()
     {
diff --git a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/RestAssembler.java b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/RestAssembler.java
index 0e28856..0bd9782 100644
--- a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/RestAssembler.java
+++ b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/RestAssembler.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.library.rest.admin;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
 public class RestAssembler
@@ -29,8 +28,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.objects( RestApplication.class ).visibleIn( visibility() );
         module.objects( PolygeneFinder.class,
                         EntitiesResource.class,
diff --git a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DomainAssembler.java b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DomainAssembler.java
index 33090b2..b385b68 100644
--- a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DomainAssembler.java
+++ b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DomainAssembler.java
@@ -24,7 +24,7 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.index.rdf.RdfIndexingEngineService;
+import org.apache.polygene.index.rdf.RdfIndexingService;
 import org.apache.polygene.library.rdf.repository.MemoryRepositoryService;
 
 import static org.apache.polygene.api.common.Visibility.application;
@@ -41,7 +41,7 @@
     {
         module.services(
             MemoryEntityStoreService.class,
-            RdfIndexingEngineService.class
+            RdfIndexingService.class
         ).visibleIn( application );
         module.services( MemoryRepositoryService.class ).identifiedBy( "rdf-indexing" ).visibleIn( layer );
 
diff --git a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
index 346ebd6..1d5a2ad 100644
--- a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
+++ b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
@@ -43,7 +43,7 @@
     void insertInitialData()
             throws Exception;
 
-    static class Activator
+    class Activator
             extends ActivatorAdapter<ServiceReference<DummyDataService>>
     {
 
@@ -77,13 +77,13 @@
                     valueBuilder.prototype().string().set( "Foo bar value" );
                     valueBuilder.prototype().map().set( new HashMap() );
 
-                    EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class, new StringIdentity( "test1" ) );
+                    EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class, StringIdentity.identityOf( "test1" ) );
                     builder.instance().name().set( "Foo bar" );
                     builder.instance().age().set( 42 );
                     builder.instance().value().set( valueBuilder.newInstance() );
                     TestEntity testEntity = builder.newInstance();
 
-                    EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder( TestEntity.class, new StringIdentity( "test2" ) );
+                    EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder( TestEntity.class, StringIdentity.identityOf( "test2" ) );
                     builder2.instance().name().set( "Xyzzy" );
                     builder2.instance().age().set( 12 );
                     builder2.instance().association().set( testEntity );
@@ -98,7 +98,7 @@
                 }
 
                 {
-                    EntityBuilder<TestEntity2> builder = unitOfWork.newEntityBuilder( TestEntity2.class, new StringIdentity( "test3" ) );
+                    EntityBuilder<TestEntity2> builder = unitOfWork.newEntityBuilder( TestEntity2.class, StringIdentity.identityOf( "test3" ) );
                     builder.instance().name().set( "Test3" );
                     builder.newInstance();
                 }
diff --git a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
index f09e785..db6db80 100644
--- a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
+++ b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
@@ -51,7 +51,6 @@
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfMemoryStoreAssembler;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
@@ -80,8 +79,7 @@
                         {
                             RestTest.this,
                             new RestAssembler(),
-                            new RdfMemoryStoreAssembler(),
-                            new DefaultUnitOfWorkAssembler()
+                            new RdfMemoryStoreAssembler()
                         }
                     }
                 } )
@@ -113,13 +111,13 @@
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
-            EntityBuilder<PersonEntity> builder1 = uow.newEntityBuilder( PersonEntity.class, new StringIdentity( "P2" ) );
+            EntityBuilder<PersonEntity> builder1 = uow.newEntityBuilder( PersonEntity.class, StringIdentity.identityOf( "P2" ) );
             PersonEntity maryDoe = builder1.instance();
             maryDoe.firstname().set( "Mary" );
             maryDoe.lastname().set( "Doe" );
             maryDoe = builder1.newInstance();
 
-            EntityBuilder<PersonEntity> builder2 = uow.newEntityBuilder( PersonEntity.class, new StringIdentity( "P1" ) );
+            EntityBuilder<PersonEntity> builder2 = uow.newEntityBuilder( PersonEntity.class, StringIdentity.identityOf( "P1" ) );
             PersonEntity joeDoe = builder2.instance();
             joeDoe.firstname().set( "Joe" );
             joeDoe.lastname().set( "Doe" );
@@ -164,7 +162,7 @@
         UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         try
         {
-            PersonEntity entity = work.get( PersonEntity.class, new StringIdentity( "P1" ) );
+            PersonEntity entity = work.get( PersonEntity.class, StringIdentity.identityOf( "P1" ) );
             assertEquals( "FirstName not changed.", "Jack", entity.firstname().get() );
             assertEquals( "LastName not changed.", "Doe", entity.lastname().get() );
             work.complete();
@@ -187,7 +185,7 @@
             PersonEntity entity = null;
             try
             {
-                entity = work.get( PersonEntity.class, new StringIdentity( "P1" ) );
+                entity = work.get( PersonEntity.class, StringIdentity.identityOf( "P1" ) );
             }
             catch( NoSuchEntityException expected )
             {
diff --git a/libraries/restlet/build.gradle b/libraries/restlet/build.gradle
index 95ab44b..7a8705c 100644
--- a/libraries/restlet/build.gradle
+++ b/libraries/restlet/build.gradle
@@ -30,8 +30,6 @@
 
   api polygene.core.bootstrap
 
-  implementation polygene.extension( 'entitystore-file' )
-  implementation polygene.extension( 'indexing-rdf' )
   implementation libraries.restlet
 
   runtimeOnly polygene.core.runtime
@@ -39,7 +37,8 @@
   testImplementation polygene.core.testsupport
   testImplementation polygene.library( 'http' )
   testImplementation libraries.http_client
-
+  testImplementation polygene.extension( 'entitystore-file' )
+  testImplementation polygene.extension( 'indexing-rdf' )
   testRuntimeOnly libraries.logback
 }
 
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneEntityRestlet.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneEntityRestlet.java
index b76bfd3..da27d9e 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneEntityRestlet.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneEntityRestlet.java
@@ -152,7 +152,6 @@
                              }
                              Representation representation = converter.toRepresentation( result, new Variant(), null );
                              response.setEntity( representation );
-                             response.setEntity( representation );
                              response.setStatus( Status.SUCCESS_OK );
                          }
                          else
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneRestApplication.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneRestApplication.java
index 4df326f..0bfd614 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneRestApplication.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneRestApplication.java
@@ -19,17 +19,11 @@
  */
 package org.apache.polygene.library.restlet;
 
-import java.util.logging.Level;
-import org.apache.polygene.api.composite.TransientBuilderFactory;
+import java.io.PrintStream;
 import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.object.ObjectFactory;
-import org.apache.polygene.api.service.ServiceFinder;
 import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.api.value.ValueBuilderFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
 import org.apache.polygene.library.restlet.crud.EntityListResource;
 import org.apache.polygene.library.restlet.crud.EntityResource;
 import org.apache.polygene.library.restlet.resource.CreationResource;
@@ -39,6 +33,7 @@
 import org.apache.polygene.library.restlet.resource.ResourceFactory;
 import org.apache.polygene.library.restlet.resource.ServerResource;
 import org.apache.polygene.library.restlet.serialization.PolygeneConverter;
+import org.restlet.Component;
 import org.restlet.Context;
 import org.restlet.Restlet;
 import org.restlet.data.ChallengeScheme;
@@ -55,65 +50,41 @@
 /**
  * This class is generic enough to be promoted to Polygene's Restlet Library
  */
+@SuppressWarnings( { "WeakerAccess", "unused" } )
 public abstract class PolygeneRestApplication extends org.restlet.Application
 {
-    protected org.apache.polygene.api.structure.Application polygeneApplication;
-    protected ServiceFinder serviceFinder;
+    @Structure
+    protected Application polygeneApplication;
+
+    @Structure
     protected ObjectFactory objectFactory;
-    protected TransientBuilderFactory transientBuilderFactory;
-    protected UnitOfWorkFactory unitOfWorkFactory;
-    protected ValueBuilderFactory valueBuilderFactory;
 
-    private Router router;
+    protected Router router;
+    protected String basePath;
 
-    public PolygeneRestApplication( Context context )
-        throws AssemblyException
+    protected PolygeneRestApplication( String basePath, Context context )
     {
         super( context );
+        this.basePath = basePath;
     }
 
-    protected void printRoutes()
+    protected void printRoutes( PrintStream out )
     {
-        router.getRoutes().forEach(
-            route -> System.out.println( route.toString() ) );
+        router.getRoutes()
+              .stream()
+              .map( Object::toString )
+              .forEach( out::println );
     }
 
-    protected abstract LayeredApplicationAssembler createApplicationAssembler( String mode )
-        throws AssemblyException;
-
     @Override
     public synchronized void start()
         throws Exception
     {
+        setName( polygeneApplication.name() );
         Series<Parameter> parameters = getContext().getParameters();
         String mode = parameters.getFirstValue( "org.apache.polygene.runtime.mode" );
-        createApplication( mode );
-        polygeneApplication.activate();
-        Module module = polygeneApplication.findModule( getConnectivityLayer(), getConnectivityModule() );
-        serviceFinder = module;
-        objectFactory = module;
-        transientBuilderFactory = module;
-        unitOfWorkFactory = module.unitOfWorkFactory();
-        valueBuilderFactory = module;
         super.start();
-    }
-
-    private void createApplication( String mode )
-    {
-        try
-        {
-            LayeredApplicationAssembler assembler = createApplicationAssembler(mode);
-            assembler.initialize();
-            polygeneApplication = assembler.application();
-            setName( polygeneApplication.name() );
-        }
-        catch( Throwable e )
-        {
-            e.printStackTrace();
-            getLogger().log( Level.SEVERE, "Unable to start Polygene application.", e );
-            throw new InternalError( "Unable to start Polygene application.", e );
-        }
-        getLogger().info( "RestApplication successfully created." );
+        getLogger().info( "RestApplication successfully started." );
     }
 
     @Override
@@ -121,7 +92,7 @@
         throws Exception
     {
         super.stop();
-        polygeneApplication.passivate();
+        getLogger().info( "RestApplication successfully stopped." );
     }
 
     @Override
@@ -137,25 +108,34 @@
         router = new Router( context );
 
         addRoutes( router );
-        router.attach( "/", newPolygeneRestlet( EntryPointResource.class, EntryPoint.class ) );
-
-        ChallengeAuthenticator guard = new ChallengeAuthenticator( context, ChallengeScheme.HTTP_BASIC, "Storm Clouds" );
+        router.attach( basePath, newPolygeneRestlet( EntryPointResource.class, EntryPoint.class ) );
 
         Verifier verifier = createVerifier();
-        if( verifier != null )
-        {
-            guard.setVerifier( verifier );
-        }
-
         Enroler enroler = createEnroler();
-        if( enroler != null )
+        if( verifier == null && enroler == null )
         {
-            guard.setEnroler( enroler );
+            return createInterceptors(new Filter()
+                {
+                } );
         }
-        return createInterceptors( guard );
+        else
+        {
+            ChallengeAuthenticator guard = new ChallengeAuthenticator( context, ChallengeScheme.HTTP_BASIC, getName() + " Realm" );
+
+            if( verifier != null )
+            {
+                guard.setVerifier( verifier );
+            }
+
+            if( enroler != null )
+            {
+                guard.setEnroler( enroler );
+            }
+            return createInterceptors( guard );
+        }
     }
 
-    private Restlet createInterceptors( ChallengeAuthenticator guard )
+    private Restlet createInterceptors( Filter guard )
     {
         Filter inner = createInnerInterceptor();
         if( inner != null )
@@ -198,16 +178,12 @@
         return null;
     }
 
-    protected abstract String getConnectivityLayer();
-
-    protected abstract String getConnectivityModule();
-
     protected abstract void addRoutes( Router router );
 
     protected void addResourcePath( String name,
                                     Class<? extends HasIdentity> type,
                                     String basePath
-    )
+                                  )
     {
         addResourcePath( name, type, basePath, true, true );
     }
@@ -217,7 +193,7 @@
                                     String basePath,
                                     boolean createLink,
                                     boolean rootRoute
-    )
+                                  )
     {
         if( createLink )
         {
@@ -232,21 +208,19 @@
         router.attach( basePath + name + "/{id}/{invoke}", newPolygeneRestlet( EntityResource.class, type ) );
     }
 
-    private <K extends HasIdentity, T extends ServerResource<K>> Restlet newPolygeneRestlet(Class<T> resourceClass,
-                                                                                        Class<K> entityClass
-    )
+    private <K extends HasIdentity, T extends ServerResource<K>> Restlet newPolygeneRestlet( Class<T> resourceClass, Class<K> entityClass )
     {
 
         @SuppressWarnings( "unchecked" )
         ResourceFactory<K, T> factory = objectFactory.newObject( DefaultResourceFactoryImpl.class,
                                                                  resourceClass, router
-        );
+                                                               );
         PolygeneConverter converter = new PolygeneConverter( objectFactory );
         return objectFactory.newObject( PolygeneEntityRestlet.class,
                                         factory,
                                         router,
                                         entityClass,
                                         converter
-        );
+                                      );
     }
 }
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneRestApplicationLauncher.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneRestApplicationLauncher.java
new file mode 100644
index 0000000..956e1e7
--- /dev/null
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneRestApplicationLauncher.java
@@ -0,0 +1,104 @@
+/*
+ *  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.polygene.library.restlet;
+
+import org.apache.polygene.api.activation.ActivationException;
+import org.apache.polygene.api.activation.PassivationException;
+import org.apache.polygene.api.composite.TransientBuilderFactory;
+import org.apache.polygene.api.object.ObjectFactory;
+import org.apache.polygene.api.service.ServiceFinder;
+import org.apache.polygene.api.structure.Application;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.value.ValueBuilderFactory;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
+
+@SuppressWarnings( "WeakerAccess" )
+public abstract class PolygeneRestApplicationLauncher
+{
+    protected org.apache.polygene.api.structure.Application polygeneApplication;
+    protected ServiceFinder serviceFinder;
+    protected ObjectFactory objectFactory;
+    protected TransientBuilderFactory transientBuilderFactory;
+    protected UnitOfWorkFactory unitOfWorkFactory;
+    protected ValueBuilderFactory valueBuilderFactory;
+    protected Module entryModule;
+
+    public void initialize()
+        throws ActivationException
+    {
+        polygeneApplication = createApplication();
+        activateApplication();
+        entryModule = polygeneApplication.findModule( entryLayer(), entryModule() );
+        serviceFinder = entryModule;
+        objectFactory = entryModule;
+        transientBuilderFactory = entryModule;
+        unitOfWorkFactory = entryModule.unitOfWorkFactory();
+        valueBuilderFactory = entryModule;
+    }
+
+    protected abstract String entryLayer();
+
+    protected abstract String entryModule();
+
+    protected void activateApplication()
+        throws ActivationException
+    {
+        polygeneApplication.activate();
+    }
+
+    protected Application createApplication()
+    {
+        try
+        {
+            LayeredApplicationAssembler assembler = createApplicationAssembler();
+            assembler.initialize();
+            return assembler.application();
+        }
+        catch( Throwable e )
+        {
+            throw new RuntimeException( "Unable to start Polygene application.", e );
+        }
+    }
+
+    protected abstract LayeredApplicationAssembler createApplicationAssembler()
+        throws AssemblyException;
+
+    protected void installShutdownHook()
+    {
+        Runtime.getRuntime().addShutdownHook( new Thread( this::shutdown ) );
+    }
+
+    protected void shutdown()
+    {
+        try
+        {
+            if( polygeneApplication != null )
+            {
+                polygeneApplication.passivate();
+            }
+        }
+        catch( PassivationException e )
+        {
+            throw new RuntimeException( "Unable to shut down cleanly.", e );
+        }
+    }
+}
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneServerServlet.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneServerServlet.java
index ce5cf03..834dd33 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneServerServlet.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/PolygeneServerServlet.java
@@ -22,7 +22,7 @@
 import javax.servlet.Servlet;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.object.ObjectFactory;
 import org.restlet.Context;
 import org.restlet.ext.servlet.ServerServlet;
 
@@ -32,16 +32,15 @@
 @Mixins( PolygeneServerServlet.Mixin.class )
 public interface PolygeneServerServlet extends Servlet
 {
-    class Mixin
-        extends ServerServlet
+    class Mixin extends ServerServlet
     {
         @Structure
-        private Module module;
+        private ObjectFactory objectFactory;
 
         @Override
         protected org.restlet.Application createApplication( Context parentContext )
         {
-            return module.newObject( org.restlet.Application.class, parentContext.createChildContext() );
+            return objectFactory.newObject( PolygeneRestApplication.class, parentContext.createChildContext() );
         }
     }
 }
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/CrudServiceAssembler.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/CrudServiceAssembler.java
index 7eae33f..7e55a75 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/CrudServiceAssembler.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/CrudServiceAssembler.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.restlet.identity.IdentityManager;
 import org.apache.polygene.library.restlet.identity.IdentityMappingConfiguration;
@@ -32,7 +31,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.entities( IdentityMappingConfiguration.class );
         module.services( IdentityManager.class ).visibleIn( Visibility.application ).instantiateOnStartup();
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/GenericRestLayer.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/GenericRestLayer.java
deleted file mode 100644
index 8b286ab..0000000
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/GenericRestLayer.java
+++ /dev/null
@@ -1,36 +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.polygene.library.restlet.assembly;
-
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
-
-public class GenericRestLayer extends LayeredLayerAssembler
-{
-
-    @Override
-    public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
-    {
-        return null;
-    }
-}
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
index 815691a..0eb1d5e 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.restlet.Command;
 import org.apache.polygene.library.restlet.FormField;
@@ -39,12 +38,14 @@
 import org.apache.polygene.library.restlet.serialization.FormRepresentation;
 import org.apache.polygene.library.restlet.serialization.JsonRepresentation;
 
+/** This assembler should go to a module in the layer of the {@link RestletCrudModuleAssembler}.
+ *
+ */
 public class RestletCrudConnectivityAssembler
     implements Assembler
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.values( EntryPointResource.class,
                        EntityListResource.class,
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudModuleAssembler.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudModuleAssembler.java
index 4e859db..f6c07e0 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudModuleAssembler.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudModuleAssembler.java
@@ -22,15 +22,17 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.unitofwork.concern.UnitOfWorkConcern;
-import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.Assemblers;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.library.restlet.repository.CrudRepository;
 import org.apache.polygene.library.restlet.repository.EntityTypeDescriptor;
 import org.apache.polygene.library.restlet.repository.SmallCrudRepositoryMixin;
 
-public class RestletCrudModuleAssembler
-    implements Assembler
+/**
+ * This assembler should be used for each module that has CRUD types, reachable by the REST API.
+ */
+public class RestletCrudModuleAssembler extends Assemblers.VisibilityIdentity<RestletCrudModuleAssembler>
 {
     private final Class type;
     private final Class repositoryType;
@@ -49,17 +51,23 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
-        module
+        super.assemble( module );
+        ServiceDeclaration declaration = module
             .addServices( repositoryType )
-            .identifiedBy( "repository_" + type.getSimpleName() )
             .visibleIn( Visibility.application )
             .withMixins( SmallCrudRepositoryMixin.class )
             .withConcerns( UnitOfWorkConcern.class )
             .taggedWith( type.getSimpleName() )
-            .setMetaInfo( new EntityTypeDescriptor( type ) )
-        ;
+            .setMetaInfo( new EntityTypeDescriptor( type ) );
+        if( hasIdentity() )
+        {
+            declaration.identifiedBy( identity() );
+        }
+        else
+        {
+            declaration.identifiedBy( "repository_" + type.getSimpleName() );
+        }
         module.entities( type ).visibleIn( Visibility.layer );
         module.values( type ).visibleIn( Visibility.layer );
     }
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityListResource.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityListResource.java
index 6085c22..175ee7c 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityListResource.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityListResource.java
@@ -93,13 +93,10 @@
                 name = nameField.value().get();
             }
             Reference base = parameters.request().get().getResourceRef();
-
-            //noinspection unchecked
             Class<T> entityType = parameters.entityType().get();
-
             Identity identity = identityManager.generate(entityType, name);
             locator.find( entityType ).create( identity );
-            return resourceBuilder.createRestLink( identity, base, Method.GET );
+            return resourceBuilder.createRestLink( identity.toString(), base, Method.GET );
         }
 
         @SuppressWarnings( "unchecked" )
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
index d7ab52c..91b05ea 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
@@ -40,7 +40,6 @@
 import org.apache.polygene.library.restlet.repository.RepositoryLocator;
 import org.apache.polygene.library.restlet.resource.ResourceBuilder;
 import org.apache.polygene.library.restlet.resource.ServerResource;
-import org.apache.polygene.spi.PolygeneSPI;
 import org.restlet.data.Reference;
 
 @Mixins( EntityResource.Mixin.class )
@@ -57,15 +56,9 @@
     {
 
         @Structure
-        private PolygeneSPI spi;
-
-        @Structure
         private ValueBuilderFactory vbf;
 
         @This
-        private HasIdentity me;
-
-        @This
         private Parameters<T> parameters;
 
         @This
@@ -95,9 +88,9 @@
         @Override
         public void delete()
         {
-            Class entityType = parameters.entityType().get();
+            Class<? extends HasIdentity> entityType = parameters.entityType().get();
             String idOfEntity = parameters.id().get();
-            locator.find( entityType ).delete( new StringIdentity( idOfEntity ) );
+            locator.find( entityType ).delete( StringIdentity.identityOf( idOfEntity ) );
         }
 
         @Override
@@ -137,10 +130,10 @@
                 throw new RuntimeException( message, e );
             }
             Reference base = parameters.request().get().getResourceRef();
-            return resourceBuilder.createRestLink( new StringIdentity( "" ), base, org.restlet.data.Method.GET );
+            return resourceBuilder.createRestLink( "", base, org.restlet.data.Method.GET );
         }
 
-        private Object createParametersComposite( RestForm form, Class argType )
+        private Object createParametersComposite( RestForm form, Class<?> argType )
         {
             ValueBuilder<?> vb = vbf.newValueBuilderWithState(
                 argType,
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
index b4ebde6..e7b66fa 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
@@ -80,10 +80,10 @@
             if( isIdentity( canonicalName ) )
             {
                 // This is already an ID, and we simply return it.
-                return new StringIdentity( canonicalName );
+                return StringIdentity.identityOf( canonicalName );
             }
             String prefix = findPrefix( type );
-            return new StringIdentity( prefix + SEPARATOR + canonicalName );
+            return StringIdentity.identityOf( prefix + SEPARATOR + canonicalName );
         }
 
         @Override
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/CreationResource.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/CreationResource.java
index fe86473..cee4b23 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/CreationResource.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/CreationResource.java
@@ -66,11 +66,11 @@
         public RestLink post( RestForm form )
         {
             String name = form.field( "name" ).value().get();
-            Class entityType = parameters.entityType().get();
+            Class<? extends HasIdentity> entityType = parameters.entityType().get();
             Identity identity = identityManager.generate( entityType, name );
             locator.find( entityType ).create( identity );
             doParameterization( form, entityType, identity );
-            return resourceBuilder.createRestLink( identity, parameters.request().get().getResourceRef(), Method.GET );
+            return resourceBuilder.createRestLink( identity.toString(), parameters.request().get().getResourceRef(), Method.GET );
         }
 
         private <P> void doParameterization( RestForm form, Class entityType, Identity identity )
@@ -79,7 +79,7 @@
             {
                 return;
             }
-            //noinspection unchecked
+            @SuppressWarnings( "unchecked" )
             CreationParameterized<P> created = (CreationParameterized<P>) locator.find( entityType ).get( identity );
             P parameterization = createParameterizationValue( form, created );
             created.parameterize( parameterization );
@@ -94,7 +94,7 @@
                 association -> null,
                 association -> null,
                 association -> null
-            );
+                                                             );
             return vb.newInstance();
         }
 
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
index 053184b..2e56c8a 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
@@ -80,18 +80,18 @@
                         RestLink link;
                         if( route.getDescription() == null )
                         {
-                            link = resourceBuilder.createRestLink( new StringIdentity( template.getPattern() ), hostRef, Method.GET );
+                            link = resourceBuilder.createRestLink( template.getPattern(), hostRef, Method.GET );
                         }
                         else
                         {
-                            link = resourceBuilder.createRestLink( new StringIdentity( template.getPattern() ), hostRef, Method.GET, route.getDescription() );
+                            link = resourceBuilder.createRestLink( template.getPattern(), hostRef, Method.GET, route.getDescription() );
                         }
                         entryPoints.put( route.getName(), link );
                     }
                 }
             }
             ValueBuilder<EntryPoint> builder = vbf.newValueBuilder( EntryPoint.class );
-            builder.prototype().identity().set( new StringIdentity( "/" ) );
+            builder.prototype().identity().set( StringIdentity.identityOf( "/" ) );
             builder.prototype().api().set( entryPoints );
             return builder.newInstance();
         }
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
index bdf1942..fded105 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
@@ -24,7 +24,6 @@
 import java.util.Collections;
 import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
@@ -48,13 +47,13 @@
 @Mixins( ResourceBuilder.Mixin.class )
 public interface ResourceBuilder
 {
-    EntityRef createEntityRef(Identity name, Reference base );
+    EntityRef createEntityRef( Identity name, Reference base );
 
     EntityRef createEntityRef( Identity name, RestLink get, RestLink put, RestLink delete );
 
-    RestLink createRestLink( Identity name, Reference base, Method method );
+    RestLink createRestLink( String name, Reference base, Method method );
 
-    RestLink createRestLink( Identity name, Reference base, Method method, String description );
+    RestLink createRestLink( String name, Reference base, Method method, String description );
 
     Command createCommand( Reference base );
 
@@ -62,9 +61,9 @@
 
     FormField createFormField( String name, String type );
 
-    <T extends HasIdentity> Representation toRepresentation(Class<T> type, T composite );
+    <T extends HasIdentity> Representation toRepresentation( Class<T> type, T composite );
 
-    <T extends HasIdentity> T toObject(Class<T> type, Representation representation )
+    <T extends HasIdentity> T toObject( Class<T> type, Representation representation )
         throws IOException;
 
     Route findRoute( String name, Router router );
@@ -88,9 +87,11 @@
         @Override
         public EntityRef createEntityRef( Identity identity, Reference base )
         {
-            RestLink get = createRestLink( identity, base, Method.GET );
-            RestLink put = createRestLink( identity, base, Method.PUT );
-            RestLink delete = createRestLink( identity, base, Method.DELETE );
+            String name = identityManager.extractName( identity );
+
+            RestLink get = createRestLink( name, base, Method.GET );
+            RestLink put = createRestLink( name, base, Method.PUT );
+            RestLink delete = createRestLink( name, base, Method.DELETE );
             return createEntityRef( identity, get, put, delete );
         }
 
@@ -107,10 +108,8 @@
         }
 
         @Override
-        public RestLink createRestLink( Identity identity, Reference base, Method method )
+        public RestLink createRestLink( String name, Reference base, Method method )
         {
-            String name = identityManager.extractName( identity );
-
             ValueBuilder<RestLink> builder = vbf.newValueBuilder( RestLink.class );
             RestLink prototype = builder.prototype();
             String path = base.toUri().resolve( name ).getPath();
@@ -120,9 +119,8 @@
         }
 
         @Override
-        public RestLink createRestLink( Identity identity, Reference base, Method method, String description )
+        public RestLink createRestLink( String name, Reference base, Method method, String description )
         {
-            String name = identityManager.extractName( identity );
             ValueBuilder<RestLink> builder = vbf.newValueBuilder( RestLink.class );
             RestLink prototype = builder.prototype();
             prototype.path().set( base.toUri().resolve( name ).getPath() + "/" );
@@ -143,7 +141,7 @@
         public RestForm createNameForm( Reference base )
         {
             ValueBuilder<RestForm> builder = vbf.newValueBuilder( RestForm.class );
-            builder.prototype().link().set( createRestLink( new StringIdentity( "form" ), base, Method.POST ) );
+            builder.prototype().link().set( createRestLink( "form", base, Method.POST ) );
             builder.prototype().fields().set( Collections.singletonList( createFormField( "name", FormField.TEXT ) ) );
             return builder.newInstance();
         }
@@ -157,13 +155,13 @@
         }
 
         @Override
-        public <T extends HasIdentity> Representation toRepresentation(Class<T> type, T composite )
+        public <T extends HasIdentity> Representation toRepresentation( Class<T> type, T composite )
         {
             return converter.toRepresentation( composite, new Variant(), null );
         }
 
         @Override
-        public <T extends HasIdentity> T toObject(Class<T> type, Representation representation )
+        public <T extends HasIdentity> T toObject( Class<T> type, Representation representation )
             throws IOException
         {
             return converter.toObject( representation, type, null );
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java
index ea0929b..fafabe4 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java
@@ -23,12 +23,12 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
-import java.io.OutputStreamWriter;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.api.serialization.Serialization;
+import org.apache.polygene.api.serialization.Serializer;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.spi.PolygeneSPI;
 import org.restlet.data.MediaType;
@@ -84,7 +84,7 @@
      *
      * @return The wrapped object.
      *
-     * @throws IOException
+     * @throws IOException if there is an underlying I/O problem.
      */
     public T getObject()
         throws IOException
@@ -123,8 +123,7 @@
         }
         else if( object != null )
         {
-            // TODO was WITHOUT TYPE INFO
-            stateSerialization.serialize( new OutputStreamWriter( outputStream ), object );
+            stateSerialization.serialize( Serializer.Options.NO_TYPE_INFO, outputStream, object );
             outputStream.write( '\n' );
         }
     }
diff --git a/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/TestApplication.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/TestApplication.java
index 6d21d05..3b8fb2b 100644
--- a/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/TestApplication.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/TestApplication.java
@@ -45,11 +45,11 @@
         throws Exception
     {
         RestApplicationAssembler assembler = new RestApplicationAssembler( NAME, VERSION, MODE,
-            ConfigurationLayer.class,
-            InfrastructureLayer.class,
-            DomainLayer.class,
-            ResourceLayer.class,
-            ConnectivityLayer.class
+                                                                           ConnectivityLayer.class,
+                                                                           ResourceLayer.class,
+                                                                           DomainLayer.class,
+                                                                           InfrastructureLayer.class,
+                                                                           ConfigurationLayer.class
         );
 
         assembler.initialize();
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestApplicationAssembler.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/RestApplicationAssembler.java
similarity index 98%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestApplicationAssembler.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/RestApplicationAssembler.java
index 61f5b08..c520e75 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestApplicationAssembler.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/RestApplicationAssembler.java
@@ -46,7 +46,6 @@
 
     @Override
     protected void assembleLayers( ApplicationAssembly assembly )
-        throws AssemblyException
     {
         for( Class<? extends LayerAssembler> layer : layers )
         {
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationLayer.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationLayer.java
similarity index 94%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationLayer.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationLayer.java
index c3ac858..e615347 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationLayer.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationLayer.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.library.restlet.assembly.configuration;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.LayerAssembler;
@@ -34,7 +33,6 @@
 
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         configModule = createModule( layer, ConfigurationModule.class );
         return layer;
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
similarity index 94%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
index 1050e8a..dd65cfa 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.library.restlet.assembly.configuration;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -33,7 +32,6 @@
     public static final String NAME = "Configuration Module";
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
         return module;
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/ConnectivityLayer.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/ConnectivityLayer.java
similarity index 93%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/ConnectivityLayer.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/ConnectivityLayer.java
index 6d73d76..c0d45dc 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/ConnectivityLayer.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/ConnectivityLayer.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.library.restlet.assembly.connectivity;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.layered.LayerAssembler;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
@@ -32,7 +31,6 @@
 
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         createModule( layer, RestModule.class );
         createModule( layer, SecurityModule.class );
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/RestModule.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/RestModule.java
similarity index 94%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/RestModule.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/RestModule.java
index 195978a..29349f5 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/RestModule.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/RestModule.java
@@ -19,7 +19,6 @@
  */
 package org.apache.polygene.library.restlet.assembly.connectivity;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -33,7 +32,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         new RestletCrudConnectivityAssembler().assemble( module );
         module.values( EntryPoint.class );
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/SecurityModule.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/SecurityModule.java
similarity index 93%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/SecurityModule.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/SecurityModule.java
index b613b57..02ca63f 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/connectivity/SecurityModule.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/connectivity/SecurityModule.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.library.restlet.assembly.connectivity;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -30,7 +29,6 @@
 {
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         return module;
     }
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/domain/CrudModule.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/domain/CrudModule.java
similarity index 93%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/domain/CrudModule.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/domain/CrudModule.java
index 16ac2c6..769390b 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/domain/CrudModule.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/domain/CrudModule.java
@@ -19,7 +19,6 @@
  */
 package org.apache.polygene.library.restlet.assembly.domain;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -32,7 +31,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         new CrudServiceAssembler().assemble( module );
         return module;
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/domain/DomainLayer.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/domain/DomainLayer.java
similarity index 93%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/domain/DomainLayer.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/domain/DomainLayer.java
index 80611dc..9fe73f3 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/domain/DomainLayer.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/domain/DomainLayer.java
@@ -19,7 +19,6 @@
  */
 package org.apache.polygene.library.restlet.assembly.domain;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.layered.LayerAssembler;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
@@ -31,7 +30,6 @@
 
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         createModule( layer, CrudModule.class );
         return layer;
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/FileStorageModule.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/FileStorageModule.java
similarity index 95%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/FileStorageModule.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/FileStorageModule.java
index 1146378..4d410f7 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/FileStorageModule.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/FileStorageModule.java
@@ -21,11 +21,10 @@
 package org.apache.polygene.library.restlet.assembly.infrastructue;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.entitystore.file.assembly.FileEntityStoreAssembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
+import org.apache.polygene.entitystore.file.assembly.FileEntityStoreAssembler;
 
 public class FileStorageModule
     implements ModuleAssembler
@@ -41,7 +40,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         new FileEntityStoreAssembler()
             .visibleIn( Visibility.application  )
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/IndexingModule.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/IndexingModule.java
similarity index 95%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/IndexingModule.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/IndexingModule.java
index 76a97c8..9977b93 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/IndexingModule.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/IndexingModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.library.restlet.assembly.infrastructue;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -41,7 +40,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
 //        new FileConfigurationAssembler().assemble( module );
 //        new ESFilesystemIndexQueryAssembler()
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/InfrastructureLayer.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/InfrastructureLayer.java
similarity index 95%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/InfrastructureLayer.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/InfrastructureLayer.java
index ad3e56a..7d98ff3 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/InfrastructureLayer.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/InfrastructureLayer.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.library.restlet.assembly.infrastructue;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.LayerAssembler;
@@ -47,7 +46,6 @@
 
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         new IndexingModule( configModule ).assemble( layer, layer.module( IndexingModule.NAME ) );
         new SerializationModule().assemble( layer, layer.module( SerializationModule.NAME ) );
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
similarity index 93%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
index 275cb27..85bb76d 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.library.restlet.assembly.infrastructue;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
@@ -32,7 +31,6 @@
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
         return module;
     }
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/resource/ResourceLayer.java b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/resource/ResourceLayer.java
similarity index 93%
rename from libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/resource/ResourceLayer.java
rename to libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/resource/ResourceLayer.java
index e986d16..a209315 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/resource/ResourceLayer.java
+++ b/libraries/restlet/src/test/java/org/apache/polygene/library/restlet/assembly/resource/ResourceLayer.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.library.restlet.assembly.resource;
 
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.layered.LayerAssembler;
 import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
@@ -32,7 +31,6 @@
 
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
-        throws AssemblyException
     {
         return layer;
     }
diff --git a/libraries/scripting/src/main/java/org/apache/polygene/library/scripting/Scripting.java b/libraries/scripting/src/main/java/org/apache/polygene/library/scripting/Scripting.java
index ad97b42..4b6487b 100644
--- a/libraries/scripting/src/main/java/org/apache/polygene/library/scripting/Scripting.java
+++ b/libraries/scripting/src/main/java/org/apache/polygene/library/scripting/Scripting.java
@@ -69,6 +69,6 @@
 
     public static void main( String[] args )
     {
-        new ScriptEngineManager().getEngineFactories().forEach( factory -> System.out.println(factory));
+        new ScriptEngineManager().getEngineFactories().forEach( System.out::println );
     }
 }
diff --git a/libraries/scripting/src/test/groovy/org/apache/polygene/library/scripting/HelloSpeakerTest.java b/libraries/scripting/src/test/groovy/org/apache/polygene/library/scripting/HelloSpeakerTest.java
index 6ae5436..62c7ff6 100644
--- a/libraries/scripting/src/test/groovy/org/apache/polygene/library/scripting/HelloSpeakerTest.java
+++ b/libraries/scripting/src/test/groovy/org/apache/polygene/library/scripting/HelloSpeakerTest.java
@@ -19,11 +19,11 @@
  */
 package org.apache.polygene.library.scripting;
 
-import org.junit.Test;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.junit.Assert.assertThat;
@@ -40,15 +40,11 @@
         throws Exception
     {
         // START SNIPPET: script
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.values( HelloSpeaker.class ).setMetaInfo( Scripting.GROOVY ).withMixins( ScriptMixin.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler(
+            assembly -> assembly.values( HelloSpeaker.class )
+                                .setMetaInfo( Scripting.GROOVY )
+                                .withMixins( ScriptMixin.class )
+        );
         HelloSpeaker speaker = assembler.module().newValue( HelloSpeaker.class );
         assertThat( speaker.sayHello(), equalTo("Hello, Groovy") );
         // END SNIPPET: script
@@ -59,15 +55,10 @@
         throws Exception
     {
         // START SNIPPET: direct
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloSpeaker.class ).withMixins( HelloSpeakerMixin.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler(
+            assembly -> assembly.transients( HelloSpeaker.class )
+                                .withMixins( HelloSpeakerMixin.class )
+        );
         HelloSpeaker speaker = assembler.module().newTransient( HelloSpeaker.class );
         assertThat( speaker.sayHello(), equalTo("Hello there, Groovy") );
         // END SNIPPET: direct
diff --git a/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PasswordDomainAssembler.java b/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PasswordDomainAssembler.java
index 67be79e..f9c4a2d 100644
--- a/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PasswordDomainAssembler.java
+++ b/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PasswordDomainAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.shiro.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.library.shiro.domain.passwords.PasswordRealmConfiguration;
@@ -32,8 +31,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.entities( PasswordSecurable.class ).visibleIn( visibility() );
         ServiceDeclaration service = module.services( PasswordRealmService.class ).
             instantiateOnStartup().
diff --git a/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PermissionsDomainAssembler.java b/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PermissionsDomainAssembler.java
index 086749c..6609085 100644
--- a/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PermissionsDomainAssembler.java
+++ b/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/PermissionsDomainAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.shiro.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.shiro.domain.permissions.Role;
 import org.apache.polygene.library.shiro.domain.permissions.RoleAssignee;
@@ -32,8 +31,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.entities( Role.class, RoleAssignment.class, RoleAssignee.class ).
             visibleIn( visibility() );
         module.services( RoleFactory.class ).
diff --git a/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/StandaloneShiroAssembler.java b/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/StandaloneShiroAssembler.java
index 2f35ea0..9edf580 100644
--- a/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/StandaloneShiroAssembler.java
+++ b/libraries/shiro-core/src/main/java/org/apache/polygene/library/shiro/assembly/StandaloneShiroAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.shiro.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.library.shiro.ini.IniSecurityManagerService;
@@ -31,8 +30,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( IniSecurityManagerService.class ).
             visibleIn( visibility() ).
             instantiateOnStartup();
diff --git a/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/ShiroFilterService.java b/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/ShiroFilterService.java
index 698bcaa..b8b822a 100644
--- a/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/ShiroFilterService.java
+++ b/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/ShiroFilterService.java
@@ -20,11 +20,10 @@
 package org.apache.polygene.library.shiro.web;
 
 import javax.servlet.Filter;
-import org.apache.shiro.web.servlet.ShiroFilter;
 import org.apache.polygene.api.mixin.Mixins;
+import org.apache.shiro.web.servlet.ShiroFilter;
 
 @Mixins( ShiroFilter.class )
-public interface ShiroFilterService
-        extends Filter
+public interface ShiroFilterService extends Filter
 {
 }
diff --git a/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/assembly/HttpShiroAssembler.java b/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/assembly/HttpShiroAssembler.java
index 0c0a5e0..8037332 100644
--- a/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/assembly/HttpShiroAssembler.java
+++ b/libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/assembly/HttpShiroAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.shiro.web.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.shiro.ini.ShiroIniConfiguration;
 import org.apache.polygene.library.shiro.web.EnvironmentLoaderService;
@@ -36,26 +35,27 @@
 import static org.apache.polygene.library.http.Servlets.filter;
 import static org.apache.polygene.library.http.Servlets.listen;
 
-public class HttpShiroAssembler
-    extends Assemblers.Config<HttpShiroAssembler>
+public class HttpShiroAssembler extends Assemblers.Config<HttpShiroAssembler>
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
-        addContextListeners( listen().
-            with( EnvironmentLoaderService.class ) ).
-            to( module );
+        super.assemble( module );
+        addContextListeners(
+            listen().with( EnvironmentLoaderService.class ) )
+            .to( module );
 
-        addFilters( filter( "/*" ).
-            through( ShiroFilterService.class ).
-            on( REQUEST, FORWARD, INCLUDE, ERROR, ASYNC ) ).
-            to( module );
+        addFilters(
+            filter( "/*" )
+                .through( ShiroFilterService.class )
+                .on( REQUEST, FORWARD, INCLUDE, ERROR, ASYNC ) )
+            .to( module );
 
         if( hasConfig() )
         {
-            configModule().entities( ShiroIniConfiguration.class ).
-                visibleIn( configVisibility() );
+            configModule()
+                .entities( ShiroIniConfiguration.class )
+                .visibleIn( configVisibility() );
         }
     }
 }
diff --git a/libraries/spring/src/main/java/org/apache/polygene/library/spring/bootstrap/internal/application/PolygeneApplicationFactoryBean.java b/libraries/spring/src/main/java/org/apache/polygene/library/spring/bootstrap/internal/application/PolygeneApplicationFactoryBean.java
index cbca71e..1f2883a 100644
--- a/libraries/spring/src/main/java/org/apache/polygene/library/spring/bootstrap/internal/application/PolygeneApplicationFactoryBean.java
+++ b/libraries/spring/src/main/java/org/apache/polygene/library/spring/bootstrap/internal/application/PolygeneApplicationFactoryBean.java
@@ -20,7 +20,9 @@
 package org.apache.polygene.library.spring.bootstrap.internal.application;
 
 import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.bootstrap.*;
+import org.apache.polygene.bootstrap.ApplicationAssembly;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.library.spring.bootstrap.PolygeneApplicationBootstrap;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanInitializationException;
@@ -84,10 +86,10 @@
 
     private Application createApplication()
     {
-        Energy4Java energy4Java = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
         try
         {
-            return energy4Java.newApplication(
+            return polygene.newApplication(
                 factory ->
                 {
                     ApplicationAssembly applicationAssembly = factory.newApplicationAssembly();
diff --git a/libraries/spring/src/main/java/org/apache/polygene/library/spring/importer/SpringImporterAssembler.java b/libraries/spring/src/main/java/org/apache/polygene/library/spring/importer/SpringImporterAssembler.java
index ecafc5a..6333821 100644
--- a/libraries/spring/src/main/java/org/apache/polygene/library/spring/importer/SpringImporterAssembler.java
+++ b/libraries/spring/src/main/java/org/apache/polygene/library/spring/importer/SpringImporterAssembler.java
@@ -22,7 +22,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.springframework.context.ApplicationContext;
 
@@ -61,7 +60,7 @@
     }
 
     @Override
-    public void assemble( ModuleAssembly module ) throws AssemblyException
+    public void assemble( ModuleAssembly module )
     {
         // Register all Spring beans as services
         String[] names = context.getBeanDefinitionNames();
diff --git a/libraries/sql-liquibase/src/main/java/org/apache/polygene/library/sql/liquibase/LiquibaseAssembler.java b/libraries/sql-liquibase/src/main/java/org/apache/polygene/library/sql/liquibase/LiquibaseAssembler.java
index e462c0b..59f1aba 100644
--- a/libraries/sql-liquibase/src/main/java/org/apache/polygene/library/sql/liquibase/LiquibaseAssembler.java
+++ b/libraries/sql-liquibase/src/main/java/org/apache/polygene/library/sql/liquibase/LiquibaseAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.sql.liquibase;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 
@@ -31,8 +30,8 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         ServiceDeclaration service = module.services( LiquibaseService.class ).visibleIn( visibility() );
         if( applyChangelogOnStartup )
         {
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/AbstractPooledDataSourceServiceAssembler.java b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/AbstractPooledDataSourceServiceAssembler.java
index 8a6e777..360e34e 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/AbstractPooledDataSourceServiceAssembler.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/AbstractPooledDataSourceServiceAssembler.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
 
@@ -32,8 +31,8 @@
 
     @Override
     public final void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.values( DataSourceConfiguration.class ).visibleIn( Visibility.module );
         if( hasConfig() )
         {
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
index e6a3d78..adea163 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
@@ -24,7 +24,6 @@
 import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.service.importer.ServiceInstanceImporter;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.circuitbreaker.CircuitBreaker;
 import org.apache.polygene.library.sql.datasource.DataSources;
@@ -68,11 +67,11 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.importedServices( DataSource.class ).
             importedBy( ServiceInstanceImporter.class ).
-            setMetaInfo( new StringIdentity( dataSourceServiceId ) ).
+            setMetaInfo( StringIdentity.identityOf( dataSourceServiceId ) ).
             identifiedBy( identity() ).
             visibleIn( visibility() );
         if( circuitBreaker != null )
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceJMXAssembler.java b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceJMXAssembler.java
index 6cf0d51..ff6a004 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceJMXAssembler.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceJMXAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.sql.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.sql.jmx.DataSourceConfigurationManagerService;
 
@@ -29,8 +28,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( DataSourceConfigurationManagerService.class ).visibleIn( visibility() ).instantiateOnStartup();
     }
 }
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
index 4af36cf..462dee3 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
@@ -23,7 +23,6 @@
 import javax.sql.DataSource;
 import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.circuitbreaker.CircuitBreaker;
 import org.apache.polygene.library.sql.datasource.DataSources;
@@ -63,11 +62,11 @@
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         if( circuitBreaker != null )
         {
-            externalDataSource = DataSources.wrapWithCircuitBreaker( new StringIdentity(identity()), externalDataSource, circuitBreaker );
+            externalDataSource = DataSources.wrapWithCircuitBreaker( StringIdentity.identityOf( identity() ), externalDataSource, circuitBreaker );
         }
         module.importedServices( DataSource.class ).
             identifiedBy( identity() ).
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/datasource/DataSourceConfigurationState.java b/libraries/sql/src/main/java/org/apache/polygene/library/sql/datasource/DataSourceConfigurationState.java
index 20274c4..9243fa5 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/datasource/DataSourceConfigurationState.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/datasource/DataSourceConfigurationState.java
@@ -28,8 +28,7 @@
  * Describe DataSourceConfiguration properties.
  */
 // START SNIPPET: config
-public interface DataSourceConfigurationState
-        extends Enabled
+public interface DataSourceConfigurationState extends Enabled
 {
     Property<String> driver();
     Property<String> url();
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java b/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
index 777d419..fb279e1 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
@@ -175,7 +175,7 @@
             EditableConfiguration( MBeanInfo info, String identity, Map<String, AccessibleObject> propertyNames )
             {
                 this.info = info;
-                this.identity = new StringIdentity( identity );
+                this.identity = StringIdentity.identityOf( identity );
                 this.propertyNames = propertyNames;
             }
 
diff --git a/libraries/sql/src/test/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java b/libraries/sql/src/test/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
index 882df7a..9bfc975 100644
--- a/libraries/sql/src/test/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
+++ b/libraries/sql/src/test/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
@@ -24,7 +24,6 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.apache.polygene.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.polygene.library.jmx.JMXAssembler;
 import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
 import org.apache.polygene.library.sql.assembly.DataSourceJMXAssembler;
@@ -77,8 +76,6 @@
                 // Create in-memory store for configurations
                 new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( module );
 
-                new DefaultUnitOfWorkAssembler().assemble( module );
-
                 // Set up DataSource service that will manage the connection pools
                 new DBCPDataSourceServiceAssembler().identifiedBy( "datasource-service" )
                                                     .visibleIn( Visibility.layer )
diff --git a/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/PersistingSequencingAssembler.java b/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/PersistingSequencingAssembler.java
index 2409973..ebebe0b 100644
--- a/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/PersistingSequencingAssembler.java
+++ b/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/PersistingSequencingAssembler.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.uid.sequence.PersistingSequencingService;
 import org.apache.polygene.library.uid.sequence.SequenceEntity;
@@ -31,8 +30,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( PersistingSequencingService.class ).visibleIn( visibility() );
         module.entities( SequenceEntity.class ).visibleIn( Visibility.module );
     }
diff --git a/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/TransientSequencingAssembler.java b/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/TransientSequencingAssembler.java
index 24f0571..d32f78b 100644
--- a/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/TransientSequencingAssembler.java
+++ b/libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/assembly/TransientSequencingAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.uid.sequence.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.uid.sequence.TransientSequencingService;
 
@@ -29,8 +28,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( TransientSequencingService.class ).visibleIn( visibility() );
     }
 }
diff --git a/libraries/uid/src/main/java/org/apache/polygene/library/uid/uuid/assembly/UuidServiceAssembler.java b/libraries/uid/src/main/java/org/apache/polygene/library/uid/uuid/assembly/UuidServiceAssembler.java
index a24a555..b32d642 100644
--- a/libraries/uid/src/main/java/org/apache/polygene/library/uid/uuid/assembly/UuidServiceAssembler.java
+++ b/libraries/uid/src/main/java/org/apache/polygene/library/uid/uuid/assembly/UuidServiceAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.uid.uuid.assembly;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.uid.uuid.UuidServiceComposite;
 
@@ -29,8 +28,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( UuidServiceComposite.class ).visibleIn( visibility() );
     }
 }
diff --git a/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/bootstrap/UoWFileAssembler.java b/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/bootstrap/UoWFileAssembler.java
index ae96cb0..a85e757 100644
--- a/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/bootstrap/UoWFileAssembler.java
+++ b/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/bootstrap/UoWFileAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.library.uowfile.bootstrap;
 
 import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.uowfile.internal.UoWFileFactory;
 import org.apache.polygene.library.uowfile.plural.HasUoWFiles;
@@ -41,8 +40,8 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
+        super.assemble( module );
         module.services( UoWFileFactory.class ).visibleIn( visibility() );
     }
 }
diff --git a/manual/src/docs/tutorials/howto-releasing-apache.txt b/manual/src/docs/tutorials/howto-releasing-apache.txt
index 8421dfc..9c2ae62 100644
--- a/manual/src/docs/tutorials/howto-releasing-apache.txt
+++ b/manual/src/docs/tutorials/howto-releasing-apache.txt
@@ -342,7 +342,9 @@
 
 [source,shell]
 ----
-cd polygene-java/tools/generator-polygene
+cd polygene-java
+./gradlew tools:generator-polygene:prepareTemplateGradleWrapper
+cd tools/generator-polygene
 npm publish --tag beta
 ----
 
@@ -849,6 +851,13 @@
 svn commit -m "polygene: dropping <RELEASE-VERSION>-RC# from dist/dev/polygene as the vote failed"
 ----
 
+Drop NPM packages:
+
+[source,shell]
+----
+npm unpublish generator-polygene@<RELEASE-VERSION>
+----
+
 
 === Start over
 
diff --git a/manual/src/docs/userguide/extensions.txt b/manual/src/docs/userguide/extensions.txt
index 433bd47..44bfd3f 100644
--- a/manual/src/docs/userguide/extensions.txt
+++ b/manual/src/docs/userguide/extensions.txt
@@ -61,6 +61,10 @@
 
 :leveloffset: 2
 
+include::../../../../extensions/entitystore-file/src/docs/es-cassandra.txt[]
+
+:leveloffset: 2
+
 include::../../../../extensions/entitystore-file/src/docs/es-file.txt[]
 
 :leveloffset: 2
diff --git a/manual/src/docs/userguide/glossary.txt b/manual/src/docs/userguide/glossary.txt
index ffef798..f2fb326 100644
--- a/manual/src/docs/userguide/glossary.txt
+++ b/manual/src/docs/userguide/glossary.txt
@@ -321,6 +321,14 @@
 --
 
 
+[[def-object,Object]]Object::
++
+--
+Polygene can manage Java classes that are not Composites, and injections can be made on these objects. Read more
+in the user guide about <<core-api-object>>.
+--
+
+
 [[def-private-mixin,Private Mixin]]Private Mixin::
 +
 --
diff --git a/manual/src/docs/userguide/tools.txt b/manual/src/docs/userguide/tools.txt
index b621669..bd129c9 100644
--- a/manual/src/docs/userguide/tools.txt
+++ b/manual/src/docs/userguide/tools.txt
@@ -24,19 +24,20 @@
 
 == Overview ==
 
-The Polygene™ SDK comes with usefull development tools. Theses tools can come in
-handy when assembled into your <<def-application>> in development
-<<def-application-mode>>.
-
-The tools are available in the +tools/+ directory of the Polygene™ SDK.
+The Polygene™ SDK comes with useful development tools:
+ a `yeoman` project generator,
+ a detailed application model and its visualization gui.
 
 :leveloffset: 2
 
-include:: ../../../tools/src/docs/yeoman_polygene.txt[]
+include::../../../../tools/generator-polygene/src/docs/yeoman_polygene.txt[]
 
 :leveloffset: 2
 
-include:: ../../../tools/src/docs/envisage.txt[]
-// include:: ../../../tools/envisage/src/docs/envisage.txt[]
+include::../../../../tools/envisage/src/docs/envisage.txt[]
+
+:leveloffset: 2
+
+include::../../../../tools/model-detail/src/docs/model-detail.txt[]
 
 :leveloffset: 2
diff --git a/manual/src/docs/website/resources/css/polygene.css b/manual/src/docs/website/resources/css/polygene.css
index d512429..72f73d2 100644
--- a/manual/src/docs/website/resources/css/polygene.css
+++ b/manual/src/docs/website/resources/css/polygene.css
@@ -823,3 +823,7 @@
     font-family: Consolas, Monaco, monospace;
     background: #DEDEDE;
 }
+
+.glossterm {
+    font-weight: bold;
+}
\ No newline at end of file
diff --git a/manual/src/docs/website/resources/images/cloudbees.png b/manual/src/docs/website/resources/images/cloudbees.png
deleted file mode 100644
index b9d0c94..0000000
--- a/manual/src/docs/website/resources/images/cloudbees.png
+++ /dev/null
Binary files differ
diff --git a/manual/src/docs/website/resources/images/library-jmx.png b/manual/src/docs/website/resources/images/library-jmx.png
index ee2dbe4..2a4ef06 100644
--- a/manual/src/docs/website/resources/images/library-jmx.png
+++ b/manual/src/docs/website/resources/images/library-jmx.png
Binary files differ
diff --git a/manual/src/docs/website/resources/images/tools-entity-viewer.png b/manual/src/docs/website/resources/images/tools-entity-viewer.png
deleted file mode 100644
index d26d68b..0000000
--- a/manual/src/docs/website/resources/images/tools-entity-viewer.png
+++ /dev/null
Binary files differ
diff --git a/manual/src/docs/website/resources/images/tools-envisage-stacked-collapsed.png b/manual/src/docs/website/resources/images/tools-envisage-stacked-collapsed.png
index 33a0bec..7a825d8 100644
--- a/manual/src/docs/website/resources/images/tools-envisage-stacked-collapsed.png
+++ b/manual/src/docs/website/resources/images/tools-envisage-stacked-collapsed.png
Binary files differ
diff --git a/manual/src/docs/website/resources/images/tools-envisage-stacked.png b/manual/src/docs/website/resources/images/tools-envisage-stacked.png
index ddcdb53..0eedc87 100644
--- a/manual/src/docs/website/resources/images/tools-envisage-stacked.png
+++ b/manual/src/docs/website/resources/images/tools-envisage-stacked.png
Binary files differ
diff --git a/manual/src/docs/website/resources/images/tools-envisage-structure.png b/manual/src/docs/website/resources/images/tools-envisage-structure.png
index 1ecd0ce..293df7f 100644
--- a/manual/src/docs/website/resources/images/tools-envisage-structure.png
+++ b/manual/src/docs/website/resources/images/tools-envisage-structure.png
Binary files differ
diff --git a/manual/src/docs/website/resources/images/tools-envisage-type.png b/manual/src/docs/website/resources/images/tools-envisage-type.png
index 326cbbb..33a03d3 100644
--- a/manual/src/docs/website/resources/images/tools-envisage-type.png
+++ b/manual/src/docs/website/resources/images/tools-envisage-type.png
Binary files differ
diff --git a/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/ParameterViolationConcern.java b/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/ParameterViolationConcern.java
index a7dd18d..eb03280 100644
--- a/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/ParameterViolationConcern.java
+++ b/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/ParameterViolationConcern.java
@@ -23,7 +23,7 @@
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import org.apache.polygene.api.concern.ConcernOf;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 
 // START SNIPPET: report
@@ -39,7 +39,7 @@
         }
         catch( ConstraintViolationException e )
         {
-            for( ConstraintViolation violation : e.constraintViolations() )
+            for( ValueConstraintViolation violation : e.constraintViolations() )
             {
                 String name = violation.name();
                 Object value = violation.value();
diff --git a/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/PhoneNumberParameterViolationConcern.java b/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/PhoneNumberParameterViolationConcern.java
index 92db8a2..82c27c0 100644
--- a/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/PhoneNumberParameterViolationConcern.java
+++ b/manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/PhoneNumberParameterViolationConcern.java
@@ -22,7 +22,7 @@
 import java.util.Collection;
 import org.apache.polygene.api.concern.ConcernOf;
 import org.apache.polygene.api.concern.Concerns;
-import org.apache.polygene.api.constraint.ConstraintViolation;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.property.Property;
 
@@ -44,7 +44,7 @@
             }
             catch( ConstraintViolationException e )
             {
-                Collection<ConstraintViolation> violations = e.constraintViolations();
+                Collection<ValueConstraintViolation> violations = e.constraintViolations();
                 report( violations );
             }
         }
@@ -52,7 +52,7 @@
 // END SNIPPET: property
 
 // START SNIPPET: property
-        private void report( Collection<ConstraintViolation> violations )
+        private void report( Collection<ValueConstraintViolation> violations )
         {
         }
     }
diff --git a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
index dac8153..1ae3c2b 100644
--- a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
+++ b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
@@ -133,8 +133,8 @@
             {
                 // Creditor retrieval could be a use case in itself...
                 List<BalanceData> creditors = new ArrayList<BalanceData>();
-                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, new StringIdentity( "BakerAccount" ) ) );
-                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, new StringIdentity( "ButcherAccount" ) ) );
+                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, StringIdentity.identityOf( "BakerAccount" ) ) );
+                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, StringIdentity.identityOf( "ButcherAccount" ) ) );
                 return creditors;
             }
 
diff --git a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
index 85009f8..3606713 100644
--- a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
+++ b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
@@ -126,8 +126,8 @@
         {
             // Creditor retrieval could be a use case in itself...
             List<BalanceData> creditors = new ArrayList<>();
-            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, new StringIdentity( "BakerAccount" ) ) );
-            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, new StringIdentity( "ButcherAccount" ) ) );
+            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, StringIdentity.identityOf( "BakerAccount" ) ) );
+            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, StringIdentity.identityOf( "ButcherAccount" ) ) );
             return creditors;
         }
 
diff --git a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
index 3530592..323335b 100644
--- a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
+++ b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
@@ -24,9 +24,9 @@
 
 public interface AccountIds
 {
-    Identity SAVINGS_ACCOUNT_ID = new StringIdentity( "SavingsAccountId" );
-    Identity CHECKING_ACCOUNT_ID = new StringIdentity( "CheckingAccountId" );
-    Identity CREDITOR_ID1 = new StringIdentity( "BakerAccount" );
-    Identity CREDITOR_ID2 = new StringIdentity( "ButcherAccount" );
+    Identity SAVINGS_ACCOUNT_ID = StringIdentity.identityOf( "SavingsAccountId" );
+    Identity CHECKING_ACCOUNT_ID = StringIdentity.identityOf( "CheckingAccountId" );
+    Identity CREDITOR_ID1 = StringIdentity.identityOf( "BakerAccount" );
+    Identity CREDITOR_ID2 = StringIdentity.identityOf( "ButcherAccount" );
 
 }
diff --git a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest.java b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest.java
index f3814f7..698dfeb 100644
--- a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest.java
+++ b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest.java
@@ -20,15 +20,9 @@
 
 package org.apache.polygene.dci.moneytransfer.test;
 
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.apache.polygene.dci.moneytransfer.context.PayBillsContext;
 import org.apache.polygene.dci.moneytransfer.context.TransferMoneyContext;
@@ -39,6 +33,10 @@
 import org.apache.polygene.dci.moneytransfer.rolemap.CreditorRolemap;
 import org.apache.polygene.dci.moneytransfer.rolemap.SavingsAccountRolemap;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 import static org.apache.polygene.api.usecase.UsecaseBuilder.newUsecase;
 
@@ -55,11 +53,8 @@
     public static void setup()
         throws Exception
     {
-        assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        assembler = new SingletonAssembler(
+            module -> {
                 module.entities(
                     CheckingAccountRolemap.class,
                     SavingsAccountRolemap.class,
@@ -67,7 +62,7 @@
 
                 new EntityTestAssembler().assemble( module );
             }
-        };
+        );
         uowf = assembler.module().unitOfWorkFactory();
         bootstrapData( assembler );
     }
diff --git a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest2.java b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest2.java
index 19e0fb0..3f6834d 100644
--- a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest2.java
+++ b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/TransferMoneyTest2.java
@@ -20,16 +20,10 @@
 
 package org.apache.polygene.dci.moneytransfer.test;
 
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.apache.polygene.dci.moneytransfer.context.PayBillsContext2;
 import org.apache.polygene.dci.moneytransfer.context.TransferMoneyContext2;
@@ -38,6 +32,10 @@
 import org.apache.polygene.dci.moneytransfer.domain.entity.CreditorEntity;
 import org.apache.polygene.dci.moneytransfer.domain.entity.SavingsAccountEntity;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 import static org.apache.polygene.api.usecase.UsecaseBuilder.newUsecase;
 
@@ -54,22 +52,19 @@
     public static void setup()
         throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.entities(
+        SingletonAssembler assembler = new SingletonAssembler(
+            moduleAssembly -> {
+                moduleAssembly.entities(
                     CheckingAccountEntity.class,
                     SavingsAccountEntity.class,
                     CreditorEntity.class );
 
-                new EntityTestAssembler().assemble( module );
+                new EntityTestAssembler().assemble( moduleAssembly );
 
-                module.transients( TransferMoneyContext2.class );
-                module.objects( PayBillsContext2.class );
+                moduleAssembly.transients( TransferMoneyContext2.class );
+                moduleAssembly.objects( PayBillsContext2.class );
             }
-        };
+        );
 
         module = assembler.module();
         uowf = module.unitOfWorkFactory();
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java b/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java
index 5f3b0cc..f8bea27 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java
@@ -27,7 +27,6 @@
 import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ClassScanner;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
@@ -64,7 +63,6 @@
 {
     @Override
     public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-        throws AssemblyException
     {
         ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
 
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
index 2ea7fb9..3dea65a 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
@@ -38,9 +38,9 @@
 public interface Forums
     extends Administrators, EntityComposite
 {
-    Identity FORUMS_ID = new StringIdentity( "forums" );
+    Identity FORUMS_ID = StringIdentity.identityOf( "forums" );
 
-    public Query<Forum> forums();
+    Query<Forum> forums();
 
     abstract class Mixin
         implements Forums
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
index 31861b4..41b9434 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
@@ -41,7 +41,7 @@
 public interface Users
     extends EntityComposite, Events
 {
-    Identity USERS_ID = new StringIdentity( "users" );
+    Identity USERS_ID = StringIdentity.identityOf( "users" );
 
     Query<User> users();
 
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
index 164b0c8..eac4823 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
@@ -37,7 +37,7 @@
     public void resource( String segment )
         throws ResourceException
     {
-        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(),  new StringIdentity( segment ) );
+        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(),  StringIdentity.identityOf( segment ) );
         subResource( BoardResource.class );
     }
 }
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
index 73ff700..3e1fac4 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
@@ -37,7 +37,7 @@
     public void resource( String segment )
         throws ResourceException
     {
-        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(), new StringIdentity( segment ) );
+        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(), StringIdentity.identityOf( segment ) );
         subResource( BoardResource.class );
     }
 }
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
index 45e9f7b..1c1c60c 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
@@ -36,7 +36,7 @@
     public void resource( String segment )
         throws ResourceException
     {
-        select( Forum.class, new StringIdentity( segment ) );
+        select( Forum.class, StringIdentity.identityOf( segment ) );
         subResource( ForumResource.class );
     }
 }
diff --git a/samples/forum/src/test/java/org/apache/polygene/sample/forum/web/Main.java b/samples/forum/src/test/java/org/apache/polygene/sample/forum/web/Main.java
index 102da80..f10653f 100644
--- a/samples/forum/src/test/java/org/apache/polygene/sample/forum/web/Main.java
+++ b/samples/forum/src/test/java/org/apache/polygene/sample/forum/web/Main.java
@@ -38,11 +38,11 @@
     public static void main( String[] args )
         throws Exception
     {
-        Energy4Java is = new Energy4Java(  );
+        Energy4Java polygene = new Energy4Java(  );
 
         Server server = new Server( Protocol.HTTP, 8888 );
 
-        Application app = is.newApplication( new ForumAssembler(), new MetadataService() );
+        Application app = polygene.newApplication( new ForumAssembler(), new MetadataService() );
 
         app.activate();
 
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
index 3bb475c..db70f40 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
@@ -198,7 +198,7 @@
         private RentalShop createShop( UnitOfWork uow )
             throws UnitOfWorkCompletionException
         {
-            return uow.newEntity( RentalShop.class, new StringIdentity( "SHOP" ) );
+            return uow.newEntity( RentalShop.class, StringIdentity.identityOf( "SHOP" ) );
         }
 
         private void createCustomers( RentalShop shop )
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
index 6d007f2..2aa0c98 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
@@ -52,7 +52,7 @@
             Element result = dom.createElementNS( Page.XHTML, "div" );
             String bookingId = context.path();
             UnitOfWork uow = uowf.currentUnitOfWork();
-            Booking booking = uow.get( Booking.class, new StringIdentity( bookingId ) );
+            Booking booking = uow.get( Booking.class, StringIdentity.identityOf( bookingId ) );
             Car car = booking.car().get();
             createChildNode( dom, result, car.model().get() );
             createChildNode( dom, result, car.licensePlate().get() );
@@ -73,7 +73,7 @@
             Element result = dom.createElementNS( Page.XHTML, "div" );
             String bookingId = context.path();
             UnitOfWork uow = uowf.currentUnitOfWork();
-            Booking booking = uow.get( Booking.class, new StringIdentity( bookingId ) );
+            Booking booking = uow.get( Booking.class, StringIdentity.identityOf( bookingId ) );
             Customer customer = booking.customer().get();
             createChildNode( dom, result, customer.name().get() );
             createChildNode( dom, result, customer.address().get().line1().get() );
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
index 68d868a..884f702 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
@@ -59,7 +59,7 @@
             ArrayList<Node> nodes = new ArrayList<Node>();
             Document dom = context.dom();
             UnitOfWork uow = uowf.currentUnitOfWork();
-            RentalShop shop = uow.get( RentalShop.class, new StringIdentity( "SHOP" ) );
+            RentalShop shop = uow.get( RentalShop.class, StringIdentity.identityOf( "SHOP" ) );
             for( Booking booking : shop.findAllBookings() )
             {
                 String plate = booking.car().get().licensePlate().get();
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/Page.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/Page.java
index 876e4ad..5f0f827 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/Page.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/Page.java
@@ -35,6 +35,8 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import static org.apache.polygene.api.util.AccessibleObjects.accessible;
+
 @Concerns( PageUowManagement.class )
 @Mixins( { Page.MountPointMixin.class, Page.DefaultPageRenderMixin.class } )
 public interface Page
@@ -160,9 +162,7 @@
             throws NoSuchMethodException
         {
             // TODO: Add caching since locating the methods and the throwing of exceptions are expensive.
-            Method method = compositeType.getMethod( methodName, QuikitContext.class );
-            method.setAccessible( true );
-            return method;
+            return accessible( compositeType.getMethod( methodName, QuikitContext.class ) );
         }
     }
 
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/PagesModule.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/PagesModule.java
index 7321828..5abae1b 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/PagesModule.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/PagesModule.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.sample.rental.web.assembly;
 
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.sample.rental.web.BookingPage;
 import org.apache.polygene.sample.rental.web.MainPage;
@@ -32,7 +31,6 @@
     implements Assembler
 {
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         PageMetaInfo mainpageMeta = new PageMetaInfo( "main" );
         module.services( MainPage.class ).setMetaInfo( mainpageMeta );
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalApplicationAssembler.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalApplicationAssembler.java
index a695610..da7c3d3 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalApplicationAssembler.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalApplicationAssembler.java
@@ -24,7 +24,6 @@
 import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 
 public class RentalApplicationAssembler
@@ -39,7 +38,6 @@
 
     @Override
     public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-        throws AssemblyException
     {
         ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
         assembly.setMode( mode );
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalModule.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalModule.java
index 4cece75..1667478 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalModule.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/RentalModule.java
@@ -22,7 +22,6 @@
 
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.sample.rental.domain.Address;
 import org.apache.polygene.sample.rental.domain.Booking;
@@ -39,7 +38,6 @@
     implements Assembler
 {
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.entities( Booking.class, Car.class, Customer.class, CarCategory.class ).visibleIn( application );
         module.values( Address.class, Period.class );
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java
index a7ca995..e85ed1c 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java
@@ -21,7 +21,6 @@
 
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 
@@ -30,7 +29,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.application );
     }
diff --git a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java b/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
index 9c9fee6..716c954 100644
--- a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
+++ b/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
@@ -23,7 +23,6 @@
 import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
@@ -45,7 +44,6 @@
 
     @Override
     public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-        throws AssemblyException
     {
         ApplicationAssembly appAss = applicationFactory.newApplicationAssembly();
         appAss.setName( "SQL Support Sample" );
diff --git a/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/SwingBindingAssembler.java b/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/SwingBindingAssembler.java
index 31cfbc9..8b8e0ce 100644
--- a/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/SwingBindingAssembler.java
+++ b/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/SwingBindingAssembler.java
@@ -30,8 +30,8 @@
     implements Assembler
 {
 
+    @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.objects( StateModel.class, StateInvocationHandler.class, BoundProperty.class );
         addStringToTextFieldAdapter( module );
diff --git a/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/example/Main.java b/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/example/Main.java
index ed35f13..f24a45a 100644
--- a/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/example/Main.java
+++ b/samples/swing/src/main/java/org/apache/polygene/sample/swing/binding/example/Main.java
@@ -30,8 +30,6 @@
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.value.ValueBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.apache.polygene.sample.swing.binding.StateModel;
 import org.apache.polygene.sample.swing.binding.SwingBindingAssembler;
@@ -44,18 +42,14 @@
     public static void main( String[] args )
         throws Exception
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( BoundPersonComposite.class );
-                module.transients( AddressTransient.class );
-                module.values( CityValue.class, CountryValue.class );
-                new SwingBindingAssembler().assemble( module );
+        SingletonAssembler assembler = new SingletonAssembler(
+            moduleAssembly -> {
+                moduleAssembly.transients( BoundPersonComposite.class );
+                moduleAssembly.transients( AddressTransient.class );
+                moduleAssembly.values( CityValue.class, CountryValue.class );
+                new SwingBindingAssembler().assemble( moduleAssembly );
             }
-        };
+        );
         module = assembler.module();
         Address address1 = createAddress( "Vista Damai", "Jalan Tun Razak" );
         Address address2 = createAddress( "Mutiara", "Jalan Ceylon" );
diff --git a/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java b/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
index 69d1f69..43be59d 100644
--- a/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
+++ b/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
@@ -243,7 +243,7 @@
                 UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "readEntityWithComplexType PREPARE " + bulk ) );
                 for( int i = 0; i < ITERATIONS; i++ )
                 {
-                    ComplexProduct product = uow.newEntity( ComplexProduct.class, new StringIdentity( "product" + i ) );
+                    ComplexProduct product = uow.newEntity( ComplexProduct.class, StringIdentity.identityOf( "product" + i ) );
                     product.name().set( "Product " + i );
 
                     if( i % 1000 == 0 )
@@ -265,7 +265,7 @@
                 String id = rnd.nextInt( ITERATIONS ) + "";
                 for( int i = 0; i < ITERATIONS; i++ )
                 {
-                    ComplexProduct product = uow.get( ComplexProduct.class, new StringIdentity( "product" + id ) );
+                    ComplexProduct product = uow.get( ComplexProduct.class, StringIdentity.identityOf( "product" + id ) );
                     product.name().get();
                     if( i % 100 == 0 )
                     {
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
index 3b4e179..c8cca53 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
@@ -24,7 +24,7 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.cache.ehcache.EhCacheConfiguration;
 import org.apache.polygene.cache.ehcache.EhCachePoolService;
-import org.apache.polygene.entitystore.jdbm.JdbmConfiguration;
+import org.apache.polygene.entitystore.jdbm.JdbmEntityStoreConfiguration;
 import org.apache.polygene.entitystore.jdbm.assembly.JdbmEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.performance.entitystore.AbstractEntityStorePerformanceTest;
@@ -46,8 +46,8 @@
         {
             new JdbmEntityStoreAssembler().assemble( module );
             ModuleAssembly configModule = module.layer().module( "Config" );
-            configModule.entities( JdbmConfiguration.class ).visibleIn( Visibility.layer );
-            new EntityTestAssembler().assemble( configModule );
+            configModule.entities( JdbmEntityStoreConfiguration.class ).visibleIn( Visibility.layer );
+            new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( configModule );
 
             module.services( EhCachePoolService.class );
             configModule.entities( EhCacheConfiguration.class ).visibleIn( Visibility.layer );
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
index 956cc7a..f884bb2 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
@@ -19,8 +19,6 @@
 
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.entitystore.memory.assembly.MemoryEntityStoreAssembler;
 import org.apache.polygene.spi.entitystore.helpers.MapEntityStoreMixin;
@@ -37,14 +35,9 @@
 
     private static Assembler createAssembler()
     {
-        return new Assembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                new MemoryEntityStoreAssembler().assemble( module );
-            }
+        return module -> {
+            new MemoryEntityStoreAssembler().assemble( module );
+            module.defaultServices();
         };
     }
 
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
index 09a0331..42305a2 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
@@ -24,9 +24,8 @@
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.usecase.UsecaseBuilder;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.SQLMapEntityStoreConfiguration;
+import org.apache.polygene.entitystore.sql.SQLEntityStoreConfiguration;
 import org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler;
 import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
@@ -49,34 +48,28 @@
 
     private static Assembler createAssembler()
     {
-        return new Assembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                ModuleAssembly config = module.layer().module( "config" );
-                new EntityTestAssembler().assemble( config );
+        return module -> {
+            ModuleAssembly config = module.layer().module( "config" );
+            new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
-                // DataSourceService
-                new DBCPDataSourceServiceAssembler().
-                    identifiedBy( "derby-datasource-service" ).
-                    visibleIn( Visibility.module ).
-                    withConfig( config, Visibility.layer ).
-                    assemble( module );
+            // DataSourceService
+            new DBCPDataSourceServiceAssembler()
+                .identifiedBy( "derby-datasource-service" )
+                .visibleIn( Visibility.module )
+                .withConfig( config, Visibility.layer )
+                .assemble( module );
 
-                // DataSource
-                new DataSourceAssembler().
-                    withDataSourceServiceIdentity( "derby-datasource-service" ).
-                    identifiedBy( "derby-datasource" ).
-                    withCircuitBreaker().
-                    assemble( module );
+            // DataSource
+            new DataSourceAssembler()
+                .withDataSourceServiceIdentity( "derby-datasource-service" )
+                .identifiedBy( "derby-datasource" )
+                .withCircuitBreaker()
+                .assemble( module );
 
-                // SQL EntityStore
-                new DerbySQLEntityStoreAssembler().
-                    withConfig( config, Visibility.layer ).
-                    assemble( module );
-            }
+            // SQL EntityStore
+            new DerbySQLEntityStoreAssembler()
+                .withConfig( config, Visibility.layer )
+                .assemble( module );
         };
     }
 
@@ -93,8 +86,8 @@
         );
         try
         {
-            SQLMapEntityStoreConfiguration config = uow.get( SQLMapEntityStoreConfiguration.class,
-                                                             DEFAULT_ENTITYSTORE_IDENTITY );
+            SQLEntityStoreConfiguration config = uow.get( SQLEntityStoreConfiguration.class,
+                                                          DEFAULT_ENTITYSTORE_IDENTITY );
             Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
             connection.setAutoCommit( false );
             try( Statement stmt = connection.createStatement() )
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java
index b1e8a17..eac294b 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java
@@ -28,14 +28,13 @@
 import org.apache.polygene.api.usecase.UsecaseBuilder;
 import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
 import org.apache.polygene.bootstrap.Assembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
 import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
 import org.apache.polygene.library.sql.common.SQLConfiguration;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.performance.entitystore.AbstractEntityStorePerformanceTest;
 import org.junit.Ignore;
 
@@ -62,35 +61,28 @@
 
     private static Assembler createAssembler()
     {
-        return new Assembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                ModuleAssembly config = module.layer().module( "config" );
-                config.services( MemoryEntityStoreService.class );
+        return module -> {
+            ModuleAssembly config = module.layer().module( "config" );
+            new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
-                // DataSourceService
-                new DBCPDataSourceServiceAssembler().
-                    identifiedBy( "postgresql-datasource-service" ).
-                    visibleIn( Visibility.module ).
-                    withConfig( config, Visibility.layer ).
-                    assemble( module );
+            // DataSourceService
+            new DBCPDataSourceServiceAssembler()
+                .identifiedBy( "postgresql-datasource-service" )
+                .visibleIn( Visibility.module )
+                .withConfig( config, Visibility.layer )
+                .assemble( module );
 
-                // DataSource
-                new DataSourceAssembler().
-                    withDataSourceServiceIdentity( "postgresql-datasource-service" ).
-                    identifiedBy( "postgresql-datasource" ).
-                    withCircuitBreaker().
-                    assemble( module );
+            // DataSource
+            new DataSourceAssembler()
+                .withDataSourceServiceIdentity( "postgresql-datasource-service" )
+                .identifiedBy( "postgresql-datasource" )
+                .withCircuitBreaker()
+                .assemble( module );
 
-                // SQL EntityStore
-                new PostgreSQLEntityStoreAssembler().
-                    withConfig( config, Visibility.layer ).
-                    assemble( module );
-            }
-
+            // SQL EntityStore
+            new PostgreSQLEntityStoreAssembler()
+                .withConfig( config, Visibility.layer )
+                .assemble( module );
         };
     }
 
@@ -107,13 +99,13 @@
 
             Energy4Java polygene = new Energy4Java();
             Assembler[][][] assemblers = new Assembler[][][]
-            {
                 {
                     {
-                        createAssembler()
+                        {
+                            createAssembler()
+                        }
                     }
-                }
-            };
+                };
             Application application = polygene.newApplication( new ApplicationAssemblerAdapter( assemblers )
             {
             } );
@@ -142,5 +134,4 @@
             }
         }
     }
-
 }
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java
index c83356a..730fbdc 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java
@@ -38,13 +38,12 @@
 import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.assembly.MemoryEntityStoreAssembler;
 import org.apache.polygene.index.rdf.assembly.RdfNativeSesameStoreAssembler;
-import org.apache.polygene.index.rdf.indexing.RdfIndexingService;
+import org.apache.polygene.index.rdf.indexing.RdfIndexerService;
 import org.apache.polygene.index.rdf.query.SesameExpressions;
 import org.apache.polygene.library.rdf.repository.NativeConfiguration;
 import org.apache.polygene.test.EntityTestAssembler;
@@ -136,7 +135,7 @@
         application = polygene.newApplication( this );
         module = application.findModule( LAYER_DOMAIN, MODULE_DOMAIN );
         application.activate();
-        indexingDataDir = module.findService( RdfIndexingService.class ).get().dataDir();
+        indexingDataDir = module.findService( RdfIndexerService.class ).get().dataDir();
         uowf = module.unitOfWorkFactory();
     }
 
@@ -160,7 +159,6 @@
 
     @Override
     public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-        throws AssemblyException
     {
         ApplicationAssembly applicationAssembly = applicationFactory.newApplicationAssembly();
         LayerAssembly infra = createInfrastructureLayer( applicationAssembly );
@@ -277,7 +275,6 @@
     }
 
     private LayerAssembly createDomainLayer( ApplicationAssembly applicationAssembly )
-        throws AssemblyException
     {
         LayerAssembly domainLayer = applicationAssembly.layer( LAYER_DOMAIN );
         ModuleAssembly domainModule = domainLayer.module( MODULE_DOMAIN );
@@ -288,7 +285,6 @@
     }
 
     private LayerAssembly createInfrastructureLayer( ApplicationAssembly applicationAssembly )
-        throws AssemblyException
     {
         LayerAssembly infrastructureLayer = applicationAssembly.layer( LAYER_INFRASTRUCTURE );
 
@@ -305,7 +301,6 @@
     }
 
     private LayerAssembly createConfigurationLayer( ApplicationAssembly applicationAssembly )
-        throws AssemblyException
     {
         LayerAssembly layer = applicationAssembly.layer( LAYER_CONFIGURATION );
         ModuleAssembly configModule = layer.module( MODULE_CONFIG );
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/CompositeCreationPerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/CompositeCreationPerformanceTest.java
index 449ecf4..4007ece 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/CompositeCreationPerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/CompositeCreationPerformanceTest.java
@@ -23,8 +23,6 @@
 import org.apache.polygene.api.object.ObjectFactory;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 import org.apache.polygene.api.value.ValueComposite;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Test;
 
@@ -35,19 +33,15 @@
 {
     @Test
     public void newInstanceForRegisteredCompositePerformance()
-        throws ActivationException, AssemblyException, InterruptedException
+        throws ActivationException, InterruptedException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> {
                 module.transients( AnyComposite.class );
                 module.objects( AnyObject.class );
                 module.values( AnyValue.class );
             }
-        };
+        );
         int warmups = 10;
         int runs = 20;
         long waitBeforeRun = 1000;
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/InvocationPerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/InvocationPerformanceTest.java
index c63e33a..af606e2 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/InvocationPerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/InvocationPerformanceTest.java
@@ -20,15 +20,14 @@
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.text.NumberFormat;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.concern.ConcernOf;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 /**
  * Invocation performance test.
@@ -45,7 +44,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.transients( SimpleComposite.class );
         module.transients( SimpleWithTypedConcernComposite.class );
@@ -163,7 +161,7 @@
 
     public interface Simple
     {
-        public void test();
+        void test();
     }
 
     public static class SimpleMixin
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/PropertyMixinInvocationPerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/PropertyMixinInvocationPerformanceTest.java
index 7508fe2..368dbc3 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/PropertyMixinInvocationPerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/composite/PropertyMixinInvocationPerformanceTest.java
@@ -20,16 +20,15 @@
 
 import java.text.NumberFormat;
 import java.util.Locale;
-import org.junit.Test;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.State;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 /**
  * PropertyMixin invocation performance test.
@@ -42,7 +41,6 @@
 {
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.transients( SimpleComposite.class );
         module.transients( SimpleComposite2.class );
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/object/ObjectCreationPerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/object/ObjectCreationPerformanceTest.java
index b995770..706a66c 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/object/ObjectCreationPerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/object/ObjectCreationPerformanceTest.java
@@ -18,12 +18,10 @@
 
 package org.apache.polygene.test.performance.runtime.object;
 
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.object.ObjectFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Test;
 
 /**
  * Tests performance of new object creation.
@@ -33,17 +31,9 @@
 
     @Test
     public void newInstanceForRegisteredObjectPerformance()
-        throws ActivationException, AssemblyException
+        throws ActivationException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.objects( AnyObject.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler( module -> module.objects( AnyObject.class ) );
         ObjectFactory objectFactory = assembler.module();
         for( int i = 0; i < 10; i++ )
         {
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/service/ServiceInvocationPerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/service/ServiceInvocationPerformanceTest.java
index c599f6e..118a39c 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/service/ServiceInvocationPerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/runtime/service/ServiceInvocationPerformanceTest.java
@@ -25,8 +25,6 @@
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.service.ServiceComposite;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 
 public class ServiceInvocationPerformanceTest
@@ -38,16 +36,12 @@
     public void testInjectService()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> {
                 module.services( ServiceInvocationPerformanceTest.MyServiceComposite.class );
                 module.objects( ServiceInvocationPerformanceTest.class );
             }
-        };
+        );
 
         assembly.module().injectTo( this );
 
@@ -80,12 +74,12 @@
     }
 
     @Mixins( NoopMixin.class )
-    public static interface MyServiceComposite
+    public interface MyServiceComposite
         extends ServiceInvocationPerformanceTest.MyService, ServiceComposite
     {
     }
 
-    public static interface MyService
+    public interface MyService
     {
         void test();
     }
diff --git a/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java b/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java
index 7ecdfd5..8ff97df 100644
--- a/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java
+++ b/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java
@@ -21,8 +21,6 @@
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.concern.ConcernOf;
@@ -30,16 +28,16 @@
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.sideeffect.SideEffectOf;
 import org.apache.polygene.api.sideeffect.SideEffects;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Assert;
+import org.junit.Test;
 
 
 public class ConcernsOnPropertyTest
     extends AbstractPolygeneTest
 {
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.transients( CarComposite.class );
     }
diff --git a/tools/src/docs/envisage.txt b/tools/envisage/src/docs/envisage.txt
similarity index 90%
rename from tools/src/docs/envisage.txt
rename to tools/envisage/src/docs/envisage.txt
index 4aecf37..dc411f2 100644
--- a/tools/src/docs/envisage.txt
+++ b/tools/envisage/src/docs/envisage.txt
@@ -23,6 +23,10 @@
 Envisage is a Swing based visualization tool for the Polygene™ Application model.
 Visualizations can be printed to PDFs.
 
+include::../../build/docs/buildinfo/artifact.txt[]
+
+It can be handy to run Envisage in development <<def-application-mode, Mode>> while working on assemblies.
+
 == Usage ==
 
 Envisage can be easily used directly and prior your Application activation:
@@ -33,7 +37,7 @@
 tag=envisage
 ----
 
-As you can see, Envisage operates on the ApplicationModel, this means that you
+As you can see, Envisage operates on the ApplicationDescriptor, this means that you
 can easily embed it in your own Applications too.
 
 From the sources you can run the `runEnvisageSample` or `runEnvisageSchoolSample` Gradle tasks
@@ -43,13 +47,8 @@
 
 image:tools-envisage-structure.png[width="800px"]
 
-image:tools-envisage-type.png[width="800px"]
+image:tools-envisage-stacked-collapsed.png[width="800px"]
 
 image:tools-envisage-stacked.png[width="800px"]
 
-image:tools-envisage-stacked-collapsed.png[width="800px"]
-
-== Embedd in your Application ==
-
-include::../../build/docs/buildinfo/artifact.txt[]
-
+image:tools-envisage-type.png[width="800px"]
diff --git a/tools/envisage/src/main/java/org/apache/polygene/envisage/Main.java b/tools/envisage/src/main/java/org/apache/polygene/envisage/Main.java
index 27521ce..9f4daba 100644
--- a/tools/envisage/src/main/java/org/apache/polygene/envisage/Main.java
+++ b/tools/envisage/src/main/java/org/apache/polygene/envisage/Main.java
@@ -22,7 +22,6 @@
 
 import org.apache.polygene.api.structure.ApplicationDescriptor;
 import org.apache.polygene.bootstrap.ApplicationAssembler;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 
 /**
@@ -32,15 +31,15 @@
 public class Main
 {
     public static void main( String[] args )
-        throws ClassNotFoundException, IllegalAccessException, InstantiationException, AssemblyException
+        throws ClassNotFoundException, IllegalAccessException, InstantiationException
     {
         String applicationAssemblerName = args[0];
         Class applicationAssemblerClass = Class.forName( applicationAssemblerName );
         ApplicationAssembler assembler = (ApplicationAssembler) applicationAssemblerClass.newInstance();
 
-        Energy4Java energy4Java = new Energy4Java();
+        Energy4Java polygene = new Energy4Java();
 
-        ApplicationDescriptor application = energy4Java.newApplicationModel( assembler );
+        ApplicationDescriptor application = polygene.newApplicationModel( assembler );
 
         new Envisage().run( application );
     }
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/EnvisageSchoolSample.java b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/EnvisageSchoolSample.java
index b89cf41..66fcec8 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/EnvisageSchoolSample.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/EnvisageSchoolSample.java
@@ -21,6 +21,7 @@
 package org.apache.polygene.envisage.school;
 
 import org.apache.polygene.api.structure.ApplicationDescriptor;
+import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.envisage.Envisage;
 
@@ -28,14 +29,11 @@
 {
     // START SNIPPET: envisage
     public static void main( String[] args )
-        throws Exception
     {
-        Energy4Java energy4Java = new Energy4Java();
-
-        ApplicationDescriptor applicationModel
-                              = energy4Java.newApplicationModel( new SchoolAssembler() );
-
-        new Envisage().run( applicationModel );
+        Energy4Java polygene = new Energy4Java();
+        ApplicationAssembler assembler = new SchoolAssembler();
+        ApplicationDescriptor descriptor = polygene.newApplicationModel( assembler );
+        new Envisage().run( descriptor );
     }
     // END SNIPPET: envisage
 }
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/SchoolAssembler.java b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/SchoolAssembler.java
index b9148af..475baf6 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/SchoolAssembler.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/SchoolAssembler.java
@@ -62,12 +62,12 @@
     private LayerAssembly createInfrastructureLayer( ApplicationAssembly appAssembly )
         throws AssemblyException
     {
-        LayerAssembly layerInfrastructure = appAssembly.layer( "Infrastructure" );
+        LayerAssembly layerInfrastructure = appAssembly.layer( "infrastructure" );
 
-        ModuleAssembly moduleMail = layerInfrastructure.module( "Mail" );
+        ModuleAssembly moduleMail = layerInfrastructure.module( "mail" );
         new MailServiceAssembler().assemble( moduleMail );
 
-        ModuleAssembly modulePersistence = layerInfrastructure.module( "Persistence" );
+        ModuleAssembly modulePersistence = layerInfrastructure.module( "persistence" );
         new PersistenceAssembler().assemble( modulePersistence );
 
         return layerInfrastructure;
@@ -100,7 +100,7 @@
     private LayerAssembly createUILayer( ApplicationAssembly appAssembly )
         throws AssemblyException
     {
-        LayerAssembly layerUI = appAssembly.layer( "UI" );
+        LayerAssembly layerUI = appAssembly.layer( "ui" );
 
         // Add admin
         ModuleAssembly moduleAdmin = layerUI.module( "admin" );
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
index e3bf5ce..10fa526 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
@@ -94,7 +94,7 @@
 
         private void createPerson( UnitOfWork uow, String personId, String firstName, String lastName )
         {
-            EntityBuilder<Person> person = uow.newEntityBuilder( Person.class, new StringIdentity( personId ) );
+            EntityBuilder<Person> person = uow.newEntityBuilder( Person.class, StringIdentity.identityOf( personId ) );
 
             PersonEntity.PersonState state = person.instanceFor( PersonEntity.PersonState.class );
             state.firstName().set( firstName );
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/persistence/PersistenceAssembler.java b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/persistence/PersistenceAssembler.java
index ffdab72..24a3094 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/persistence/PersistenceAssembler.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/infrastructure/persistence/PersistenceAssembler.java
@@ -24,7 +24,7 @@
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.index.rdf.RdfIndexingEngineService;
+import org.apache.polygene.index.rdf.RdfIndexingService;
 import org.apache.polygene.index.rdf.query.RdfQueryParserFactory;
 import org.apache.polygene.library.rdf.entity.EntityStateSerializer;
 import org.apache.polygene.library.rdf.entity.EntityTypeSerializer;
@@ -44,7 +44,7 @@
         module.services(
             MemoryEntityStoreService.class,
             // Query
-            RdfQueryParserFactory.class, RdfIndexingEngineService.class,
+            RdfQueryParserFactory.class, RdfIndexingService.class,
             MemoryRepositoryService.class
         ).visibleIn( application ).instantiateOnStartup();
     }
diff --git a/tools/generator-polygene/.gitignore b/tools/generator-polygene/.gitignore
new file mode 100644
index 0000000..dbd0a40
--- /dev/null
+++ b/tools/generator-polygene/.gitignore
@@ -0,0 +1 @@
+app/templates/buildtool/wrapper
\ No newline at end of file
diff --git a/tools/generator-polygene/app/index.js b/tools/generator-polygene/app/index.js
index e106698..9d220a7 100644
--- a/tools/generator-polygene/app/index.js
+++ b/tools/generator-polygene/app/index.js
@@ -28,6 +28,7 @@
 module.exports = generators.Base.extend(
     {
         constructor: function () {
+            console.log("WARNING!!!  This is BETA quality and likely to change drastically over time. "); // + JSON.stringify(arguments));
             generators.Base.apply(this, arguments);
 
             this.option('import-model', {
@@ -64,7 +65,7 @@
                 polygene.indexing = polygene.indexing ? polygene.indexing : null;
                 polygene.entitystore = polygene.entitystore ? polygene.entitystore : null;
                 polygene.caching = polygene.caching ? polygene.caching : null;
-                polygene.serialization = polygene.serialization ? polygene.serialization : null;
+                polygene.dbpool = polygene.dbpool === undefined ? "DBCP" : answers.dbpool;
             }
         },
 
@@ -125,6 +126,19 @@
                         },
                         {
                             type: 'list',
+                            name: 'dbpool',
+                            choices: [
+                                'BoneCP',
+                                'DBCP'
+                            ],
+                            message: 'Which connection pool do you want to use?',
+                            default: polygene.dbpool ? polygene.dbpool : "DBCP",
+                            when: function (answers) {
+                                return answers.entitystore.indexOf('SQL') > -1;
+                            }
+                        },
+                        {
+                            type: 'list',
                             name: 'indexing',
                             choices: [
                                 'Rdf',
@@ -148,17 +162,6 @@
                         },
                         {
                             type: 'list',
-                            name: 'serialization',
-                            choices: [
-                                'JavaxJson',
-                                'JavaxXml',
-                                'MessagePack'
-                            ],
-                            message: 'Which serialization system do you want to use?',
-                            default: polygene.serialization ? polygene.serialization : "JavaxJson"
-                        },
-                        {
-                            type: 'list',
                             name: 'metrics',
                             choices: [
                                 'None',
@@ -173,6 +176,7 @@
                             choices: [
                                 // 'alarms'
                                 // 'circuit breakers'
+                                'envisage',
                                 // 'file transactions'
                                 // 'logging'
                                 'jmx',
@@ -191,41 +195,54 @@
                         this.log('Entity Stores:', answers.entitystore);
                         this.log('Indexing:', answers.indexing);
                         this.log('Caching:', answers.caching);
-                        this.log('Serialization:', answers.serialization);
+                        this.log('Metrics:', answers.metrics);
                         this.log('Features:', answers.features);
-                        polygene = answers;
+                        polygene.name = answers.name;
+                        polygene.packageName = answers.packageName;
+                        polygene.applicationtype = answers.applicationtype;
+                        polygene.features = answers.features;
+                        polygene.indexing = answers.indexing;
+                        polygene.entitystore = answers.entitystore;
+                        polygene.dbpool = answers.dbpool === undefined ? "DBCP" : answers.dbpool;
+                        polygene.metrics = answers.metrics;
+                        polygene.caching = answers.caching;
                     }.bind(this)
                 );
             }
         },
 
         writing: function () {
-            polygene.version = polygeneVersion;
-            polygene.entitystoremodule = polygene.entitystore.toLowerCase();
-            if (polygene.entitystore === "DerbySQL") {
-                polygene.entitystoremodule = "sql";
-            }
-            if (polygene.entitystore === "H2SQL") {
-                polygene.entitystoremodule = "sql";
-            }
-            if (polygene.entitystore === "MySQL") {
-                polygene.entitystoremodule = "sql";
-            }
-            if (polygene.entitystore === "PostgreSQL") {
-                polygene.entitystoremodule = "sql";
-            }
-            if (polygene.entitystore === "SQLite") {
-                polygene.entitystoremodule = "sql";
-            }
-            assignFunctions(polygene);
-            polygene.javaPackageDir = polygene.packageName.replace(/[.]/g, '/');
-            polygene.ctx = this;
-            var app = require(__dirname + '/templates/' + polygene.applicationtype.replace(/ /g, '') + 'Application/app.js');
-            app.write(polygene);
-            var buildToolChain = require(__dirname + '/templates/buildtool/build.js');
-            buildToolChain.write(polygene);
-            if (this.options.export) {
-                exportModel(this.options.export);
+            try {
+                polygene.version = polygeneVersion;
+                polygene.entitystoremodule = polygene.entitystore.toLowerCase();
+                if (polygene.entitystore === "DerbySQL") {
+                    polygene.entitystoremodule = "sql";
+                }
+                if (polygene.entitystore === "H2SQL") {
+                    polygene.entitystoremodule = "sql";
+                }
+                if (polygene.entitystore === "MySQL") {
+                    polygene.entitystoremodule = "sql";
+                }
+                if (polygene.entitystore === "PostgreSQL") {
+                    polygene.entitystoremodule = "sql";
+                }
+                if (polygene.entitystore === "SQLite") {
+                    polygene.entitystoremodule = "sql";
+                }
+                assignFunctions(polygene);
+                polygene.javaPackageDir = polygene.packageName.replace(/[.]/g, '/');
+                polygene.ctx = this;
+                var app = require(__dirname + '/templates/' + polygene.applicationtype.replace(/ /g, '') + 'Application/app.js');
+                app.write(polygene);
+                var buildToolChain = require(__dirname + '/templates/buildtool/build.js');
+                buildToolChain.write(polygene);
+                if (this.options.export) {
+                    exportModel(this.options.export);
+                }
+            } catch (exception) {
+                console.log(exception);
+                throw exception;
             }
         }
     }
@@ -260,16 +277,50 @@
         return polygene.features.indexOf(feature) >= 0;
     };
 
+    polygene.copyToConfig = function (ctx, from, toName) {
+        polygene.copyTemplate(ctx,
+            from,
+            'app/src/dist/config/development/' + toName);
+        polygene.copyTemplate(ctx,
+            from,
+            'app/src/dist/config/qa/' + toName);
+        polygene.copyTemplate(ctx,
+            from,
+            'app/src/dist/config/staging/' + toName);
+        polygene.copyTemplate(ctx,
+            from,
+            'app/src/dist/config/production/' + toName);
+        polygene.copyTemplate(ctx,
+            from,
+            'app/src/test/resources/' + toName);
+    };
+
     polygene.copyTemplate = function (ctx, from, to) {
-        ctx.fs.copyTpl(
-            ctx.templatePath(from),
-            ctx.destinationPath(to),
-            {
-                hasFeature: hasFeature,
-                firstUpper: firstUpper,
-                polygene: polygene
-            }
-        );
+        try {
+
+            ctx.fs.copyTpl(
+                ctx.templatePath(from),
+                ctx.destinationPath(to),
+                {
+                    hasFeature: hasFeature,
+                    firstUpper: firstUpper,
+                    polygene: polygene
+                }
+            );
+        } catch (exception) {
+            console.log("Unable to copy template: " + from + "\n", exception);
+        }
+    };
+
+    polygene.copyBinary = function (ctx, from, to) {
+
+        try {
+            ctx.fs.copy(
+                ctx.templatePath(from),
+                ctx.destinationPath(to));
+        } catch (exception) {
+            console.log("Unable to copy binary: " + from + " to " + to + "\n", exception);
+        }
     };
 
     polygene.copyPolygeneBootstrap = function (ctx, layer, moduleName, condition) {
@@ -320,12 +371,16 @@
         var state = [];
         var imported = {};
         var props = current.clazz.properties;
+        var idx;
+        var assoc;
         if (props) {
             imported["org.apache.polygene.api.property.Property"] = true;
-            for (var idx in props) {
-                var prop = props[idx];
-                state.push('Property' + '<' + polygene.typeNameOnly(prop.type) + "> " + prop.name + "();");
-                imported[prop.type] = true;
+            for (idx in props) {
+                if (props.hasOwnProperty(idx)) {
+                    var prop = props[idx];
+                    state.push('Property' + '<' + polygene.typeNameOnly(prop.type) + "> " + prop.name + "();");
+                    imported[prop.type] = true;
+                }
             }
         } else {
             imported["org.apache.polygene.api.property.Property"] = true;
@@ -334,76 +389,101 @@
         var assocs = current.clazz.associations;
         if (assocs) {
             imported["org.apache.polygene.api.association.Association"] = true;
-            for (var idx in assocs) {
-                var assoc = assocs[idx];
-                state.push("Association" + '<' + polygene.typeNameOnly(assoc.type) + "> " + assoc.name + "();");
-                imported[assoc.type] = true;
+            for (idx in assocs) {
+                if (assocs.hasOwnProperty(idx)) {
+                    assoc = assocs[idx];
+                    state.push("Association" + '<' + polygene.typeNameOnly(assoc.type) + "> " + assoc.name + "();");
+                    imported[assoc.type] = true;
+                }
             }
         }
         assocs = current.clazz.manyassociations;
         if (assocs) {
             imported["org.apache.polygene.api.association.ManyAssociation"] = true;
-            for (var idx in assocs) {
-                var assoc = assocs[idx];
-                state.push("ManyAssociation<" + polygene.typeNameOnly(assoc.type) + "> " + assoc.name + "();");
-                imported[assoc.type] = true;
+            for (idx in assocs) {
+                if (assocs.hasOwnProperty(idx)) {
+                    assoc = assocs[idx];
+                    state.push("ManyAssociation<" + polygene.typeNameOnly(assoc.type) + "> " + assoc.name + "();");
+                    imported[assoc.type] = true;
+                }
             }
         }
         assocs = current.clazz.namedassociations;
         if (assocs) {
             imported["org.apache.polygene.api.association.NamedAssociation"] = true;
-            for (var idx in assocs) {
-                var assoc = assocs[idx];
-                state.push("NamedAssociation<" + polygene.typeNameOnly(assoc.type) + "> " + assoc.name + "();");
-                imported[assoc.type] = true;
+            for (idx in assocs) {
+                if (assocs.hasOwnProperty(idx)) {
+                    assoc = assocs[idx];
+                    state.push("NamedAssociation<" + polygene.typeNameOnly(assoc.type) + "> " + assoc.name + "();");
+                    imported[assoc.type] = true;
+                }
             }
         }
         current.state = state;
         current.imported = imported;
     };
 
-    polygene.prepareConfigClazz = function (current) {
+    polygene.prepareConfigClazz = function (currentModule, composite) {
         var state = [];
-        var yaml = [];
+        var propertyFile = [];
         var imported = {};
-        var props = current.clazz.configuration;
+        var props = composite.configuration;
         if (props) {
             imported["org.apache.polygene.api.property.Property"] = true;
             for (var idx in props) {
-                var prop = props[idx];
-                state.push('Property' + '<' + polygene.typeNameOnly(prop.type) + "> " + prop.name + "();");
-                imported[prop.type] = true;
-                var yamlDefault;
-                if (prop.type === "java.lang.String") {
-                    yamlDefault = '""';
+                if (props.hasOwnProperty(idx)) {
+                    var prop = props[idx];
+                    imported[prop.type] = true;
+                    var propertyDefault;
+                    if (prop.default !== undefined) {
+                        propertyDefault = prop.default;
+                    } else {
+                        if (prop.type === "java.lang.String") {
+                            propertyDefault = '';
+                        }
+                        else if (prop.type === "java.lang.Boolean") {
+                            propertyDefault = 'false';
+                        }
+                        else if (prop.type === "java.lang.Long") {
+                            propertyDefault = '0';
+                        }
+                        else if (prop.type === "java.lang.Integer") {
+                            propertyDefault = '0';
+                        }
+                        else if (prop.type === "java.lang.Double") {
+                            propertyDefault = '0.0';
+                        }
+                        else if (prop.type === "java.lang.Float") {
+                            propertyDefault = '0.0';
+                        }
+                        else {
+                            propertyDefault = '\n    # TODO: complex configuration type. ';
+                        }
+                    }
+                    state.push("/**");
+                    for (var idxDesc in prop.description) {
+                        if (prop.description.hasOwnProperty(idxDesc)) {
+                            var desc = prop.description[idxDesc];
+                            propertyFile.push("# " + desc);
+                            state.push(" * " + desc)
+                        }
+                    }
+                    state.push(" */");
+                    propertyFile.push(prop.name + "=" + propertyDefault + "\n");
+                    state.push('Property' + '<' + polygene.typeNameOnly(prop.type) + "> " + prop.name + "();\n");
                 }
-                else if (prop.type === "java.lang.Boolean") {
-                    yamlDefault = 'false';
-                }
-                else if (prop.type === "java.lang.Long") {
-                    yamlDefault = '0';
-                }
-                else if (prop.type === "java.lang.Integer") {
-                    yamlDefault = '0';
-                }
-                else if (prop.type === "java.lang.Double") {
-                    yamlDefault = '0.0';
-                }
-                else if (prop.type === "java.lang.Float") {
-                    yamlDefault = '0.0';
-                }
-                else {
-                    yamlDefault = '\n    # TODO: complex configuration type. ';
-                }
-                yaml.push(prop.name + " : " + yamlDefault);
             }
         } else {
             imported["org.apache.polygene.api.property.Property"] = true;
-            state.push('Property<String> name();    // TODO: remove sample property');
-            yaml.push('name : "sample config value"');
+            state.push('/** TODO: remove sample property');
+            state.push(' */');
+            state.push('Property<String> name();');
+            propertyFile.push("# This is just the sample configuration value. ");
+            propertyFile.push("# TODO: Remove this config value ");
+            propertyFile.push('name=sample config value');
         }
-        current.state = state;
-        current.yaml = yaml;
-        current.imported = imported;
+        currentModule.state = state;
+        currentModule.propertyLines = propertyFile;
+        currentModule.imported = imported;
     };
 }
diff --git a/tools/generator-polygene/app/templates/CommandLineApplication/application.java.tmpl b/tools/generator-polygene/app/templates/CommandLineApplication/application.java.tmpl
new file mode 100644
index 0000000..3218593
--- /dev/null
+++ b/tools/generator-polygene/app/templates/CommandLineApplication/application.java.tmpl
@@ -0,0 +1,83 @@
+<%#
+ *  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 <%= polygene.packageName %>.app;
+
+import org.apache.polygene.api.structure.Application;
+import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
+
+import <%= polygene.packageName %>.bootstrap.<%= polygene.name %>Application;
+
+public class <%= polygene.name %>CommandLineApplication
+{
+    protected Application application;
+
+    private static final String NAME = "<%= polygene.name %>";
+    private static final String VERSION = "0.1";
+
+    public <%= polygene.name %>CommandLineApplication(String mode)
+        throws AssemblyException
+    {
+        createApplication(mode);
+    }
+
+    @Override
+    protected LayeredApplicationAssembler createApplicationAssembler( String mode )
+        throws AssemblyException
+    {
+        return new <%= polygene.name %>Application( NAME, VERSION, Application.Mode.valueOf( mode ));
+    }
+
+    private void createApplication( String mode )
+    {
+        try
+        {
+            LayeredApplicationAssembler assembler = createApplicationAssembler( mode );
+            assembler.initialize();
+            polygeneApplication = assembler.application();
+            setName( polygeneApplication.name() );
+        }
+        catch( Throwable e )
+        {
+            getLogger().log( Level.SEVERE, "Unable to start Polygene application.", e );
+            throw new InternalError( "Unable to start Polygene application.", e );
+        }
+    }
+
+    @Override
+    public void start()
+        throws Exception
+    {
+        application.activate();
+    }
+
+    @Override
+    public void stop()
+        throws Exception
+    {
+        application.passivate();
+    }
+
+    public static void main( String[] args )
+    {
+        <%= polygene.name %>CommandLineApplication app = new <%= polygene.name %>CommandLineApplication("development");
+        Runtime.getRuntime().addShutdownHook( new Thread( () -> app.stop() ) );
+        app.start();
+    }
+}
diff --git a/tools/generator-polygene/app/templates/CommandLineApplication/bootstrap.tmpl b/tools/generator-polygene/app/templates/CommandLineApplication/bootstrap.tmpl
new file mode 100644
index 0000000..8abe510
--- /dev/null
+++ b/tools/generator-polygene/app/templates/CommandLineApplication/bootstrap.tmpl
@@ -0,0 +1,49 @@
+<%#
+ *  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 <%= polygene.packageName %>.bootstrap;
+
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ApplicationAssembly;
+import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
+
+public class <%= polygene.name %>Application extends LayeredApplicationAssembler
+{
+    public <%= polygene.name %>Application( String name, String version, Application.Mode mode )
+        throws AssemblyException
+    {
+        super( name, version, mode );
+    }
+
+    @Override
+    protected void assembleLayers( ApplicationAssembly assembly )
+        throws AssemblyException
+    {
+        LayerAssembly config = this.createLayer( ConfigurationLayer.class );
+        ModuleAssembly configModule = assemblerOf( ConfigurationLayer.class ).configModule();
+        LayerAssembly infra = new InfrastructureLayer(configModule).assemble( assembly.layer( InfrastructureLayer.NAME ) );
+        LayerAssembly domain = this.createLayer( DomainLayer.class );
+        LayerAssembly ui = this.createLayer( UserInterfaceLayer.class );
+        ui.uses( domain );
+        domain.uses( infra );
+        infra.uses( config );
+    }
+}
diff --git a/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
index 7aee6a8..f6c9526 100644
--- a/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
@@ -29,10 +29,13 @@
 public class ConfigModule
     implements ModuleAssembler
 {
+    public static String NAME = "Configuration Module";
+
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
+        module.defaultServices();
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
         return module;
     }
diff --git a/tools/generator-polygene/app/templates/ConfigurationLayer/bootstrap.tmpl b/tools/generator-polygene/app/templates/ConfigurationLayer/bootstrap.tmpl
index d83ae32..b691118 100644
--- a/tools/generator-polygene/app/templates/ConfigurationLayer/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/ConfigurationLayer/bootstrap.tmpl
@@ -28,7 +28,7 @@
 public class ConfigurationLayer extends LayeredLayerAssembler
     implements LayerAssembler
 {
-    public static String NAME;
+    public static String NAME = "Configuration Layer";
     private ModuleAssembly configModule;
 
     @Override
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl
new file mode 100644
index 0000000..addab42
--- /dev/null
+++ b/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl
@@ -0,0 +1,103 @@
+<%#
+ *  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 <%= polygene.packageName %>.bootstrap.connectivity;
+
+import java.util.HashMap;
+<% if( hasFeature('security') ) { %>
+import java.io.File;
+import java.net.URL;
+import org.apache.polygene.library.http.SecureJettyConfiguration;
+import org.apache.polygene.library.http.SecureJettyServiceAssembler;
+import org.apache.polygene.library.shiro.web.assembly.HttpShiroAssembler;
+import org.apache.polygene.library.shiro.ini.ShiroIniConfiguration;
+<% } else { %>
+import org.apache.polygene.library.http.JettyConfiguration;
+import org.apache.polygene.library.http.JettyServiceAssembler;
+<% } %>
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.bootstrap.layered.ModuleAssembler;
+import org.apache.polygene.library.restlet.PolygeneServerServlet;
+
+import <%= polygene.packageName %>.rest.<%= polygene.name %>RestApplication;
+
+import static org.apache.polygene.library.http.Servlets.addServlets;
+import static org.apache.polygene.library.http.Servlets.serve;
+
+public class HttpServerModule
+    implements ModuleAssembler
+{<% if( hasFeature('security') ) { %>
+    private static final int DEFAULT_PORT = 8443;
+    public static final String KS_PASSWORD = "123456";  // TODO: Secure the key stores
+    public static final String SERVER_KEYSTORE_FILENAME = "security/keystore-<%= polygene.name.toLowerCase() %>.p12";
+    public static final String SERVER_KEYSTORE_TYPE = "PKCS12";
+    public static final String TRUSTSTORE_FILENAME = "security/keystore-<%= polygene.name.toLowerCase() %>.p12";
+    public static final String TRUSTSTORE_TYPE = "PKCS12";
+<% } else {
+%>    protected static final int DEFAULT_PORT = 8080;
+<% } %>
+    public static String NAME = "HTTP Server Module";
+
+    @Override
+    public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
+        throws AssemblyException
+    {
+<% if( hasFeature('security') ) {
+%>        new HttpShiroAssembler()
+            .withConfig( module, Visibility.module )
+            .assemble( module );
+        module.forMixin( ShiroIniConfiguration.class ).declareDefaults().iniResourcePath().set("classpath:web-shiro.ini");
+        new SecureJettyServiceAssembler()
+            .withConfig( module, Visibility.layer )
+            .visibleIn( Visibility.layer )
+            .assemble( module );
+        SecureJettyConfiguration defaults = module.forMixin( SecureJettyConfiguration.class ).declareDefaults();
+        URL keyStoreResource = getClass().getClassLoader().getResource( SERVER_KEYSTORE_FILENAME );
+        if( keyStoreResource != null )
+        {
+            defaults.keystorePath().set( keyStoreResource.toExternalForm() );
+        }
+        defaults.keystoreType().set( SERVER_KEYSTORE_TYPE );
+        defaults.keystorePassword().set( KS_PASSWORD );
+        URL trustStoreResource = getClass().getClassLoader().getResource( TRUSTSTORE_FILENAME );
+        if( trustStoreResource != null )
+        {
+            defaults.truststorePath().set( trustStoreResource.toExternalForm() );
+        }
+        defaults.truststoreType().set( TRUSTSTORE_TYPE );
+        defaults.truststorePassword().set( KS_PASSWORD );
+        defaults.wantClientAuth().set( Boolean.FALSE );
+<% } else {
+%>        new JettyServiceAssembler()
+            .withConfig( module, Visibility.layer )
+            .visibleIn( Visibility.layer )
+            .assemble( module );
+        JettyConfiguration defaults = module.forMixin( JettyConfiguration.class ).declareDefaults();
+<% } %>
+        defaults.hostName().set( System.getProperty( "<%= polygene.name.toLowerCase() %>.http.servername", "127.0.0.1" ));
+        defaults.port().set( DEFAULT_PORT );
+        HashMap<String, String> initParams = new HashMap<>();
+        initParams.put("org.restlet.application", <%= polygene.name %>RestApplication.class.getName() );
+        addServlets( serve( "/*" ).with(PolygeneServerServlet.class ).withInitParams( initParams ) ).to( module );
+        return module;
+    }
+}
diff --git a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java b/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/module.js
similarity index 70%
copy from core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
copy to tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/module.js
index cd32a3a..4d9835a 100644
--- a/core/api/src/main/java/org/apache/polygene/api/property/InitialValueProvider.java
+++ b/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/module.js
@@ -14,14 +14,16 @@
  *  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.polygene.api.property;
 
-import java.util.function.BiFunction;
-import org.apache.polygene.api.structure.Module;
+module.exports = {
 
-public interface InitialValueProvider extends BiFunction<Module, PropertyDescriptor, Object>
-{
-}
+    write: function (p) {
+        if (p.applicationtype === 'Rest API') {
+            p.copyTemplate(p.ctx,
+                'ConnectivityLayer/HttpServerModule/bootstrap.tmpl',
+                'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/connectivity/HttpServerModule.java');
+        }
+    }
+};
+
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/DefaultEnroler.tmpl b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/DefaultEnroler.tmpl
index 31d4588..806e006 100644
--- a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/DefaultEnroler.tmpl
+++ b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/DefaultEnroler.tmpl
@@ -19,8 +19,8 @@
 %>
 package <%= polygene.packageName %>.rest.security;
 
-import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.restlet.Application;
@@ -45,8 +45,9 @@
         org.restlet.security.User user = clientInfo.getUser();
         String name = user.getName();
         List<String> roleList = repository.findRoleNamesOfUser( name );
-        List<Role> restletRoles = new ArrayList<>();
-        roleList.stream().map( roleName -> Role.get( application, roleName ) );
+        List<Role> restletRoles = roleList.stream()
+                                          .map( roleName -> Role.get( application, roleName ) )
+                                          .collect( Collectors.toList() );
         clientInfo.setRoles( restletRoles );
     }
 }
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/NullEnroler.tmpl b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/NullEnroler.tmpl
deleted file mode 100644
index c24ddce..0000000
--- a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/NullEnroler.tmpl
+++ /dev/null
@@ -1,32 +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 <%= polygene.packageName %>.rest.security;
-
-import org.restlet.data.ClientInfo;
-import org.restlet.security.Enroler;
-
-public class NullEnroler
-    implements Enroler
-{
-    @Override
-    public void enrole( ClientInfo clientInfo )
-    {
-    }
-}
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/NullVerifier.tmpl b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/NullVerifier.tmpl
deleted file mode 100644
index 5d6b349..0000000
--- a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/NullVerifier.tmpl
+++ /dev/null
@@ -1,34 +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 <%= polygene.packageName %>.rest.security;
-
-import org.restlet.security.SecretVerifier;
-import org.restlet.security.Verifier;
-
-public class NullVerifier extends SecretVerifier
-    implements Verifier
-{
-
-    @Override
-    public int verify( String user, char[] secret )
-    {
-        return RESULT_VALID;
-    }
-}
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/bootstrap.tmpl
index 0594546..daa6755 100644
--- a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/bootstrap.tmpl
@@ -18,14 +18,12 @@
  *
 -%>
 package <%= polygene.packageName %>.bootstrap.connectivity;
-
 <% if( hasFeature('security') ) { %>
 import <%= polygene.packageName %>.rest.security.DefaultEnroler;
 import <%= polygene.packageName %>.rest.security.DefaultVerifier;
-<% } else { %>
-import <%= polygene.packageName %>.rest.security.NullEnroler;
-import <%= polygene.packageName %>.rest.security.NullVerifier;
 <% } %>
+import <%= polygene.packageName %>.rest.<%= polygene.name %>RestApplication;
+import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
@@ -44,10 +42,10 @@
     {
 <% if( hasFeature('security') ) { %>
         module.objects( DefaultVerifier.class, DefaultEnroler.class);
-<% } else {%>
-        module.objects( NullVerifier.class, NullEnroler.class);
 <% } %>
         new RestletCrudConnectivityAssembler().assemble( module );
+        module.objects( <%= polygene.name %>RestApplication.class )
+              .visibleIn( Visibility.layer );
         module.values( EntryPoint.class );
         module.values( /* add value types */   );
         module.services(  /* add services */  );
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/module.js b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/module.js
index 8d4ad47..91e8104 100644
--- a/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/module.js
+++ b/tools/generator-polygene/app/templates/ConnectivityLayer/RestApiModule/module.js
@@ -27,10 +27,6 @@
                 copyFile(p, "DefaultEnroler");
                 copyFile(p, "DefaultVerifier");
             }
-            else {
-                copyFile(p, "NullEnroler");
-                copyFile(p, "NullVerifier");
-            }
         }
     }
 };
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/bootstrap.tmpl b/tools/generator-polygene/app/templates/ConnectivityLayer/bootstrap.tmpl
index 5623b6f..325f3ea 100644
--- a/tools/generator-polygene/app/templates/ConnectivityLayer/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/ConnectivityLayer/bootstrap.tmpl
@@ -27,13 +27,14 @@
 public class ConnectivityLayer extends LayeredLayerAssembler
     implements LayerAssembler
 {
-    public static String NAME;
+    public static String NAME = "Connectivity Layer";
 
     @Override
     public LayerAssembly assemble( LayerAssembly layer )
         throws AssemblyException
     {
         createModule( layer, RestApiModule.class );
+        createModule( layer, HttpServerModule.class );
         return layer;
     }
 }
\ No newline at end of file
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Configuration.tmpl b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Configuration.tmpl
index b7acd94..e36bffb 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Configuration.tmpl
+++ b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Configuration.tmpl
@@ -18,6 +18,7 @@
  *
 -%>
 package <%= polygene.packageName %>.model.<%= polygene.current.name %>;
+
 <%
 for( var imp in polygene.current.imported ) {
     if( !imp.startsWith( "java.lang" )
@@ -26,10 +27,11 @@
 <%
     }
 } %>
-
 public interface <%= polygene.current.clazz.name %>
 {
-<% for( var idx in polygene.current.state ) {
-%>    <%- polygene.current.state[idx]; %>
-<% } %>
+<%
+for( var idx in polygene.current.state ) {
+%>
+    <%- polygene.current.state[idx]; %><%
 }
+%>}
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Crud.tmpl b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Crud.tmpl
index 60d7528..f77ec6d 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Crud.tmpl
+++ b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Crud.tmpl
@@ -19,6 +19,7 @@
 -%>
 package <%= polygene.packageName %>.model.<%= polygene.current.name %>;
 
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
 <%
@@ -31,7 +32,7 @@
 } %>
 
 @Mixins( { <%= polygene.current.clazz.name %>.Mixin.class } )
-public interface <%= polygene.current.clazz.name %>
+public interface <%= polygene.current.clazz.name %> extends HasIdentity
 {
     interface State
     {
@@ -40,11 +41,11 @@
 <% }
 %>    }
 
-    class Mixin
+    abstract class Mixin
         implements <%= polygene.current.clazz.name %>
     {
         @This
-        private State state;        // Sample reference to hidden property
+        private State state;        // Reference to private State instance
 
     }
 }
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Entity.tmpl b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Entity.tmpl
index 60d7528..f77ec6d 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Entity.tmpl
+++ b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/Entity.tmpl
@@ -19,6 +19,7 @@
 -%>
 package <%= polygene.packageName %>.model.<%= polygene.current.name %>;
 
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
 <%
@@ -31,7 +32,7 @@
 } %>
 
 @Mixins( { <%= polygene.current.clazz.name %>.Mixin.class } )
-public interface <%= polygene.current.clazz.name %>
+public interface <%= polygene.current.clazz.name %> extends HasIdentity
 {
     interface State
     {
@@ -40,11 +41,11 @@
 <% }
 %>    }
 
-    class Mixin
+    abstract class Mixin
         implements <%= polygene.current.clazz.name %>
     {
         @This
-        private State state;        // Sample reference to hidden property
+        private State state;        // Reference to private State instance
 
     }
 }
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/bootstrap.tmpl
index 092d683..d23b640 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/bootstrap.tmpl
@@ -23,6 +23,7 @@
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
+import org.apache.polygene.library.restlet.assembly.RestletCrudModuleAssembler;
 
 <% for( var idx in polygene.current.cruds) {
 %><%= "import " + polygene.packageName + ".model." + polygene.current.name + "." + polygene.current.cruds[idx].name + ";" %>
@@ -54,8 +55,7 @@
 <%
 } %>
 
-import static org.apache.polygene.api.common.Visibility.layer;
-import static org.apache.polygene.api.common.Visibility.application;
+import static org.apache.polygene.api.common.Visibility.*;
 
 public class <%- firstUpper(polygene.current.name) %>Module
     implements ModuleAssembler
@@ -69,8 +69,8 @@
     for( var value in polygene.current.cruds ) {
         var crud = polygene.current.cruds[value];
 %>
-        <%- "module.values( " + crud.name + ".class )" + (crud.visibility ? ".visibleIn(" + crud.visibility +")" : "" ) %>;
-        <%- "module.entities( " + crud.name + ".class )" + (crud.visibility ? ".visibleIn(" + crud.visibility +")" : "" ) %>;
+        new RestletCrudModuleAssembler( <%- crud.name %>.class )
+            .assemble( module );
 <%
     }
 }
@@ -78,7 +78,7 @@
     for( var value in polygene.current.values ) {
         var v = polygene.current.values[value];
 %>
-        <%- "module.values( " + v.name + ".class )" + (v.visibility ? ".visibleIn(" + v.visibility +")" : "" ) %>;
+        <%- "module.values( " + v.name + ".class )" + (v.visibility ? ".visibleIn(" + v.visibility +" )" : "" ) %>;
 <%
     }
 }
@@ -86,7 +86,7 @@
     for( var value in polygene.current.entities ) {
         var entity = polygene.current.entities[value];
 %>
-        <%- "module.entities( " + entity.name + ".class )" + (entity.visibility ? ".visibleIn(" + entity.visibility +")" : "" ) %>;
+        <%- "module.entities( " + entity.name + ".class )" + (entity.visibility ? ".visibleIn( " + entity.visibility +" )" : "" ) %>;
 <%
     }
 }
@@ -94,7 +94,7 @@
     for( var value in polygene.current.transients ) {
         var trans = polygene.current.transients[value];
 %>
-        <%- "module.transients( " + trans.name + ".class )" + (trans.visibility ? ".visibleIn(" + trans.visibility +")" : "" ) %>;
+        <%- "module.transients( " + trans.name + ".class )" + (trans.visibility ? ".visibleIn( " + trans.visibility +" )" : "" ) %>;
 <%
     }
 }
@@ -102,7 +102,7 @@
     for( var value in polygene.current.objects ) {
         var obj = polygene.current.objects[value];
 %>
-        <%- "module.objects( " + obj.name + ".class )" + (obj.visibility ? ".visibleIn(" + obj.visibility +")" : "" ) %>;
+        <%- "module.objects( " + obj.name + ".class )" + (obj.visibility ? ".visibleIn( " + obj.visibility +" )" : "" ) %>;
 <%
     }
 }
@@ -110,8 +110,11 @@
     for( var value in polygene.current.services ) {
         var service = polygene.current.services[value];
 %>
-        <%- "module.services( " + service.name + ".class )" + (service.visibility ? ".visibleIn(" + service.visibility + ")" : "" ) %>;
-        <%- "module.entities( " + polygene.configurationClassName(service.name) + ".class )" %>;
+        module.services( <%- service.name %>.class )
+            .identifiedBy("<%- service.name %>")
+        <%- (service.visibility ? "    .visibleIn( " + service.visibility + " )" : "" )
+%>;
+        <%- "module.configurations( " + polygene.configurationClassName(service.name) + ".class )" %>;
 <%
     }
 } %>
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.properties.tmpl
similarity index 89%
rename from tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl
rename to tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.properties.tmpl
index e2629d5..a20c784 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.yaml.tmpl
+++ b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/config.properties.tmpl
@@ -17,7 +17,6 @@
  *
  *
 -%>
--
-<% for( var idx in polygene.current.yaml ) {
-%>    <%- polygene.current.yaml[idx]; %>
+<% for( var idx in polygene.current.propertyLines ) {
+%><%- polygene.current.propertyLines[idx]; %>
 <% } %>
diff --git a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/module.js b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/module.js
index 8855bc3..4051cf7 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/DomainModule/module.js
+++ b/tools/generator-polygene/app/templates/DomainLayer/DomainModule/module.js
@@ -49,7 +49,7 @@
     copyComposites(p, moduleDef.plainTypes, "Plain");
     copyComposites(p, moduleDef.services, "Configuration");
 
-    copyConfigurationYaml(p, moduleDef.services )
+    copyConfigurationPropertiesFile(p, moduleDef.services )
 }
 
 function copyComposites(p, composites, type) {
@@ -57,7 +57,9 @@
         if (composites.hasOwnProperty(idx)) {
             if( type === "Configuration"){
                 p.current.clazz.name = p.configurationClassName(composites[idx].name);
-                p.prepareConfigClazz(p.current);
+                delete p.current.type;
+                delete p.current.value;
+                p.prepareConfigClazz(p.current, composites[idx]);
             } else {
                 p.current.clazz = composites[idx];
                 p.prepareClazz(p.current);
@@ -69,14 +71,14 @@
     }
 }
 
-function copyConfigurationYaml(p, composites) {
+function copyConfigurationPropertiesFile(p, composites) {
     for (var idx in composites) {
         if (composites.hasOwnProperty(idx)) {
             p.current.clazz = composites[idx];
             p.prepareClazz(p.current);
-            p.copyTemplate(p.ctx,
-                'DomainLayer/DomainModule/config.yaml.tmpl',
-                'model/src/main/resources/' + p.javaPackageDir + '/model/' + p.current.name + '/' + p.current.clazz.name + '.yaml');
+            var configurationFile = 'DomainLayer/DomainModule/config.properties.tmpl';
+            var destFileName = p.current.clazz.name + '.properties';
+            p.copyToConfig(p.ctx,configurationFile, destFileName);
         }
     }
 }
diff --git a/tools/generator-polygene/app/templates/DomainLayer/JmxModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/DomainLayer/JmxModule/bootstrap.tmpl
index e0f3ade..b53529f 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/JmxModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/DomainLayer/JmxModule/bootstrap.tmpl
@@ -17,14 +17,12 @@
  *
  *
 -%>
-package <%= polygene.packageName %>.bootstrap.config;
+package <%= polygene.packageName %>.bootstrap.domain;
 
-import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.library.jmx.JMXAssembler;
 import org.apache.polygene.library.jmx.JMXConnectorService;
 import org.apache.polygene.library.jmx.JMXConnectorConfiguration;
@@ -38,7 +36,7 @@
     {
         new JMXAssembler().assemble( module );
         module.services( JMXConnectorService.class ).instantiateOnStartup();
-        module.entities( JMXConnectorConfiguration.class );
+        module.configurations( JMXConnectorConfiguration.class );
         module.forMixin( JMXConnectorConfiguration.class ).declareDefaults().port().set( 1099 );
         return module;
     }
diff --git a/tools/generator-polygene/app/templates/DomainLayer/SecurityModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/DomainLayer/SecurityModule/bootstrap.tmpl
index e60c563..5f420a0 100644
--- a/tools/generator-polygene/app/templates/DomainLayer/SecurityModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/DomainLayer/SecurityModule/bootstrap.tmpl
@@ -24,11 +24,6 @@
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.library.shiro.assembly.PasswordDomainAssembler;
-import org.apache.polygene.library.shiro.assembly.PermissionsDomainAssembler;
-import org.apache.polygene.library.shiro.assembly.StandaloneShiroAssembler;
-import org.apache.polygene.library.shiro.ini.ShiroIniConfiguration;
-import <%= polygene.packageName %>.model.security.RealmService;
 import <%= polygene.packageName %>.model.security.SecurityRepository;
 import <%= polygene.packageName %>.model.security.User;
 import <%= polygene.packageName %>.model.security.UserFactory;
@@ -46,21 +41,6 @@
             .visibleIn( Visibility.application )
             .instantiateOnStartup();
 
-        new StandaloneShiroAssembler()
-            .withConfig( module, Visibility.layer )
-            .assemble( module );
-        module.services( RealmService.class );
-
-        module.forMixin( ShiroIniConfiguration.class )
-            .declareDefaults()
-            .iniResourcePath().set( "classpath:standalone-shiro.ini" );
-
-        new PasswordDomainAssembler()
-            .withConfig( module, Visibility.layer )
-            .assemble( module );
-
-        new PermissionsDomainAssembler().assemble( module );
-
         module.entities( User.class );
         module.services( UserFactory.class );
 
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/bootstrap.tmpl
index 6648c9f..8f902e9 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/bootstrap.tmpl
@@ -25,14 +25,20 @@
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
 import org.apache.polygene.index.<%- polygene.indexing.toLowerCase() %>.assembly.<%- polygene.indexing %>IndexingAssembler;
-
+<%
+if( polygene.indexing === 'SQL' ) {
+%>import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+<%
+}
+%>
 public class <%- polygene.indexing %>IndexingModule
     implements ModuleAssembler
 {
     public static final String NAME = "<%- polygene.indexing %> Indexing Module";
     private final ModuleAssembly configModule;
 
-    public <%- polygene.indexing %>IndexingModule( ModuleAssembly configModule )
+    <%- polygene.indexing %>IndexingModule( ModuleAssembly configModule )
     {
         this.configModule = configModule;
     }
@@ -41,7 +47,24 @@
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        new <%- polygene.indexing %>IndexingAssembler()
+<% if( polygene.indexing === 'SQL' ) {
+%>        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "postgres-index-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource (Only Postgresql was supported at the time of generation code was written.)
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "postgres-index-datasource-service" )
+            .identifiedBy( "ds-index-postgresql" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+<%
+}
+%>        new <%- polygene.indexing %>IndexingAssembler()
             .visibleIn( Visibility.application )
             .identifiedBy( "indexing-<%- polygene.indexing.toLowerCase() %>" )
             .withConfig( configModule, Visibility.application )
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/ds-index-postgresql.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/ds-index-postgresql.properties
new file mode 100644
index 0000000..4c6eb91
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/ds-index-postgresql.properties
@@ -0,0 +1,23 @@
+#
+#  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.
+
+
+enabled=true
+url=jdbc:postgresql://127.0.0.1:5432/<%= polygene.name.toLowerCase() %>
+driver=org.postgresql.Driver
+username=polygene
+password=ThisIsGreat!
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/index-rdf.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/index-rdf.properties
new file mode 100644
index 0000000..bec1996
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/index-rdf.properties
@@ -0,0 +1,57 @@
+#
+#  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.
+
+
+
+# Indexing strategy.
+# s = subject
+# p = predicate
+# o = object
+# c = context
+#
+# These are then combined in groups of "one each" such as "spoc" or "pocs".
+# Multiple groups can be given, in which case multiple indexs will be
+# maintained.
+#
+# This will heavily influence both indexing as well as query times, and one
+# should experiment for optimal performance.
+#
+#
+# @Matches( "([spoc][spoc][spoc][spoc],?)*" )
+# Default:
+#
+# tripleIndexes-
+
+# The location of storing the index.
+#
+# If the FileConfiguration service is available, then the location is set to
+#    fc.dataDirectory() + serviceIdentity
+#
+# Otherwise, if serviceIdentity is null or empty, the location is set to
+#    "./rdf/repositories/polygene"
+#
+# Otherwise, if serviceIdentity is a valid value, the location is set to
+#    "./rdf/repositories/" + serviceIdentity
+#
+#
+# Defaults: <see above>
+# dataDirectory=
+
+# Whether to wait for disk sync.
+#
+# Defaults: false
+# forceSync=
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/solr-schema.xml b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/solr-schema.xml
new file mode 100644
index 0000000..d7f70fb
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/solr-schema.xml
@@ -0,0 +1,606 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~  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.
+  ~
+  ~
+  -->
+<!--
+ This is the Solr schema file. This file should be named "schema.xml" and
+ should be in the conf directory under the solr home
+ (i.e. ./solr/conf/schema.xml by default)
+ or located where the classloader for the Solr webapp can find it.
+
+ This example schema is the recommended starting point for users.
+ It should be kept correct and concise, usable out-of-the-box.
+
+ For more information, on how to customize this file, please see
+ http://wiki.apache.org/solr/SchemaXml
+
+ PERFORMANCE NOTE: this schema includes many optional features and should not
+ be used for benchmarking.  To improve performance one could
+  - set stored="false" for all fields possible (esp large fields) when you
+    only need to search on the field but don't need to return the original
+    value.
+  - set indexed="false" if you don't need to search on the field, but only
+    return the field as a result of searching on other indexed fields.
+  - remove all unneeded copyField statements
+  - for best index size and searching performance, set "index" to false
+    for all general text fields, use copyField to copy them to the
+    catchall "text" field, and use that for searching.
+  - For maximum indexing performance, use the StreamingUpdateSolrServer
+    java client.
+  - Remember to run the JVM in server mode, and use a higher logging level
+    that avoids logging every request
+-->
+
+<schema name="solrtest" version="1.2">
+    <!-- attribute "name" is the name of this schema and is only used for display purposes.
+      Applications should change this to reflect the nature of the search collection.
+      version="1.2" is Solr's version number for the schema syntax and semantics.  It should
+      not normally be changed by applications.
+      1.0: multiValued attribute did not exist, all fields are multiValued by nature
+      1.1: multiValued attribute introduced, false by default
+      1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.
+    -->
+
+    <types>
+        <!-- field type definitions. The "name" attribute is
+           just a label to be used by field definitions.  The "class"
+           attribute and any other attributes determine the real
+           behavior of the fieldType.
+             Class names starting with "solr" refer to java classes in the
+           org.apache.solr.analysis package.
+        -->
+
+        <!-- The StrField type is not analyzed, but indexed/stored verbatim.
+           - StrField and TextField support an optional compressThreshold which
+           limits compression (if enabled in the derived fields) to values which
+           exceed a certain size (in characters).
+        -->
+        <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
+        <fieldType name="json" class="solr.StrField"/>
+
+        <!-- boolean type: "true" or "false" -->
+        <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
+        <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
+        <fieldtype name="binary" class="solr.BinaryField"/>
+
+        <!-- The optional sortMissingLast and sortMissingFirst attributes are
+             currently supported on types that are sorted internally as strings.
+               This includes "string","boolean","sint","slong","sfloat","sdouble","pdate"
+           - If sortMissingLast="true", then a sort on this field will cause documents
+             without the field to come after documents with the field,
+             regardless of the requested sort order (asc or desc).
+           - If sortMissingFirst="true", then a sort on this field will cause documents
+             without the field to come before documents with the field,
+             regardless of the requested sort order.
+           - If sortMissingLast="false" and sortMissingFirst="false" (the default),
+             then default lucene sorting will be used which places docs without the
+             field first in an ascending sort and last in a descending sort.
+        -->
+
+        <!--
+          Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
+        -->
+        <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+        <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true"
+                   positionIncrementGap="0"/>
+        <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+        <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true"
+                   positionIncrementGap="0"/>
+
+        <!--
+         Numeric field types that index each value at various levels of precision
+         to accelerate range queries when the number of values between the range
+         endpoints is large. See the javadoc for NumericRangeQuery for internal
+         implementation details.
+
+         Smaller precisionStep values (specified in bits) will lead to more tokens
+         indexed per value, slightly larger index size, and faster range queries.
+         A precisionStep of 0 disables indexing at different precision levels.
+        -->
+        <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+        <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true"
+                   positionIncrementGap="0"/>
+        <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+        <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true"
+                   positionIncrementGap="0"/>
+
+        <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
+           is a more restricted form of the canonical representation of dateTime
+           http://www.w3.org/TR/xmlschema-2/#dateTime
+           The trailing "Z" designates UTC time and is mandatory.
+           Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
+           All other components are mandatory.
+
+           Expressions can also be used to denote calculations that should be
+           performed relative to "NOW" to determine the value, ie...
+
+                 NOW/HOUR
+                    ... Round to the start of the current hour
+                 NOW-1DAY
+                    ... Exactly 1 day prior to now
+                 NOW/DAY+6MONTHS+3DAYS
+                    ... 6 months and 3 days in the future from the start of
+                        the current day
+
+           Consult the DateField javadocs for more information.
+
+           Note: For faster range queries, consider the tdate type
+        -->
+        <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
+
+        <!-- A Trie based date field for faster date range queries and date faceting. -->
+        <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
+
+
+        <!--
+          Note:
+          These should only be used for compatibility with existing indexes (created with older Solr versions)
+          or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
+
+          Plain numeric field types that store and index the text
+          value verbatim (and hence don't support range queries, since the
+          lexicographic ordering isn't equal to the numeric ordering)
+        -->
+        <fieldType name="pint" class="solr.IntField" omitNorms="true"/>
+        <fieldType name="plong" class="solr.LongField" omitNorms="true"/>
+        <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
+        <fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>
+        <fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
+
+
+        <!--
+          Note:
+          These should only be used for compatibility with existing indexes (created with older Solr versions)
+          or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
+
+          Numeric field types that manipulate the value into
+          a string value that isn't human-readable in its internal form,
+          but with a lexicographic ordering the same as the numeric ordering,
+          so that range queries work correctly.
+        -->
+        <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
+        <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
+        <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
+        <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
+
+
+        <!-- The "RandomSortField" is not used to store or search any
+            data.  You can declare fields of this type it in your schema
+            to generate pseudo-random orderings of your docs for sorting
+            purposes.  The ordering is generated based on the field name
+            and the version of the index, As long as the index version
+            remains unchanged, and the same field name is reused,
+            the ordering of the docs will be consistent.
+            If you want different psuedo-random orderings of documents,
+            for the same version of the index, use a dynamicField and
+            change the name
+        -->
+        <fieldType name="random" class="solr.RandomSortField" indexed="true"/>
+
+        <!-- solr.TextField allows the specification of custom text analyzers
+            specified as a tokenizer and a list of token filters. Different
+            analyzers may be specified for indexing and querying.
+
+            The optional positionIncrementGap puts space between multiple fields of
+            this type on the same document, with the purpose of preventing false phrase
+            matching across fields.
+
+            For more info on customizing your analyzer chain, please see
+            http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
+        -->
+
+        <!-- One can also specify an existing Analyzer class that has a
+             default constructor via the class attribute on the analyzer element
+        <fieldType name="text_greek" class="solr.TextField">
+          <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
+        </fieldType>
+        -->
+
+        <!-- A text field that only splits on whitespace for exact matching of words -->
+        <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
+            <analyzer>
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+            </analyzer>
+        </fieldType>
+
+        <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
+        words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
+        so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
+        Synonyms and stopwords are customized by external files, and stemming is enabled.
+        -->
+        <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
+            <analyzer type="index">
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!-- in this example, we will only use synonyms at query time
+                <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+                -->
+                <!-- Case insensitive stop word removal.
+                  add enablePositionIncrements=true in both the index and query
+                  analyzers to leave a 'gap' for more accurate phrase queries.
+                -->
+                <!--        <filter class="solr.StopFilterFactory"
+               ignoreCase="true"
+               words="stopwords.txt"
+               enablePositionIncrements="true"
+               /> -->
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
+                        catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+                <!--        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/> -->
+            </analyzer>
+            <analyzer type="query">
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!--        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> -->
+                <!--        <filter class="solr.StopFilterFactory"
+               ignoreCase="true"
+               words="stopwords.txt"
+               enablePositionIncrements="true"
+               /> -->
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
+                        catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+                <!--        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/> -->
+            </analyzer>
+        </fieldType>
+
+        <fieldType name="phone" class="solr.TextField" positionIncrementGap="100">
+            <analyzer type="index">
+                <tokenizer class="org.apache.polygene.index.solr.internal.SingleTokenTokenizerFactory"/>
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0"
+                        catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+            </analyzer>
+            <analyzer type="query">
+                <tokenizer class="org.apache.polygene.index.solr.internal.SingleTokenTokenizerFactory"/>
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0"
+                        catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+            </analyzer>
+        </fieldType>
+
+
+        <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
+but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
+        <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100">
+            <analyzer>
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!--        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
+            <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/> -->
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0"
+                        catenateWords="1" catenateNumbers="1" catenateAll="0"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+                <!--        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/> -->
+                <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
+         possible with WordDelimiterFilter in conjuncton with stemming. -->
+                <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+            </analyzer>
+        </fieldType>
+
+
+        <!-- A general unstemmed text field - good if one does not know the language of the field -->
+        <fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
+            <analyzer type="index">
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!--        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> -->
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
+                        catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+            </analyzer>
+            <analyzer type="query">
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!--        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+       <filter class="solr.StopFilterFactory"
+               ignoreCase="true"
+               words="stopwords.txt"
+               enablePositionIncrements="true"
+               /> -->
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
+                        catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+            </analyzer>
+        </fieldType>
+
+
+        <!-- A general unstemmed text field that indexes tokens normally and also
+           reversed (via ReversedWildcardFilterFactory), to enable more efficient
+       leading wildcard queries. -->
+        <fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
+            <analyzer type="index">
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!--        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> -->
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
+                        catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+                <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
+                        maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
+            </analyzer>
+            <analyzer type="query">
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!--        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+       <filter class="solr.StopFilterFactory"
+               ignoreCase="true"
+               words="stopwords.txt"
+               enablePositionIncrements="true"
+               /> -->
+                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
+                        catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+            </analyzer>
+        </fieldType>
+
+        <!-- charFilter + WhitespaceTokenizer  -->
+        <!--
+        <fieldType name="textCharNorm" class="solr.TextField" positionIncrementGap="100" >
+          <analyzer>
+            <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
+            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+          </analyzer>
+        </fieldType>
+        -->
+
+        <!-- This is an example of using the KeywordTokenizer along
+           With various TokenFilterFactories to produce a sortable field
+           that does not include some properties of the source text
+        -->
+        <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
+            <analyzer>
+                <!-- KeywordTokenizer does no actual tokenizing, so the entire
+                   input string is preserved as a single token
+                -->
+                <tokenizer class="solr.KeywordTokenizerFactory"/>
+                <!-- The LowerCase TokenFilter does what you expect, which can be
+                   when you want your sorting to be case insensitive
+                -->
+                <filter class="solr.LowerCaseFilterFactory"/>
+                <!-- The TrimFilter removes any leading or trailing whitespace -->
+                <filter class="solr.TrimFilterFactory"/>
+                <!-- The PatternReplaceFilter gives you the flexibility to use
+                   Java Regular expression to replace any sequence of characters
+                   matching a pattern with an arbitrary replacement string,
+                   which may include back references to portions of the original
+                   string matched by the pattern.
+
+                   See the Java Regular Expression documentation for more
+                   information on pattern and replacement string syntax.
+
+                   http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
+                -->
+                <filter class="solr.PatternReplaceFilterFactory"
+                        pattern="([^a-z])" replacement="" replace="all"
+                        />
+            </analyzer>
+        </fieldType>
+
+        <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField">
+            <analyzer>
+                <tokenizer class="solr.StandardTokenizerFactory"/>
+                <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
+            </analyzer>
+        </fieldtype>
+
+        <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField">
+            <analyzer>
+                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+                <!--
+               The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
+               a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f
+               Attributes of the DelimitedPayloadTokenFilterFactory :
+                "delimiter" - a one character delimiter. Default is | (pipe)
+            "encoder" - how to encode the following value into a playload
+               float -> org.apache.lucene.analysis.payloads.FloatEncoder,
+               integer -> o.a.l.a.p.IntegerEncoder
+               reference -> o.a.l.a.p.IdentityEncoder
+                   Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
+                -->
+                <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
+            </analyzer>
+        </fieldtype>
+
+        <!-- lowercases the entire field value, keeping it as a single token.  -->
+        <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
+            <analyzer>
+                <tokenizer class="solr.KeywordTokenizerFactory"/>
+                <filter class="solr.LowerCaseFilterFactory"/>
+            </analyzer>
+        </fieldType>
+
+
+        <!-- since fields of this type are by default not stored or indexed,
+any data added to them will be ignored outright.  -->
+        <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField"/>
+
+    </types>
+
+
+    <fields>
+        <!-- Valid attributes for fields:
+          name: mandatory - the name for the field
+          type: mandatory - the name of a previously defined type from the
+            <types> section
+          indexed: true if this field should be indexed (searchable or sortable)
+          stored: true if this field should be retrievable
+          compressed: [false] if this field should be stored using gzip compression
+            (this will only apply if the field type is compressable; among
+            the standard field types, only TextField and StrField are)
+          multiValued: true if this field may contain multiple values per document
+          omitNorms: (expert) set to true to omit the norms associated with
+            this field (this disables length normalization and index-time
+            boosting for the field, and saves some memory).  Only full-text
+            fields or fields that need an index-time boost need norms.
+          termVectors: [false] set to true to store the term vector for a
+            given field.
+            When using MoreLikeThis, fields used for similarity should be
+            stored for best performance.
+          termPositions: Store position information with the term vector.
+            This will increase storage costs.
+          termOffsets: Store offset information with the term vector. This
+            will increase storage costs.
+          default: a value that should be used if no value is specified
+            when adding a document.
+        -->
+
+        <!-- Standard entity fields -->
+        <field name="id" type="string" indexed="true" stored="true" required="true"/>
+        <field name="lastModified" type="date" indexed="true" stored="true" required="true"/>
+        <field name="type" type="string" indexed="true" stored="true" required="true"/>
+
+        <!-- Solr test lucene index fields. Replace this with application-specific fields -->
+        <field name="name" type="text" indexed="true" stored="true" multiValued="false"/>
+
+        <!--
+        <field name="sku" type="textTight" indexed="true" stored="true" omitNorms="true"/>
+        <field name="name" type="textgen" indexed="true" stored="true"/>
+        <field name="alphaNameSort" type="alphaOnlySort" indexed="true" stored="false"/>
+        <field name="manu" type="textgen" indexed="true" stored="true" omitNorms="true"/>
+        <field name="cat" type="text_ws" indexed="true" stored="true" multiValued="true" omitNorms="true" />
+        <field name="features" type="text" indexed="true" stored="true" multiValued="true"/>
+        <field name="includes" type="text" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
+
+        <field name="weight" type="float" indexed="true" stored="true"/>
+        <field name="price"  type="float" indexed="true" stored="true"/>
+        <field name="popularity" type="int" indexed="true" stored="true" />
+        <field name="inStock" type="boolean" indexed="true" stored="true" />
+        -->
+
+        <!-- Common metadata fields, named specifically to match up with
+          SolrCell metadata when parsing rich documents such as Word, PDF.
+          Some fields are multiValued only because Tika currently may return
+          multiple values for them.
+        -->
+        <!--
+        <field name="title" type="text" indexed="true" stored="true" multiValued="true"/>
+        <field name="subject" type="text" indexed="true" stored="true"/>
+        <field name="description" type="text" indexed="true" stored="true"/>
+        <field name="comments" type="text" indexed="true" stored="true"/>
+        <field name="author" type="textgen" indexed="true" stored="true"/>
+        <field name="keywords" type="textgen" indexed="true" stored="true"/>
+        <field name="category" type="textgen" indexed="true" stored="true"/>
+        <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
+        <field name="last_modified" type="date" indexed="true" stored="true"/>
+        <field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
+        -->
+
+        <!-- catchall field, containing all other searchable text fields (implemented
+via copyField further on in this schema  -->
+        <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
+
+        <!-- catchall text field that indexes tokens both normally and in reverse for efficient
+     leading wildcard queries. -->
+        <field name="text_rev" type="text_rev" indexed="true" stored="false" multiValued="true"/>
+
+        <!-- non-tokenized version of manufacturer to make it easier to sort or group
+results by manufacturer.  copied from "manu" via copyField -->
+        <!--<field name="manu_exact" type="string" indexed="true" stored="false"/> -->
+
+        <!-- <field name="payloads" type="payloads" indexed="true" stored="true"/> -->
+
+        <!-- Uncommenting the following will create a "timestamp" field using
+           a default value of "NOW" to indicate when each document was indexed.
+        -->
+        <!--
+      <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
+        -->
+
+
+        <!-- Dynamic field definitions.  If a field name is not found, dynamicFields
+will be used if the name matches any of the patterns.
+RESTRICTION: the glob-like pattern in the name attribute must have
+a "*" only at the start or the end.
+EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)
+Longer patterns will be matched first.  if equal size patterns
+both match, the first appearing in the schema will be used.  -->
+        <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
+        <dynamicField name="*_s" type="string" indexed="true" stored="true"/>
+        <dynamicField name="*_l" type="long" indexed="true" stored="true"/>
+        <dynamicField name="*_t" type="text" indexed="true" stored="true"/>
+        <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
+        <dynamicField name="*_f" type="float" indexed="true" stored="true"/>
+        <dynamicField name="*_d" type="double" indexed="true" stored="true"/>
+        <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
+
+        <!-- some trie-coded dynamic fields for faster range queries -->
+        <dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
+        <dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
+        <dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
+        <dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
+        <dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
+
+        <dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
+
+        <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
+        <dynamicField name="attr_*" type="textgen" indexed="true" stored="true" multiValued="true"/>
+
+        <dynamicField name="random_*" type="random"/>
+
+        <!-- uncomment the following to ignore any fields that don't already match an existing
+ field name or dynamic field, rather than reporting them as an error.
+ alternately, change the type="ignored" to some other type e.g. "text" if you want
+ unknown fields indexed and/or stored by default -->
+        <!--dynamicField name="*" type="ignored" multiValued="true" /-->
+
+    </fields>
+
+    <!-- Field to use to determine and enforce document uniqueness.
+       Unless this field is marked with required="false", it will be a required field
+    -->
+    <uniqueKey>id</uniqueKey>
+
+    <!-- field for the QueryParser to use when an explicit fieldname is absent -->
+    <defaultSearchField>text</defaultSearchField>
+
+    <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
+    <solrQueryParser defaultOperator="AND"/>
+
+    <!-- copyField commands copy one field to another at the time a document
+is added to the index.  It's used either to index the same field differently,
+or to add multiple fields to the same field for easier/faster searching.  -->
+
+    <copyField source="name" dest="text"/>
+
+    <!--
+    <copyField source="manu" dest="text"/>
+    <copyField source="features" dest="text"/>
+    <copyField source="includes" dest="text"/>
+    <copyField source="manu" dest="manu_exact"/>
+    -->
+    <!-- Above, multiple source fields are copied to the [text] field.
+       Another way to map multiple source fields to the same
+       destination field is to use the dynamic field syntax.
+       copyField also supports a maxChars to copy setting.  -->
+
+    <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
+
+    <!-- copy name to alphaNameSort, a field designed for sorting by name -->
+    <!-- <copyField source="name" dest="alphaNameSort"/> -->
+
+
+    <!-- Similarity is the scoring routine for each document vs. a query.
+A custom similarity may be specified here, but the default is fine
+for most applications.  -->
+    <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
+    <!-- ... OR ...
+         Specify a SimilarityFactory class name implementation
+         allowing parameters to be used.
+    -->
+    <!--
+    <similarity class="com.example.solr.CustomSimilarityFactory">
+      <str name="paramkey">param value</str>
+    </similarity>
+    -->
+
+
+</schema>
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/solrconfig.xml b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/solrconfig.xml
new file mode 100644
index 0000000..da20f58
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/indexing/solrconfig.xml
@@ -0,0 +1,1036 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~  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.
+  ~
+  ~
+  -->
+<!--
+     For more details about configurations options that may appear in this
+     file, see http://wiki.apache.org/solr/SolrConfigXml.
+
+     Specifically, the Solr Config can support XInclude, which may make it easier to manage
+     the configuration.  See https://issues.apache.org/jira/browse/SOLR-1167
+-->
+<config>
+  <!-- Set this to 'false' if you want solr to continue working after it has
+       encountered an severe configuration error.  In a production environment,
+       you may want solr to keep working even if one handler is mis-configured.
+
+       You may also set this to false using by setting the system property:
+         -Dsolr.abortOnConfigurationError=false
+     -->
+  <abortOnConfigurationError>false</abortOnConfigurationError>
+
+  <!-- lib directives can be used to instruct Solr to load an Jars identified
+       and use them to resolve any "plugins" specified in your solrconfig.xml or
+       schema.xml (ie: Analyzers, Request Handlers, etc...).
+
+       All directories and paths are resolved relative the instanceDir.
+
+       If a "./lib" directory exists in your instanceDir, all files found in it
+       are included as if you had used the following syntax...
+
+              <lib dir="./lib" />
+    -->
+  <!-- A dir option by itself adds any files found in the directory to the
+       classpath, this is useful for including all jars in a directory.
+    -->
+  <lib dir="../../contrib/extraction/lib" />
+  <!-- When a regex is specified in addition to a directory, only the files in that
+       directory which completely match the regex (anchored on both ends)
+       will be included.
+    -->
+  <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
+  <lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
+  <!-- If a dir option (with or without a regex) is used and nothing is found
+       that matches, it will be ignored
+    -->
+  <lib dir="../../contrib/clustering/lib/downloads/" />
+  <lib dir="../../contrib/clustering/lib/" />
+  <lib dir="/total/crap/dir/ignored" />
+  <!-- an exact path can be used to specify a specific file.  This will cause
+       a serious error to be logged if it can't be loaded.
+  <lib path="../a-jar-that-does-not-exist.jar" />
+  -->
+
+
+  <!-- Used to specify an alternate directory to hold all index data
+       other than the default ./data under the Solr home.
+       If replication is in use, this should match the replication configuration. -->
+  <!--<dataDir>./data</dataDir> -->
+
+
+  <!-- WARNING: this <indexDefaults> section only provides defaults for index writers
+       in general. See also the <mainIndex> section after that when changing parameters
+       for Solr's main Lucene index. -->
+  <indexDefaults>
+    <!-- Values here affect all index writers and act as a default unless overridden. -->
+    <useCompoundFile>false</useCompoundFile>
+
+    <mergeFactor>10</mergeFactor>
+    <!-- If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush
+     based on whichever limit is hit first.  -->
+    <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
+
+    <!-- Sets the amount of RAM that may be used by Lucene indexing
+      for buffering added documents and deletions before they are
+      flushed to the Directory.  -->
+    <ramBufferSizeMB>32</ramBufferSizeMB>
+    <!-- <maxMergeDocs>2147483647</maxMergeDocs> -->
+    <maxFieldLength>10000</maxFieldLength>
+    <writeLockTimeout>1000</writeLockTimeout>
+    <commitLockTimeout>10000</commitLockTimeout>
+
+    <!--
+     Expert: Turn on Lucene's auto commit capability.  This causes intermediate
+     segment flushes to write a new lucene index descriptor, enabling it to be
+     opened by an external IndexReader.  This can greatly slow down indexing
+     speed.  NOTE: Despite the name, this value does not have any relation to
+     Solr's autoCommit functionality
+     -->
+    <!--<luceneAutoCommit>false</luceneAutoCommit>-->
+
+    <!--
+     Expert: The Merge Policy in Lucene controls how merging is handled by
+     Lucene.  The default in 2.3 is the LogByteSizeMergePolicy, previous
+     versions used LogDocMergePolicy.
+
+     LogByteSizeMergePolicy chooses segments to merge based on their size.  The
+     Lucene 2.2 default, LogDocMergePolicy chose when to merge based on number
+     of documents
+
+     Other implementations of MergePolicy must have a no-argument constructor
+     -->
+    <!--<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy"/>-->
+
+    <!--
+     Expert:
+     The Merge Scheduler in Lucene controls how merges are performed.  The
+     ConcurrentMergeScheduler (Lucene 2.3 default) can perform merges in the
+     background using separate threads.  The SerialMergeScheduler (Lucene 2.2
+     default) does not.
+     -->
+    <!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-->
+
+
+    <!--
+      This option specifies which Lucene LockFactory implementation to use.
+
+      single = SingleInstanceLockFactory - suggested for a read-only index
+               or when there is no possibility of another process trying
+               to modify the index.
+      native = NativeFSLockFactory  - uses OS native file locking
+      simple = SimpleFSLockFactory  - uses a plain file for locking
+
+      (For backwards compatibility with Solr 1.2, 'simple' is the default
+       if not specified.)
+    -->
+    <lockType>native</lockType>
+    <!--
+     Expert:
+    Controls how often Lucene loads terms into memory -->
+    <!--<termIndexInterval>256</termIndexInterval>-->
+  </indexDefaults>
+
+  <mainIndex>
+    <!-- options specific to the main on-disk lucene index -->
+    <useCompoundFile>false</useCompoundFile>
+    <ramBufferSizeMB>32</ramBufferSizeMB>
+    <mergeFactor>10</mergeFactor>
+    <!-- Deprecated -->
+    <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
+    <!--<maxMergeDocs>2147483647</maxMergeDocs>-->
+
+    <!-- inherit from indexDefaults <maxFieldLength>10000</maxFieldLength> -->
+
+    <!-- If true, unlock any held write or commit locks on startup.
+         This defeats the locking mechanism that allows multiple
+         processes to safely access a lucene index, and should be
+         used with care.
+         This is not needed if lock type is 'none' or 'single'
+     -->
+    <unlockOnStartup>false</unlockOnStartup>
+
+    <!-- If true, IndexReaders will be reopened (often more efficient) instead
+         of closed and then opened.  -->
+    <reopenReaders>true</reopenReaders>
+
+    <!--
+     Expert:
+    Controls how often Lucene loads terms into memory.  Default is 128 and is likely good for most everyone. -->
+    <!--<termIndexInterval>256</termIndexInterval>-->
+
+    <!--
+        Custom deletion policies can specified here. The class must
+        implement org.apache.lucene.index.IndexDeletionPolicy.
+
+        http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/index/IndexDeletionPolicy.html
+
+        The standard Solr IndexDeletionPolicy implementation supports deleting
+        index commit points on number of commits, age of commit point and
+        optimized status.
+
+        The latest commit point should always be preserved regardless
+        of the criteria.
+    -->
+    <deletionPolicy class="solr.SolrDeletionPolicy">
+      <!-- The number of commit points to be kept -->
+      <str name="maxCommitsToKeep">1</str>
+      <!-- The number of optimized commit points to be kept -->
+      <str name="maxOptimizedCommitsToKeep">0</str>
+      <!--
+          Delete all commit points once they have reached the given age.
+          Supports DateMathParser syntax e.g.
+
+          <str name="maxCommitAge">30MINUTES</str>
+          <str name="maxCommitAge">1DAY</str>
+      -->
+    </deletionPolicy>
+
+    <!--  To aid in advanced debugging, you may turn on IndexWriter debug logging.
+      Setting to true will set the file that the underlying Lucene IndexWriter
+      will write its debug infostream to.  -->
+    <infoStream file="INFOSTREAM.txt">false</infoStream>
+
+  </mainIndex>
+
+  <!--	Enables JMX if and only if an existing MBeanServer is found, use this
+    if you want to configure JMX through JVM parameters. Remove this to disable
+    exposing Solr configuration and statistics to JMX.
+
+		If you want to connect to a particular server, specify the agentId
+		e.g. <jmx agentId="myAgent" />
+
+		If you want to start a new MBeanServer, specify the serviceUrl
+		e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
+
+		For more details see http://wiki.apache.org/solr/SolrJmx
+  -->
+  <jmx />
+
+  <!-- the default high-performance update handler -->
+  <updateHandler class="solr.DirectUpdateHandler2">
+    <!-- A prefix of "solr." for class names is an alias that
+         causes solr to search appropriate packages, including
+         org.apache.solr.(search|update|request|core|analysis)
+     -->
+
+    <!-- Perform a <commit/> automatically under certain conditions:
+         maxDocs - number of updates since last commit is greater than this
+         maxTime - oldest uncommited update (in ms) is this long ago
+         Instead of enabling autoCommit, consider using "commitWithin"
+         when adding documents. http://wiki.apache.org/solr/UpdateXmlMessages
+    <autoCommit>
+      <maxDocs>10000</maxDocs>
+      <maxTime>1000</maxTime>
+    </autoCommit>
+    -->
+
+
+    <!-- The RunExecutableListener executes an external command from a
+      hook such as postCommit or postOptimize.
+         exe - the name of the executable to run
+         dir - dir to use as the current working directory. default="."
+         wait - the calling thread waits until the executable returns. default="true"
+         args - the arguments to pass to the program.  default=nothing
+         env - environment variables to set.  default=nothing
+      -->
+    <!-- A postCommit event is fired after every commit or optimize command
+    <listener event="postCommit" class="solr.RunExecutableListener">
+      <str name="exe">solr/bin/snapshooter</str>
+      <str name="dir">.</str>
+      <bool name="wait">true</bool>
+      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
+      <arr name="env"> <str>MYVAR=val1</str> </arr>
+    </listener>
+    -->
+    <!-- A postOptimize event is fired only after every optimize command
+    <listener event="postOptimize" class="solr.RunExecutableListener">
+      <str name="exe">snapshooter</str>
+      <str name="dir">solr/bin</str>
+      <bool name="wait">true</bool>
+    </listener>
+    -->
+
+  </updateHandler>
+
+  <!-- Use the following format to specify a custom IndexReaderFactory - allows for alternate
+       IndexReader implementations.
+
+       ** Experimental Feature **
+       Please note - Using a custom IndexReaderFactory may prevent certain other features
+       from working. The API to IndexReaderFactory may change without warning or may even
+       be removed from future releases if the problems cannot be resolved.
+
+       ** Features that may not work with custom IndexReaderFactory **
+       The ReplicationHandler assumes a disk-resident index. Using a custom
+       IndexReader implementation may cause incompatibility with ReplicationHandler and
+       may cause replication to not work correctly. See SOLR-1366 for details.
+
+  <indexReaderFactory name="IndexReaderFactory" class="package.class">
+    Parameters as required by the implementation
+  </indexReaderFactory >
+  -->
+  <!-- To set the termInfosIndexDivisor, do this: -->
+  <!--<indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.StandardIndexReaderFactory">
+    <int name="termInfosIndexDivisor">12</int>
+  </indexReaderFactory >-->
+
+
+  <query>
+    <!-- Maximum number of clauses in a boolean query... in the past, this affected
+        range or prefix queries that expanded to big boolean queries - built in Solr
+        query parsers no longer create queries with this limitation.
+        An exception is thrown if exceeded.  -->
+    <maxBooleanClauses>1024</maxBooleanClauses>
+
+
+    <!-- There are two implementations of cache available for Solr,
+         LRUCache, based on a synchronized LinkedHashMap, and
+         FastLRUCache, based on a ConcurrentHashMap.  FastLRUCache has faster gets
+         and slower puts in single threaded operation and thus is generally faster
+         than LRUCache when the hit ratio of the cache is high (> 75%), and may be
+         faster under other scenarios on multi-cpu systems. -->
+    <!-- Cache used by SolrIndexSearcher for filters (DocSets),
+         unordered sets of *all* documents that match a query.
+         When a new searcher is opened, its caches may be prepopulated
+         or "autowarmed" using data from caches in the old searcher.
+         autowarmCount is the number of items to prepopulate.  For LRUCache,
+         the autowarmed items will be the most recently accessed items.
+       Parameters:
+         class - the SolrCache implementation LRUCache or FastLRUCache
+         size - the maximum number of entries in the cache
+         initialSize - the initial capacity (number of entries) of
+           the cache.  (seel java.util.HashMap)
+         autowarmCount - the number of entries to prepopulate from
+           and old cache.
+         -->
+    <filterCache
+        class="solr.FastLRUCache"
+        size="512"
+        initialSize="512"
+        autowarmCount="0"/>
+
+    <!-- Cache used to hold field values that are quickly accessible
+         by document id.  The fieldValueCache is created by default
+         even if not configured here.
+      <fieldValueCache
+        class="solr.FastLRUCache"
+        size="512"
+        autowarmCount="128"
+        showItems="32"
+      />
+    -->
+
+    <!-- queryResultCache caches results of searches - ordered lists of
+          document ids (DocList) based on a query, a sort, and the range
+          of documents requested.  -->
+    <queryResultCache
+        class="solr.LRUCache"
+        size="512"
+        initialSize="512"
+        autowarmCount="0"/>
+
+    <!-- documentCache caches Lucene Document objects (the stored fields for each document).
+         Since Lucene internal document ids are transient, this cache will not be autowarmed.  -->
+    <documentCache
+        class="solr.LRUCache"
+        size="512"
+        initialSize="512"
+        autowarmCount="0"/>
+
+    <!-- If true, stored fields that are not requested will be loaded lazily.
+      This can result in a significant speed improvement if the usual case is to
+      not load all stored fields, especially if the skipped fields are large
+      compressed text fields.
+    -->
+    <enableLazyFieldLoading>true</enableLazyFieldLoading>
+
+    <!-- Example of a generic cache.  These caches may be accessed by name
+         through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
+         The purpose is to enable easy caching of user/application level data.
+         The regenerator argument should be specified as an implementation
+         of solr.search.CacheRegenerator if autowarming is desired.  -->
+    <!--
+    <cache name="myUserCache"
+      class="solr.LRUCache"
+      size="4096"
+      initialSize="1024"
+      autowarmCount="1024"
+      regenerator="org.mycompany.mypackage.MyRegenerator"
+      />
+    -->
+
+    <!-- An optimization that attempts to use a filter to satisfy a search.
+          If the requested sort does not include score, then the filterCache
+          will be checked for a filter matching the query. If found, the filter
+          will be used as the source of document ids, and then the sort will be
+          applied to that.
+     <useFilterForSortedQuery>true</useFilterForSortedQuery>
+    -->
+
+    <!-- An optimization for use with the queryResultCache.  When a search
+          is requested, a superset of the requested number of document ids
+          are collected.  For example, if a search for a particular query
+          requests matching documents 10 through 19, and queryWindowSize is 50,
+          then documents 0 through 49 will be collected and cached.  Any further
+          requests in that range can be satisfied via the cache.  -->
+    <queryResultWindowSize>20</queryResultWindowSize>
+
+    <!-- Maximum number of documents to cache for any entry in the
+         queryResultCache. -->
+    <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
+
+    <!-- a newSearcher event is fired whenever a new searcher is being prepared
+      and there is a current searcher handling requests (aka registered).
+      It can be used to prime certain caches to prevent long request times for
+      certain requests.
+    -->
+    <!-- QuerySenderListener takes an array of NamedList and executes a
+         local query request for each NamedList in sequence. -->
+    <listener event="newSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <!--
+        <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
+        <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
+        <lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
+        -->
+      </arr>
+    </listener>
+
+    <!-- a firstSearcher event is fired whenever a new searcher is being
+         prepared but there is no current registered searcher to handle
+         requests or to gain autowarming data from.
+    <listener event="firstSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <lst> <str name="q">solr rocks</str><str name="start">0</str><str name="rows">10</str></lst>
+        <lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst>
+      </arr>
+    </listener> -->
+
+    <!-- If a search request comes in and there is no current registered searcher,
+         then immediately register the still warming searcher and use it.  If
+         "false" then all requests will block until the first searcher is done
+         warming. -->
+    <useColdSearcher>false</useColdSearcher>
+
+    <!-- Maximum number of searchers that may be warming in the background
+      concurrently.  An error is returned if this limit is exceeded. Recommend
+      1-2 for read-only slaves, higher for masters w/o cache warming. -->
+    <maxWarmingSearchers>2</maxWarmingSearchers>
+
+  </query>
+
+  <!--
+    Let the dispatch filter handler /select?qt=XXX
+    handleSelect=true will use consistent error handling for /select and /update
+    handleSelect=false will use solr1.1 style error formatting
+    -->
+  <requestDispatcher handleSelect="true" >
+    <!--Make sure your system has some authentication before enabling remote streaming!  -->
+    <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000" />
+
+    <!-- Set HTTP caching related parameters (for proxy caches and clients).
+
+         To get the behaviour of Solr 1.2 (ie: no caching related headers)
+         use the never304="true" option and do not specify a value for
+         <cacheControl>
+    -->
+    <!-- <httpCaching never304="true"> -->
+    <httpCaching lastModifiedFrom="openTime"
+                 etagSeed="Solr">
+      <!-- lastModFrom="openTime" is the default, the Last-Modified value
+           (and validation against If-Modified-Since requests) will all be
+           relative to when the current Searcher was opened.
+           You can change it to lastModFrom="dirLastMod" if you want the
+           value to exactly corrispond to when the physical index was last
+           modified.
+
+           etagSeed="..." is an option you can change to force the ETag
+           header (and validation against If-None-Match requests) to be
+           differnet even if the index has not changed (ie: when making
+           significant changes to your config file)
+
+           lastModifiedFrom and etagSeed are both ignored if you use the
+           never304="true" option.
+      -->
+      <!-- If you include a <cacheControl> directive, it will be used to
+           generate a Cache-Control header, as well as an Expires header
+           if the value contains "max-age="
+
+           By default, no Cache-Control header is generated.
+
+           You can use the <cacheControl> option even if you have set
+           never304="true"
+      -->
+      <!-- <cacheControl>max-age=30, public</cacheControl> -->
+    </httpCaching>
+  </requestDispatcher>
+
+
+  <!-- requestHandler plugins... incoming queries will be dispatched to the
+     correct handler based on the path or the qt (query type) param.
+     Names starting with a '/' are accessed with the a path equal to the
+     registered name.  Names without a leading '/' are accessed with:
+      http://host/app/select?qt=name
+     If no qt is defined, the requestHandler that declares default="true"
+     will be used.
+  -->
+  <requestHandler name="standard" class="solr.SearchHandler" default="true">
+    <!-- default values for query parameters -->
+    <lst name="defaults">
+      <str name="echoParams">explicit</str>
+      <!--
+      <int name="rows">10</int>
+      <str name="fl">*</str>
+      <str name="version">2.1</str>
+       -->
+    </lst>
+  </requestHandler>
+
+  <!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
+  <!-- remove the <lst name="master"> section if this is just a slave -->
+  <!-- remove  the <lst name="slave"> section if this is just a master -->
+  <!--
+  <requestHandler name="/replication" class="solr.ReplicationHandler" >
+      <lst name="master">
+        <str name="replicateAfter">commit</str>
+        <str name="replicateAfter">startup</str>
+        <str name="confFiles">schema.xml,stopwords.txt</str>
+      </lst>
+      <lst name="slave">
+        <str name="masterUrl">http://localhost:8983/solr/replication</str>
+        <str name="pollInterval">00:00:60</str>
+      </lst>
+  </requestHandler>-->
+
+  <!-- DisMaxRequestHandler allows easy searching across multiple fields
+       for simple user-entered phrases.  It's implementation is now
+       just the standard SearchHandler with a default query type
+       of "dismax".
+       see http://wiki.apache.org/solr/DisMaxRequestHandler
+   -->
+  <requestHandler name="dismax" class="solr.SearchHandler" >
+    <lst name="defaults">
+      <str name="defType">dismax</str>
+      <str name="echoParams">explicit</str>
+      <float name="tie">0.01</float>
+      <str name="qf">
+        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+      </str>
+      <str name="pf">
+        text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
+      </str>
+      <str name="bf">
+        popularity^0.5 recip(price,1,1000,1000)^0.3
+      </str>
+      <str name="fl">
+        id,name,price,score
+      </str>
+      <str name="mm">
+        2&lt;-1 5&lt;-2 6&lt;90%
+      </str>
+      <int name="ps">100</int>
+      <str name="q.alt">*:*</str>
+      <!-- example highlighter config, enable per-query with hl=true -->
+      <str name="hl.fl">text features name</str>
+      <!-- for this field, we want no fragmenting, just highlighting -->
+      <str name="f.name.hl.fragsize">0</str>
+      <!-- instructs Solr to return the field itself if no query terms are
+           found -->
+      <str name="f.name.hl.alternateField">name</str>
+      <str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
+    </lst>
+  </requestHandler>
+
+  <!-- Note how you can register the same handler multiple times with
+       different names (and different init parameters)
+    -->
+  <requestHandler name="partitioned" class="solr.SearchHandler" >
+    <lst name="defaults">
+      <str name="defType">dismax</str>
+      <str name="echoParams">explicit</str>
+      <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
+      <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
+      <!-- This is an example of using Date Math to specify a constantly
+           moving date range in a config...
+        -->
+      <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
+    </lst>
+    <!-- In addition to defaults, "appends" params can be specified
+         to identify values which should be appended to the list of
+         multi-val params from the query (or the existing "defaults").
+
+         In this example, the param "fq=instock:true" will be appended to
+         any query time fq params the user may specify, as a mechanism for
+         partitioning the index, independent of any user selected filtering
+         that may also be desired (perhaps as a result of faceted searching).
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "appends" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <lst name="appends">
+      <str name="fq">inStock:true</str>
+    </lst>
+    <!-- "invariants" are a way of letting the Solr maintainer lock down
+         the options available to Solr clients.  Any params values
+         specified here are used regardless of what values may be specified
+         in either the query, the "defaults", or the "appends" params.
+
+         In this example, the facet.field and facet.query params are fixed,
+         limiting the facets clients can use.  Faceting is not turned on by
+         default - but if the client does specify facet=true in the request,
+         these are the only facets they will be able to see counts for;
+         regardless of what other facet.field or facet.query params they
+         may specify.
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "invariants" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <lst name="invariants">
+      <str name="facet.field">cat</str>
+      <str name="facet.field">manu_exact</str>
+      <str name="facet.query">price:[* TO 500]</str>
+      <str name="facet.query">price:[500 TO *]</str>
+    </lst>
+  </requestHandler>
+
+
+  <!--
+   Search components are registered to SolrCore and used by Search Handlers
+
+   By default, the following components are avaliable:
+
+   <searchComponent name="query"     class="org.apache.solr.handler.component.QueryComponent" />
+   <searchComponent name="facet"     class="org.apache.solr.handler.component.FacetComponent" />
+   <searchComponent name="mlt"       class="org.apache.solr.handler.component.MoreLikeThisComponent" />
+   <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
+   <searchComponent name="stats"     class="org.apache.solr.handler.component.StatsComponent" />
+   <searchComponent name="debug"     class="org.apache.solr.handler.component.DebugComponent" />
+
+   Default configuration in a requestHandler would look like:
+    <arr name="components">
+      <str>query</str>
+      <str>facet</str>
+      <str>mlt</str>
+      <str>highlight</str>
+      <str>stats</str>
+      <str>debug</str>
+    </arr>
+
+    If you register a searchComponent to one of the standard names, that will be used instead.
+    To insert components before or after the 'standard' components, use:
+
+    <arr name="first-components">
+      <str>myFirstComponentName</str>
+    </arr>
+
+    <arr name="last-components">
+      <str>myLastComponentName</str>
+    </arr>
+  -->
+
+  <!-- The spell check component can return a list of alternative spelling
+ suggestions.  -->
+  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
+
+    <str name="queryAnalyzerFieldType">textSpell</str>
+
+    <lst name="spellchecker">
+      <str name="name">default</str>
+      <str name="field">name</str>
+      <str name="spellcheckIndexDir">./spellchecker</str>
+    </lst>
+
+    <!-- a spellchecker that uses a different distance measure
+    <lst name="spellchecker">
+      <str name="name">jarowinkler</str>
+      <str name="field">spell</str>
+      <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
+      <str name="spellcheckIndexDir">./spellchecker2</str>
+    </lst>
+     -->
+
+    <!-- a file based spell checker
+    <lst name="spellchecker">
+      <str name="classname">solr.FileBasedSpellChecker</str>
+      <str name="name">file</str>
+      <str name="sourceLocation">spellings.txt</str>
+      <str name="characterEncoding">UTF-8</str>
+      <str name="spellcheckIndexDir">./spellcheckerFile</str>
+    </lst>
+    -->
+  </searchComponent>
+
+  <!-- A request handler utilizing the spellcheck component.
+  #############################################################################
+  NOTE: This is purely as an example.  The whole purpose of the
+  SpellCheckComponent is to hook it into the request handler that handles (i.e.
+  the standard or dismax SearchHandler) queries such that a separate request is
+  not needed to get suggestions.
+
+  IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS NOT WHAT YOU
+  WANT FOR YOUR PRODUCTION SYSTEM!
+  #############################################################################
+  -->
+  <requestHandler name="/spell" class="solr.SearchHandler" lazy="true">
+    <lst name="defaults">
+      <!-- omp = Only More Popular -->
+      <str name="spellcheck.onlyMorePopular">false</str>
+      <!-- exr = Extended Results -->
+      <str name="spellcheck.extendedResults">false</str>
+      <!--  The number of suggestions to return -->
+      <str name="spellcheck.count">1</str>
+    </lst>
+    <arr name="last-components">
+      <str>spellcheck</str>
+    </arr>
+  </requestHandler>
+
+  <searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
+  <!-- A Req Handler for working with the tvComponent.  This is purely as an example.
+  You will likely want to add the component to your already specified request handlers. -->
+  <requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
+    <lst name="defaults">
+      <bool name="tv">true</bool>
+    </lst>
+    <arr name="last-components">
+      <str>tvComponent</str>
+    </arr>
+  </requestHandler>
+
+  <!-- Clustering Component
+       http://wiki.apache.org/solr/ClusteringComponent
+       This relies on third party jars which are not included in the release.
+       To use this component (and the "/clustering" handler)
+       Those jars will need to be downloaded, and you'll need to set the
+       solr.cluster.enabled system property when running solr...
+          java -Dsolr.clustering.enabled=true -jar start.jar
+    -->
+  <searchComponent
+      name="clusteringComponent"
+      enable="false"
+      class="org.apache.solr.handler.clustering.ClusteringComponent" >
+    <!-- Declare an engine -->
+    <lst name="engine">
+      <!-- The name, only one can be named "default" -->
+      <str name="name">default</str>
+      <!--
+           Class name of Carrot2 clustering algorithm. Currently available algorithms are:
+
+           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
+           * org.carrot2.clustering.stc.STCClusteringAlgorithm
+
+           See http://project.carrot2.org/algorithms.html for the algorithm's characteristics.
+        -->
+      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
+      <!--
+           Overriding values for Carrot2 default algorithm attributes. For a description
+           of all available attributes, see: http://download.carrot2.org/stable/manual/#chapter.components.
+           Use attribute key as name attribute of str elements below. These can be further
+           overridden for individual requests by specifying attribute key as request
+           parameter name and attribute value as parameter value.
+        -->
+      <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
+    </lst>
+    <lst name="engine">
+      <str name="name">stc</str>
+      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
+    </lst>
+  </searchComponent>
+  <requestHandler name="/clustering"
+                  enable="false"
+                  class="solr.SearchHandler">
+    <lst name="defaults">
+      <bool name="clustering">true</bool>
+      <str name="clustering.engine">default</str>
+      <bool name="clustering.results">true</bool>
+      <!-- The title field -->
+      <str name="carrot.title">name</str>
+      <str name="carrot.url">id</str>
+      <!-- The field to cluster on -->
+      <str name="carrot.snippet">features</str>
+      <!-- produce summaries -->
+      <bool name="carrot.produceSummary">true</bool>
+      <!-- the maximum number of labels per cluster -->
+      <!--<int name="carrot.numDescriptions">5</int>-->
+      <!-- produce sub clusters -->
+      <bool name="carrot.outputSubClusters">false</bool>
+    </lst>
+    <arr name="last-components">
+      <str>clusteringComponent</str>
+    </arr>
+  </requestHandler>
+
+  <!-- Solr Cell: http://wiki.apache.org/solr/ExtractingRequestHandler -->
+  <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler" startup="lazy">
+    <lst name="defaults">
+      <!-- All the main content goes into "text"... if you need to return
+           the extracted text or do highlighting, use a stored field. -->
+      <str name="fmap.content">text</str>
+      <str name="lowernames">true</str>
+      <str name="uprefix">ignored_</str>
+
+      <!-- capture link hrefs but ignore div attributes -->
+      <str name="captureAttr">true</str>
+      <str name="fmap.a">links</str>
+      <str name="fmap.div">ignored_</str>
+    </lst>
+  </requestHandler>
+
+
+  <!-- A component to return terms and document frequency of those terms.
+       This component does not yet support distributed search. -->
+  <searchComponent name="termsComponent" class="org.apache.solr.handler.component.TermsComponent"/>
+
+  <requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
+    <lst name="defaults">
+      <bool name="terms">true</bool>
+    </lst>
+    <arr name="components">
+      <str>termsComponent</str>
+    </arr>
+  </requestHandler>
+
+
+  <!-- a search component that enables you to configure the top results for
+       a given query regardless of the normal lucene scoring.-->
+  <!--  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
+      <str name="queryFieldType">string</str>
+      <str name="config-file">elevate.xml</str>
+    </searchComponent>
+          -->
+
+  <!-- a request handler utilizing the elevator component
+  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <str name="echoParams">explicit</str>
+    </lst>
+    <arr name="last-components">
+      <str>elevator</str>
+    </arr>
+  </requestHandler>
+-->
+
+  <!-- Update request handler.
+
+       Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
+       the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
+       The response format differs from solr1.1 formatting and returns a standard error code.
+       To enable solr1.1 behavior, remove the /update handler or change its path
+    -->
+  <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
+
+
+  <requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
+
+  <!--
+   Analysis request handler.  Since Solr 1.3.  Use to return how a document is analyzed.  Useful
+   for debugging and as a token server for other types of applications.
+
+   This is deprecated in favor of the improved DocumentAnalysisRequestHandler and FieldAnalysisRequestHandler
+
+   <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
+   -->
+
+  <!--
+    An analysis handler that provides a breakdown of the analysis process of provided docuemnts. This handler expects a
+    (single) content stream with the following format:
+
+    <docs>
+      <doc>
+        <field name="id">1</field>
+        <field name="name">The Name</field>
+        <field name="text">The Text Value</field>
+      <doc>
+      <doc>...</doc>
+      <doc>...</doc>
+      ...
+    </docs>
+
+    Note: Each document must contain a field which serves as the unique key. This key is used in the returned
+    response to assoicate an analysis breakdown to the analyzed document.
+
+    Like the FieldAnalysisRequestHandler, this handler also supports query analysis by
+    sending either an "analysis.query" or "q" request paraemter that holds the query text to be analyized. It also
+    supports the "analysis.showmatch" parameter which when set to true, all field tokens that match the query
+    tokens will be marked as a "match".
+  -->
+  <requestHandler name="/analysis/document" class="solr.DocumentAnalysisRequestHandler" />
+
+  <!--
+    RequestHandler that provides much the same functionality as analysis.jsp. Provides the ability
+    to specify multiple field types and field names in the same request and outputs index-time and
+    query-time analysis for each of them.
+
+    Request parameters are:
+    analysis.fieldname - The field name whose analyzers are to be used
+    analysis.fieldtype - The field type whose analyzers are to be used
+    analysis.fieldvalue - The text for index-time analysis
+    q (or analysis.q) - The text for query time analysis
+    analysis.showmatch (true|false) - When set to true and when query analysis is performed, the produced
+                                      tokens of the field value analysis will be marked as "matched" for every
+                                      token that is produces by the query analysis
+   -->
+  <requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler" />
+
+
+  <!-- CSV update handler, loaded on demand -->
+  <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
+
+
+  <!--
+   Admin Handlers - This will register all the standard admin RequestHandlers.  Adding
+   this single handler is equivalent to registering:
+
+  <requestHandler name="/admin/luke"       class="org.apache.solr.handler.admin.LukeRequestHandler" />
+  <requestHandler name="/admin/system"     class="org.apache.solr.handler.admin.SystemInfoHandler" />
+  <requestHandler name="/admin/plugins"    class="org.apache.solr.handler.admin.PluginInfoHandler" />
+  <requestHandler name="/admin/threads"    class="org.apache.solr.handler.admin.ThreadDumpHandler" />
+  <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
+  <requestHandler name="/admin/file"       class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
+
+  If you wish to hide files under solr.home/conf, explicitly register the ShowFileRequestHandler using:
+  <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
+    <lst name="invariants">
+     <str name="hidden">synonyms.txt</str>
+     <str name="hidden">anotherfile.txt</str>
+    </lst>
+  </requestHandler>
+  -->
+  <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
+
+  <!-- ping/healthcheck -->
+  <requestHandler name="/admin/ping" class="PingRequestHandler">
+    <lst name="defaults">
+      <str name="qt">standard</str>
+      <str name="q">solrpingquery</str>
+      <str name="echoParams">all</str>
+    </lst>
+  </requestHandler>
+
+  <!-- Echo the request contents back to the client -->
+  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
+    <lst name="defaults">
+      <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
+      <str name="echoHandler">true</str>
+    </lst>
+  </requestHandler>
+
+  <highlighting>
+    <!-- Configure the standard fragmenter -->
+    <!-- This could most likely be commented out in the "default" case -->
+    <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
+      <lst name="defaults">
+        <int name="hl.fragsize">100</int>
+      </lst>
+    </fragmenter>
+
+    <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
+    <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
+      <lst name="defaults">
+        <!-- slightly smaller fragsizes work better because of slop -->
+        <int name="hl.fragsize">70</int>
+        <!-- allow 50% slop on fragment sizes -->
+        <float name="hl.regex.slop">0.5</float>
+        <!-- a basic sentence pattern -->
+        <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
+      </lst>
+    </fragmenter>
+
+    <!-- Configure the standard formatter -->
+    <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
+      <lst name="defaults">
+        <str name="hl.simple.pre"><![CDATA[<em>]]></str>
+        <str name="hl.simple.post"><![CDATA[</em>]]></str>
+      </lst>
+    </formatter>
+  </highlighting>
+
+  <!-- An example dedup update processor that creates the "id" field on the fly
+       based on the hash code of some other fields.  This example has overwriteDupes
+       set to false since we are using the id field as the signatureField and Solr
+       will maintain uniqueness based on that anyway.
+
+       You have to link the chain to an update handler above to use it ie:
+         <requestHandler name="/update "class="solr.XmlUpdateRequestHandler">
+           <lst name="defaults">
+             <str name="update.processor">dedupe</str>
+           </lst>
+         </requestHandler>
+  -->
+  <!--
+  <updateRequestProcessorChain name="dedupe">
+    <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
+      <bool name="enabled">true</bool>
+      <str name="signatureField">id</str>
+      <bool name="overwriteDupes">false</bool>
+      <str name="fields">name,features,cat</str>
+      <str name="signatureClass">org.apache.solr.update.processor.Lookup3Signature</str>
+    </processor>
+    <processor class="solr.LogUpdateProcessorFactory" />
+    <processor class="solr.RunUpdateProcessorFactory" />
+  </updateRequestProcessorChain>
+  -->
+
+
+  <!-- queryResponseWriter plugins... query responses will be written using the
+    writer specified by the 'wt' request parameter matching the name of a registered
+    writer.
+    The "default" writer is the default and will be used if 'wt' is not specified
+    in the request. XMLResponseWriter will be used if nothing is specified here.
+    The json, python, and ruby writers are also available by default.
+
+    <queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
+    <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
+    <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
+    <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
+    <queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
+    <queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
+
+    <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
+  -->
+
+  <!-- XSLT response writer transforms the XML output by any xslt file found
+       in Solr's conf/xslt directory.  Changes to xslt files are checked for
+       every xsltCacheLifetimeSeconds.
+   -->
+  <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
+    <int name="xsltCacheLifetimeSeconds">5</int>
+  </queryResponseWriter>
+
+
+  <!-- example of registering a query parser
+  <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
+  -->
+
+  <!-- example of registering a custom function parser
+  <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
+  -->
+
+  <!-- config for the admin interface -->
+  <admin>
+    <defaultQuery>solr</defaultQuery>
+
+    <!-- configure a healthcheck file for servers behind a loadbalancer
+    <healthcheck type="file">server-enabled</healthcheck>
+    -->
+  </admin>
+
+</config>
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/module.js b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/module.js
index 9d7f4e4..dfefccb 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/module.js
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/IndexingModule/module.js
@@ -22,5 +22,24 @@
         p.copyTemplate(p.ctx,
             'InfrastructureLayer/IndexingModule/bootstrap.tmpl',
             'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/infrastructure/' + p.indexing + 'IndexingModule.java');
+        if (p.indexing === 'SQL') {
+            p.copyToConfig(
+                p.ctx,
+                'InfrastructureLayer/IndexingModule/indexing/ds-index-postgresql.properties',
+                'ds-index-postgresql.properties'
+            );
+        }
+        if (p.indexing === 'Solr') {
+            p.copyToConfig(
+                p.ctx,
+                'InfrastructureLayer/IndexingModule/indexing/solrconfig.xml',
+                'solrconfig.xml'
+            );
+            p.copyToConfig(
+                p.ctx,
+                'InfrastructureLayer/IndexingModule/indexing/solr-schema.xml',
+                'schema.xml'
+            );
+        }
     }
 };
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
index d06c9cc..46c2d7c 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
@@ -24,24 +24,37 @@
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.metrics.<%- polygene.metrics.toLowerCase() %>.assembly.<%- polygene.metrics %>MetricsAssembler;
-
+<%
+if (polygene.metrics === "None") {
+%>import org.apache.polygene.bootstrap.defaults.DefaultMetricsProviderAssembler;
+import org.apache.polygene.api.metrics.MetricsProvider;
+<%
+} else {
+%>import org.apache.polygene.metrics.<%- polygene.metrics.toLowerCase() %>.assembly.<%- polygene.metrics %>MetricsAssembler;
+<%
+}
+%>
 public class <%- polygene.metrics %>MetricsModule
     implements ModuleAssembler
 {
     public static final String NAME = "<%- polygene.metrics %> Metrics Module";
-    private final ModuleAssembly configModule;
-
-    public <%- polygene.metrics %>MetricsModule( ModuleAssembly configModule )
-    {
-        this.configModule = configModule;
-    }
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        new <%- polygene.metrics %>MetricsAssembler().assemble( module );
+<%
+if (polygene.metrics === "None") {
+%>        new DefaultMetricsProviderAssembler().assemble( module );
+        module.services( MetricsProvider.class ).visibleIn( Visibility.application );
+<%
+} else {
+%>        new <%- polygene.metrics %>MetricsAssembler()
+            .visibleIn( Visibility.application )
+            .assemble( module );
+<%
+}
+%>
         return module;
     }
 }
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/module.js b/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/module.js
index 2d426b9..0b5e162 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/module.js
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/module.js
@@ -19,10 +19,8 @@
 module.exports = {
 
     write: function (p) {
-        if (p.metrics !== "None") {
-            p.copyTemplate(p.ctx,
-                'InfrastructureLayer/MetricsModule/bootstrap.tmpl',
-                'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/infrastructure/' + p.metrics + 'MetricsModule.java');
-        }
+        p.copyTemplate(p.ctx,
+            'InfrastructureLayer/MetricsModule/bootstrap.tmpl',
+            'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/infrastructure/' + p.metrics + 'MetricsModule.java');
     }
 };
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
index 7ff8b96..c60530c 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
@@ -20,22 +20,20 @@
 package <%= polygene.packageName %>.bootstrap.infrastructure;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.serialization.<%- polygene.serialization.toLowerCase() %>.assembly.<%- polygene.serialization %>SerializationAssembler;
+import org.apache.polygene.serialization.javaxjson.assembly.JavaxJsonSerializationAssembler;
 
-public class <%- polygene.serialization %>SerializationModule
+public class SerializationModule
     implements ModuleAssembler
 {
-    public static final String NAME = "<%- polygene.serialization %> Serialization Module";
+    public static final String NAME = "Serialization Module";
 
     @Override
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
     {
-        new <%- polygene.serialization %>SerializationAssembler()
+        new JavaxJsonSerializationAssembler()
             .visibleIn( Visibility.application )
             .assemble( module );
         return module;
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/module.js b/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/module.js
index 6afd62e..c6f82ef 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/module.js
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/module.js
@@ -21,6 +21,6 @@
     write: function (p) {
         p.copyTemplate(p.ctx,
             'InfrastructureLayer/SerializationModule/bootstrap.tmpl',
-            'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/infrastructure/' + p.serialization + 'SerializationModule.java');
+            'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/infrastructure/SerializationModule.java');
     }
 };
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
index 1583636..8a990c8 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
@@ -20,11 +20,32 @@
 package <%= polygene.packageName %>.bootstrap.infrastructure;
 
 import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.identity.IdentityGenerator;
+import org.apache.polygene.api.identity.UuidGeneratorMixin;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
+<%
+if( polygene.entitystore !== 'Memory' && polygene.entitystore !== 'Preferences' && polygene.entitystore.indexOf('SQL') == -1 ) {
+%>
+import org.apache.polygene.entitystore.<%- polygene.entitystoremodule %>.<%- polygene.entitystore %>EntityStoreConfiguration;
+<%
+}
+if( polygene.entitystore.indexOf('SQL') >= 0 ) {
+%>
+import org.apache.polygene.entitystore.sql.SQLEntityStoreConfiguration;
+<%
+}
+%>
 import org.apache.polygene.entitystore.<%- polygene.entitystoremodule %>.assembly.<%- polygene.entitystore %>EntityStoreAssembler;
+<%
+if( polygene.entitystore.indexOf('SQL') >= 0 ) {
+%>import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.<%= polygene.dbpool.toLowerCase() %>.<%= polygene.dbpool %>DataSourceServiceAssembler;
+<%
+}
+%>
 
 public class <%- polygene.entitystore %>StorageModule
     implements ModuleAssembler
@@ -32,7 +53,7 @@
     public static final String NAME = "<%- polygene.entitystore %> Storage Module";
     private final ModuleAssembly configModule;
 
-    public <%- polygene.entitystore %>StorageModule( ModuleAssembly configModule )
+    <%- polygene.entitystore %>StorageModule( ModuleAssembly configModule )
     {
         this.configModule = configModule;
     }
@@ -41,11 +62,38 @@
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        new <%- polygene.entitystore %>EntityStoreAssembler()
+<%
+if( polygene.entitystore.indexOf( 'SQL' ) >= 0 ) {
+%>        // DataSourceService
+        new <%= polygene.dbpool %>DataSourceServiceAssembler()
+            .identifiedBy( "<%= polygene.entitystore.toLowerCase() %>-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "<%= polygene.entitystore.toLowerCase() %>-datasource-service" )
+            .identifiedBy( "ds-es-<%= polygene.entitystore.toLowerCase() %>" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+<%
+}
+%>        new <%- polygene.entitystore %>EntityStoreAssembler()
             .visibleIn( Visibility.application  )
             .withConfig( configModule, Visibility.application )
-            .identifiedBy( "entitystore-<%- polygene.entitystore.toLowerCase() %>" )
+            .identifiedBy( "es-<%- polygene.entitystore.toLowerCase() %>" )
             .assemble( module );
+<%
+if( polygene.entitystore === 'Cassandra' ) {
+%>        configModule.forMixin( CassandraEntityStoreConfiguration.class );
+<%
+}
+%>
+        module.services( IdentityGenerator.class )
+            .visibleIn( Visibility.application )
+            .withMixins( UuidGeneratorMixin.class );
         return module;
     }
 }
\ No newline at end of file
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
index 3c17fcc..f1373f3 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
@@ -15,6 +15,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
+var fs = require('fs');
 
 module.exports = {
 
@@ -22,5 +23,24 @@
         p.copyTemplate(p.ctx,
             'InfrastructureLayer/StorageModule/bootstrap.tmpl',
             'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/infrastructure/' + p.entitystore + 'StorageModule.java');
+
+        var esFileName = 'es-' + p.entitystore.toLowerCase() + '.properties';
+        var configurationPath = 'InfrastructureLayer/StorageModule/storage/';
+        var configurationFile = configurationPath + esFileName;
+
+        if (p.entitystore.indexOf('SQL') < 0) {
+            fs.stat(__dirname + "/../../" + configurationFile, function (err, stat) {
+                if (err === null) {
+                    p.copyToConfig(p.ctx, configurationFile, esFileName);
+                }
+            });
+        } else {
+            var esSqlFileName = 'InfrastructureLayer/StorageModule/storage/es-sql.properties';
+            p.copyToConfig(p.ctx, esSqlFileName, esFileName);
+
+            var dsFileName = 'ds-es-' + p.entitystore.toLowerCase() + '.properties';
+            var datasourceFile = 'InfrastructureLayer/StorageModule/storage/' + dsFileName;
+            p.copyToConfig(p.ctx, datasourceFile, dsFileName);
+        }
     }
 };
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-derbysql.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-derbysql.properties
new file mode 100644
index 0000000..39d9ca0
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-derbysql.properties
@@ -0,0 +1,24 @@
+#
+#  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.
+#
+#
+#
+enabled=true
+url=jdbc:derby:memory:<%= polygene.name %>;create=true
+driver=org.apache.derby.jdbc.EmbeddedDriver
+username=
+password=
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-h2sql.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-h2sql.properties
new file mode 100644
index 0000000..ed41041
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-h2sql.properties
@@ -0,0 +1,24 @@
+#
+#  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.
+#
+#
+#
+enabled=true
+url=jdbc:h2:file:./h2-entities
+driver=org.h2.Driver
+username=
+password=
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-mysql.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-mysql.properties
new file mode 100644
index 0000000..c1fd527
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-mysql.properties
@@ -0,0 +1,24 @@
+#
+#  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.
+#
+#
+#
+enabled=true
+url=jdbc:mysql://127.0.0.1:3306/<%= polygene.name %>?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true
+driver=com.mysql.cj.jdbc.Driver
+username=polygene
+password=ThisIsGreat!
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-postgresql.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-postgresql.properties
new file mode 100644
index 0000000..8e696f1
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-postgresql.properties
@@ -0,0 +1,24 @@
+#
+#  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.
+#
+#
+#
+enabled=true
+url=jdbc:postgresql://127.0.0.1:5432/<%= polygene.name.toLowerCase() %>
+driver=org.postgresql.Driver
+username=polygene
+password=ThisIsGreat!
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-sqlite.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-sqlite.properties
new file mode 100644
index 0000000..5c49ece
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-es-sqlite.properties
@@ -0,0 +1,24 @@
+#
+#  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.
+#
+#
+#
+enabled=true
+url=jdbc:sqlite:sqlite-entities/
+driver=org.sqlite.JDBC
+username=polygene
+password=ThisIsGreat
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-cassandra.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-cassandra.properties
new file mode 100644
index 0000000..5a68236
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-cassandra.properties
@@ -0,0 +1,57 @@
+#  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.
+
+
+# A comma or space separated list of <code>hostname:port</code> to the
+# Cassandra cluster.
+#
+# A small list of hostnames should be given, as the client is capable to
+# discover the topology by itself and only need one host that it can connect
+# to.
+# Also not that Cassandra refuse to bind to all interfaces on a host, so you
+# need to know which hostname corresponds to the interface that Cassandra is
+# bound to. This may not include 'localhost'.
+#     Defaults: null
+#     hostnames=
+
+# The name of the cluster to connect to.
+#     Defaults: polygene-cluster
+#     clusterName=polygene-cluster
+
+# The replication factor to be used, if a KEYSPACE is created.
+#     Defaults: 3
+#     replicationFactor=3
+
+# The Cassandra client uses the CQL interface, and typically needs a username
+# and password.
+#     Defaults: no user name will be attempted.
+#     username=
+#     password=
+
+# The name of the KEYSPACE to be used.
+#     Defaults:polygene
+#     keySpace=polygene
+
+# The name of the entity TABLE to be used.
+# All entities are stored in the same table, with one entity per row.
+#     Defaults: entitystore
+#     entityTableName=entitystore
+
+# Defines whether a KEYSPACE and entity TABLE should be created if not already
+# present in the Cassandra cluster.
+#     Defaults: false
+#     createIfMissing=false
+createIfMissing=true
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-file.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-file.properties
new file mode 100644
index 0000000..f28a9a9
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-file.properties
@@ -0,0 +1,49 @@
+#  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.
+
+
+# The directory where the File Entity Store will be keep its persisted state.
+#     If no configuration is provided at all, then the default location is
+#     {@code System.getProperty( "user.dir" ) + "/polygene/filestore"; }.
+#     If a configuration is given, the entity store will be placed in the
+#     DATA directory, which is operating system specific.
+# Default locations;
+#  Linux/Unix : {user}/.{application}/data
+#  OSX : {user}/Library/Application Support/{application}
+#  Windows : {user}/Application Data/{application}/data
+# where;
+#   {user} = Current User's home directory
+#   {application} = Application's name, as set in assembly.
+#
+# Ignored if the FileConfiguration service is found.
+# The content inside this directory should not be modified directly, and doing so may corrupt the data.
+# directory=
+#
+# Defines how many slice directories the store should use.
+# Many operating systems run into performance problems when the number of files
+# in a directory grows. If you expect a large number of entities in the file
+# entity store, it is wise to set the number of slices (default is 1) to an
+# approximation of the square root of number of expected entities.
+# For instance, if you estimate that you will have 1 million entities in the
+# file entity store, you should set the slices to 1000.
+# There is an limit of minimum 1 slice and maximum 10,000 slices, and if more
+# slices than that is needed, you are probably pushing this entitystore beyond
+# its capabilities.
+# Note that the slices() can not be changed once it has been set, as it would
+# cause the entity store not to find the entities anymore.
+#
+# @Range(min=1, max=10000)
+# slices=1
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-geode.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-geode.properties
new file mode 100644
index 0000000..7d87f64
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-geode.properties
@@ -0,0 +1,53 @@
+#  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.
+
+
+# Geode Topology.
+# Possible values; EMBEDDED, CLIENT_SERVER
+# Default: EMBEDDED
+#
+# topology=EMBEDDED
+
+
+# Geode Cache Name.
+# Default: polygene:cache
+#
+#cacheName=polygene:cache
+
+
+# Cache properties path, loaded from the classpath.
+# Default: none
+#
+# cachePropertiesPath=
+
+
+# Cache Region Shortcut.
+#
+# In EMBEDDED topology, defaults to  LOCAL,
+# see org.apache.geode.cache.RegionShortcut.
+#
+# In CLIENT_SERVER topology, defaults to PROXY,
+# see org.apache.geode.cache.client.ClientRegionShortcut.
+#
+# regionShortcut=
+
+
+# Geode Region Name.
+#
+# Region names may only be alphanumeric and may contain hyphens or underscores.
+# Defaults: polygene-entitystore-region
+#
+# regionName=polygene-entitystore-region
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-hazelcast.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-hazelcast.properties
new file mode 100644
index 0000000..c4ad569
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-hazelcast.properties
@@ -0,0 +1,29 @@
+#  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.
+
+
+# The location of the Hazelcast configuration XML file.
+# If the property is not a URL, it will be tried as a path name on the \
+# classpath.
+# Defaults: hazelcast-default.xml
+#
+# configXmlLocation=hazelcast-default.xml
+
+
+# The name of the Hazelcast map that is the key-value entity store.
+# Defaults: polygene:entitystore:data
+#
+# mapName=polygene:entitystore:data
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jclouds.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jclouds.properties
new file mode 100644
index 0000000..d164541
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jclouds.properties
@@ -0,0 +1,48 @@
+#  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.
+
+
+# Name of the JClouds provider to use.
+# Defaults: 'transient'.
+#
+# provider=transient
+
+
+# Endpoint for the BlobStore provider.
+# Defaults:
+#
+# endpoint=
+
+
+# Name of the JClouds container to use.
+# Defaults: polygene-entities
+#
+# container=polygene-entities
+
+
+# The identifier and password (i.e. credentials) to connect to the JClouss
+# instance.
+#
+# identifier=
+# credential=
+
+
+# Use this to fine tune your provider implementation according to JClouds
+# documentation.
+#
+# properties=
+
+
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jdbm.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jdbm.properties
new file mode 100644
index 0000000..119a4d2
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jdbm.properties
@@ -0,0 +1,31 @@
+#  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.
+
+
+# The file where the JDBM data will be stored
+# Default: System.getProperty( "user.dir" ) + "/polygene/jdbmstore.data";
+#
+# file=
+
+
+# See JDBM documentation on RecordManagerOptions.AUTO_COMMIT
+#
+# autoCommit=false
+
+
+# See JDBM documentation on RecordManagerOptions.DISABLE_TRANSACTIONS
+#
+# disableTransactions=false
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-leveldb.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-leveldb.properties
new file mode 100644
index 0000000..880a355
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-leveldb.properties
@@ -0,0 +1,52 @@
+#  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.
+
+
+# LevelDB flavour, can be 'java' or 'jni'.
+# Defaults: tries 'jni' and fallback to 'java'.
+#
+# flavour=java
+
+
+# blockRestartInterval=
+
+
+# blockSize=
+
+
+# cacheSize=
+
+
+# Type of compression to be used. Either SNAPPY or NONE
+#
+# compression=NONE
+
+
+# Maximum number of files to open.
+#
+# maxOpenFiles=
+
+
+# paranoidChecks=
+
+
+# verifyChecksums=
+
+
+# writeBufferSize=
+
+
+# errorIfExists=false
\ No newline at end of file
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-mongodb.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-mongodb.properties
new file mode 100644
index 0000000..062766c
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-mongodb.properties
@@ -0,0 +1,71 @@
+#  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.
+
+
+# Defaults: 127.0.0.1
+#
+# hostname=
+
+
+# port=
+
+
+# nodes=
+
+
+# username=
+# password=
+
+
+# Defaults: polygene:entitystore
+#
+# database=polygene:entitystore
+
+
+# Defaults: entities
+#
+# collection=entities
+
+
+# The write concern to be used. One of the following;
+#
+# ACKNOWLEDGED : Write operations that use this write concern will wait for
+#                acknowledgement,  using the default write concern configured
+#                on the server.  This is the default value.
+#
+# W1 : Write operations that use this write concern will wait for
+#      acknowledgement from a single member.
+#
+# W2 : Write operations that use this write concern will wait for
+#      acknowledgement from two members.
+#
+# W3 : Write operations that use this write concern will wait for
+#      acknowledgement from three members.
+#
+# UNACKNOWLEDGED : Write operations that use this write concern will return
+#                  as soon as the message is written to the socket. Exceptions
+#                  are raised for network issues, but not server errors.
+#
+# JOURNALED : Write operations wait for the server to group commit to the
+#             journal file on disk.
+#
+# MAJORITY : Exceptions are raised for network issues, and server errors waits
+#            on a majority of servers for the write operation.
+#
+# Defaults: ACKNOWLEDGED
+#
+# writeConcern=ACKNOWLEDGED
+
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-redis.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-redis.properties
new file mode 100644
index 0000000..c8c954d
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-redis.properties
@@ -0,0 +1,44 @@
+#  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.
+
+
+# Redis host.
+# Defaults: 127.0.0.1
+#
+# host=127.0.0.1
+
+
+# Redis port.
+# Defaults: 6379
+#
+# port=6379
+
+
+# Connection timeout in milliseconds.
+# Defaults: 2000
+#
+# timeout=2000
+
+
+# Password.
+#
+# password=
+
+
+# Database number.
+# Defaults: 0
+#
+# database=0
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-riak.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-riak.properties
new file mode 100644
index 0000000..d34c8c9
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-riak.properties
@@ -0,0 +1,107 @@
+#  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.
+
+
+# List of Riak Protocol Buffer hosts.
+#
+# Each entry can contain either an IP address / hostname
+# or an IP address / hostname followed by a column and the host's port.
+# Defaults: 127.0.0.1
+#
+# hosts=
+
+
+# User name to use for authentication.
+#
+# username=
+
+
+# Password to use for authentication.
+#
+# password=
+
+
+# Type of the keystore used for server certificate authentication.
+# @OneOf( { "PKCS12", "JCEKS", "JKS" } )
+#
+# truststoreType=
+
+
+# Path of the keystore used for server certificate authentication.
+#
+# truststorePath=
+
+
+# Password of the keystore used for server certificate authentication.
+#
+# truststorePassword=
+
+
+# Type of the keystore used for client certificate authentication.
+# @OneOf( { "PKCS12", "JCEKS", "JKS" } )
+#
+# keystoreType=
+
+
+# Path of the keystore used for client certificate authentication.
+#
+# keystorePath=
+
+
+# Password of the keystore used for client certificate authentication.
+#
+# keystorePassword=
+
+
+# Password of the key used for client certificate authentication.
+#
+# keyPassword=
+
+
+# Riak Bucket where Entities state will be stored.
+# Defaults:" polygene:entities
+#
+# bucket=polygene:entities
+
+
+# Cluster execution attempts.
+#
+# clusterExecutionAttempts=
+
+
+# Minimum connections per node.
+#
+# minConnections=
+
+
+# Maximum connections per node.
+#
+# maxConnections=
+
+
+# Block on maximum connections.
+#
+# blockOnMaxConnections=
+
+
+# Connection timeout.
+#
+# connectionTimeout=
+
+
+# Idle timeout.
+#
+# idleTimeout=
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-sql.properties b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-sql.properties
new file mode 100644
index 0000000..c4f0cd5
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-sql.properties
@@ -0,0 +1,36 @@
+#  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.
+
+
+# Name of the database schema to use.
+# Ignored on SQL databases that don't support schemas.
+# Defaults: POLYGENE_ES
+#
+# schemaName=POLYGENE_ES
+
+
+# Name of the entities table.
+# Defaults: POLYGENE_ENTITIES
+#
+# entityTableName=POLYGENE_ENTITIES
+
+
+# Defines whether the database schema and table should be created if not
+# already present.
+# Defaults: true
+#
+# createIfMissing=true
+
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/bootstrap.tmpl b/tools/generator-polygene/app/templates/InfrastructureLayer/bootstrap.tmpl
index 1ba3098..85efa4f 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/bootstrap.tmpl
@@ -41,15 +41,13 @@
         throws AssemblyException
     {
         createModule( layer, FileConfigurationModule.class );
-        createModule( layer, <%= polygene.serialization %>SerializationModule.class );
-<% if( polygene.metrics !== "None" ) { %>
+        createModule( layer, SerializationModule.class );
         createModule( layer, <%= polygene.metrics %>MetricsModule.class );
-<% } %>
-<% if( polygene.caching !== "None" ) { %>
-        createModule( layer, <%= polygene.caching %>CachingModule.class );
-<% } %>
-        new <%= polygene.entitystore %>StorageModule( configModule ).assemble( layer, layer.module( <%= polygene.entitystore %>StorageModule.NAME ) );
-        new <%= polygene.indexing %>IndexingModule( configModule ).assemble( layer, layer.module( <%= polygene.indexing %>IndexingModule.NAME ) );
+<% if( polygene.caching !== "None" ) {
+%>        createModule( layer, <%= polygene.caching %>CachingModule.class, configModule );
+<% }
+%>        createModule( layer, <%= polygene.entitystore %>StorageModule.class, configModule );
+        createModule( layer, <%= polygene.indexing %>IndexingModule.class, configModule );
         return layer;
     }
 }
\ No newline at end of file
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/Launcher.java.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/Launcher.java.tmpl
new file mode 100644
index 0000000..ad03b15
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/Launcher.java.tmpl
@@ -0,0 +1,76 @@
+<%#
+ *  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 <%= polygene.packageName %>.app;
+
+import <%= polygene.packageName %>.bootstrap.<%= polygene.name %>ApplicationAssembler;
+import <%= polygene.packageName %>.bootstrap.connectivity.ConnectivityLayer;
+import <%= polygene.packageName %>.bootstrap.connectivity.RestApiModule;
+
+import org.apache.polygene.api.structure.Application;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
+import org.apache.polygene.library.restlet.PolygeneRestApplicationLauncher;
+
+public class <%= polygene.name %>Launcher extends PolygeneRestApplicationLauncher
+{
+    private static final String name = "<%= polygene.name %>";
+    private static final String version = "0.1";
+    private Application.Mode mode = getApplicationMode();
+
+    public static void main( String[] args )
+        throws Exception
+    {
+        <%= polygene.name %>Launcher app = new <%= polygene.name %>Launcher();
+        app.installShutdownHook();
+        app.initialize();
+    }
+
+    protected LayeredApplicationAssembler createApplicationAssembler()
+        throws AssemblyException
+    {
+        return new <%= polygene.name %>ApplicationAssembler( name, version, mode, none -> {} );
+    }
+
+    @Override
+    public void shutdown()
+    {
+        super.shutdown();
+    }
+
+    protected String entryLayer()
+    {
+        return ConnectivityLayer.NAME;
+    }
+
+    protected String entryModule()
+    {
+        return RestApiModule.NAME;
+    }
+
+    private Application.Mode getApplicationMode()
+    {
+        String mode = System.getenv( "APP_MODE" );
+        if( mode == null )
+        {
+            return Application.Mode.development;
+        }
+        return Application.Mode.valueOf( mode );
+    }
+}
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/SETUP.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/SETUP.tmpl
new file mode 100644
index 0000000..d5d95ad
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/SETUP.tmpl
@@ -0,0 +1,41 @@
+<%
+if( polygene.entitystore == 'PostgreSQL' || polygene.indexing == 'SQL' ) {
+%>
+Start Postgres in Docker
+=========================
+    docker run -p 5432:5432 --name polygene-postgres -d postgres
+
+Connect to Postgres via Docker
+==============================
+    docker run -it --rm --link polygene-postgres:postgres postgres psql -h postgres -U postgres
+
+Setting up Postgresql database
+==============================
+In the psql command shell, execute the following commands (must have elevated
+permissions, such as user 'postgres'
+
+    CREATE USER polygene WITH PASSWORD 'ThisIsGreat!';
+    CREATE DATABASE <%= polygene.name.toLowerCase() %>;
+    GRANT ALL ON DATABASE <%= polygene.name.toLowerCase() %> TO polygene;
+    \connect <%= polygene.name.toLowerCase() %>
+    CREATE EXTENSION ltree;
+    \q
+<%
+}
+%>
+<%
+if( polygene.entitystore == 'Cassandra' ) {
+%>
+Start Cassandra in Docker
+=========================
+    docker run -d -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9042:9042 -p 9160:9160 --name polygene-cassandra cassandra
+    docker logs -f polygene-cassandra
+
+and wait for the following log message to appear.
+
+    Starting listening for CQL clients on /0.0.0.0:9042 (unencrypted)...
+
+after that you can Ctrl-C back to command line.
+<%
+}
+%>
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/app.js b/tools/generator-polygene/app/templates/RestAPIApplication/app.js
index 80380c7..9b6125b 100644
--- a/tools/generator-polygene/app/templates/RestAPIApplication/app.js
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/app.js
@@ -25,8 +25,38 @@
         copyLayer(p, "Connectivity");
 
         p.copyTemplate(p.ctx,
-            'RestAPIApplication/web.xml.tmpl',
-            'app/src/main/webapp/WEB-INF/web.xml');
+            'RestAPIApplication/application.java.tmpl',
+            'rest/src/main/java/' + p.javaPackageDir + '/rest/' + p.name + 'RestApplication.java');
+
+        p.copyTemplate(p.ctx,
+            'RestAPIApplication/Launcher.java.tmpl',
+            'app/src/main/java/' + p.javaPackageDir + '/app/' + p.name + 'Launcher.java');
+
+        if (p.hasFeature('security')) {
+            p.copyToConfig(p.ctx, 'RestAPIApplication/web-shiro.ini.tmpl', 'web-shiro.ini');
+            p.copyBinary(p.ctx, 'RestAPIApplication/dev-keystore.p12', 'app/src/dist/config/development/security/keystore-' + p.name.toLowerCase() + '.p12');
+            p.copyBinary(p.ctx, 'RestAPIApplication/dev-keystore.p12', 'app/src/test/resources/security/keystore-' + p.name.toLowerCase() + '.p12');
+        }
+
+        p.copyTemplate(p.ctx,
+            'RestAPIApplication/bootstrap-test.tmpl',
+            'app/src/test/java/' + p.javaPackageDir + '/app/BootstrapTest.java');
+
+        p.copyTemplate(p.ctx,
+            'RestAPIApplication/bootstrap.tmpl',
+            'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/' + p.name + 'ApplicationAssembler.java');
+
+        p.copyTemplate(p.ctx,
+            'RestAPIApplication/SETUP.tmpl',
+            'SETUP.txt');
+
+        p.copyTemplate(p.ctx,
+            'RestAPIApplication/customUnixStartScript.txt.tmpl',
+            'app/src/scripts/customUnixStartScript.txt');
+
+        p.copyTemplate(p.ctx,
+            'RestAPIApplication/customWindowsStartScript.txt.tmpl',
+            'app/src/scripts/customWindowsStartScript.txt');
     }
 };
 
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/application.java.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/application.java.tmpl
new file mode 100644
index 0000000..e188755
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/application.java.tmpl
@@ -0,0 +1,97 @@
+<%#
+ *  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 <%= polygene.packageName %>.rest;
+
+import org.apache.polygene.library.restlet.PolygeneRestApplication;
+import org.restlet.Context;
+import org.restlet.routing.Router;
+import org.restlet.security.Enroler;
+import org.restlet.security.Verifier;
+<%
+for( var moduleName in polygene.modules) {
+    var module = polygene.modules[moduleName];
+    for( var idx2 in module.cruds ) {
+        var crud = module.cruds[idx2];
+%>import <%= polygene.packageName %>.model.<%= moduleName %>.<%= crud.name %>;
+<%
+    }
+}
+
+if( hasFeature('security') ) {
+%>import <%= polygene.packageName %>.rest.security.DefaultEnroler;
+import <%= polygene.packageName %>.rest.security.DefaultVerifier;
+<%
+}
+%>
+public class <%= polygene.name %>RestApplication extends PolygeneRestApplication
+{
+    public <%= polygene.name %>RestApplication()
+    {
+        super( "/<%= polygene.name.toLowerCase() %>/", createContext() );
+    }
+
+    @Override
+    protected void addRoutes( Router router )
+    {
+<%
+for( var moduleName in polygene.modules) {
+    var module = polygene.modules[moduleName];
+    for( var idx2 in module.cruds ) {
+        var crud = module.cruds[idx2];
+%>        addResourcePath( "<%= crud.name.toLowerCase() %>", <%= crud.name %>.class, basePath );
+<%
+    }
+}
+%>    }
+
+    @Override
+    public synchronized void start()
+        throws Exception
+    {
+        super.start();
+        System.out.println( "REST API defined;" );
+        printRoutes( System.out );
+    }
+
+    protected Verifier createVerifier()
+    {
+<% if( hasFeature('security') ) {
+%>        return objectFactory.newObject(DefaultVerifier.class, this);
+<% } else {
+%>        // Security was not specified during generation, and Verifier is not needed.
+        return null;
+<% }
+%>    }
+
+    protected Enroler createEnroler()
+    {
+<% if( hasFeature('security') ) {
+%>        return objectFactory.newObject(DefaultEnroler.class, this);
+<% } else {
+%>        // Security was not specified during generation, and Enroler is not needed.
+        return null;
+<% }
+%>    }
+
+    private static Context createContext()
+    {
+        return new Context("<%= polygene.packageName %>.rest");
+    }
+}
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl
new file mode 100644
index 0000000..a0cad7a
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl
@@ -0,0 +1,406 @@
+<%#
+ *  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 <%= polygene.packageName %>.app;
+
+import <%= polygene.packageName %>.bootstrap.<%= polygene.name %>ApplicationAssembler;
+
+import <%= polygene.packageName %>.bootstrap.config.ConfigModule;
+import <%= polygene.packageName %>.bootstrap.config.ConfigurationLayer;
+import javax.json.Json;
+import javax.json.JsonWriter;
+
+import org.apache.polygene.api.structure.Application;
+import org.apache.polygene.api.structure.ApplicationDescriptor;
+import org.apache.polygene.bootstrap.ApplicationAssembly;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
+import org.apache.polygene.tools.model.descriptor.ApplicationDetailDescriptor;
+import org.apache.polygene.tools.model.descriptor.ApplicationDetailDescriptorBuilder;
+<%
+polygene.ignoredTest = ['MySQL', 'PostgreSQL'].indexOf(polygene.entitystore) != -1 || ['SQL'].indexOf(polygene.indexing) != -1;
+polygene.needsDocker = ['Cassandra', 'Redis', 'Riak', 'MongoDB'].indexOf(polygene.entitystore) != -1 || ['Memcache'].indexOf(polygene.caching) != -1;
+polygene.needsDelayChecker = false;
+
+if( polygene.entitystore !== 'Memory' && polygene.entitystore !== 'Preferences' ) {
+    if( polygene.entitystore.indexOf('SQL') < 0 ) {
+%>import org.apache.polygene.entitystore.<%= polygene.entitystore.toLowerCase() %>.<%= polygene.entitystore %>EntityStoreConfiguration;
+<% } else {
+%>import org.apache.polygene.entitystore.sql.SQLEntityStoreConfiguration;
+<%
+    }
+}
+if( polygene.caching === 'Memcache' ) {
+%>import org.apache.polygene.cache.memcache.MemcacheConfiguration;
+<%
+}
+if( polygene.needsDocker ) {
+%>
+import com.spotify.docker.client.DefaultDockerClient;
+import pl.domzal.junit.docker.rule.DockerRule;
+import pl.domzal.junit.docker.rule.DockerRuleBuilder;
+import pl.domzal.junit.docker.rule.WaitFor;
+import pl.domzal.junit.docker.rule.wait.StartCondition;
+import pl.domzal.junit.docker.rule.wait.StartConditionCheck;
+
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+import org.junit.Assume;
+import org.junit.ClassRule;
+<%
+}
+%>
+import org.junit.Test;
+
+<%
+if( polygene.ignoredTest ) {
+%>
+// This combination of EntityStore and Index/Query extensions requires some manual setup
+// This the respective extensions documentation for details
+@org.junit.Ignore
+<%
+}
+%>
+public class BootstrapTest
+{
+    @Test
+    public void applicationBootstrapSucceeds()
+        throws Exception
+    {
+        <%= polygene.name %>Launcher launcher = new <%= polygene.name %>Launcher()
+        {
+            @Override
+            protected LayeredApplicationAssembler createApplicationAssembler()
+                throws AssemblyException
+            {
+                return new <%= polygene.name %>ApplicationAssembler( "LaunchTest", "0", Application.Mode.development, BootstrapTest.this::setupTest )
+                {
+                    @Override
+                    protected void onModelCreated( ApplicationDescriptor model )
+                    {
+                        ApplicationDetailDescriptor modelDescription = ApplicationDetailDescriptorBuilder.createApplicationDetailDescriptor( model );
+                        System.out.println( "Application Model" );
+                        JsonWriter writer = Json.createWriter( System.out );
+                        System.out.println();
+                        writer.writeObject( modelDescription.toJson() );
+                        super.onModelCreated( model );
+                    }
+                };
+            }
+        };
+        launcher.initialize();
+        System.out.println("Application Launched...");
+        // Thread.sleep( 3600000L );
+        launcher.shutdown();
+    }
+
+    private void setupTest( ApplicationAssembly assembly )
+    {
+        entityStoreSetup( assembly );
+<%
+if( polygene.caching === 'Memcache' ) {
+%>        cacheSetup( assembly );
+<%
+}
+if( polygene.indexing === 'SQL' ) {
+%>        indexingSetup( assembly );
+<%
+}
+%>    }
+<%
+if(  polygene.entitystore === 'Cassandra' ) {
+%>
+    private void entityStoreSetup( ApplicationAssembly assembly )
+    {
+        ModuleAssembly config = assembly.layer( ConfigurationLayer.NAME ).module( ConfigModule.NAME );
+        CassandraEntityStoreConfiguration defaults = config.forMixin( CassandraEntityStoreConfiguration.class ).declareDefaults();
+        String host = ES_DOCKER.getDockerHost();
+        int port = Integer.valueOf( ES_DOCKER.getExposedContainerPort( "9042/tcp" ) );
+        System.out.println("Cassandra: " + host + ":" + port);
+        defaults.hostnames().set( host + ':' + port );
+        defaults.createIfMissing().set( true );
+    }
+
+    @ClassRule
+    public static final OptionalDockerRule ES_DOCKER = new OptionalDockerRule( DockerRule.builder()
+                                                         .imageName( "cassandra:3.10"  )
+                                                         .publishAllPorts( true )
+                                                         .waitForTimeout( 120 )
+                                                         .waitFor( WaitFor.logMessageSequence( "Starting listening for CQL clients" ) ) );
+<% }
+if(  polygene.entitystore === 'DerbySQL' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'File' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'Geode' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'H2SQL' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'Hazelcast' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'JClouds' ) {
+%>
+    private void entityStoreSetup( ApplicationAssembly assembly )
+    {
+        // Assembly use a transient JClouds provider
+    }
+<% }
+if(  polygene.entitystore === 'Jdbm' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'LevelDB' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'Memory' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'MongoDB' ) {
+%>
+    private void entityStoreSetup( ApplicationAssembly assembly )
+    {
+        ModuleAssembly config = assembly.layer( ConfigurationLayer.NAME ).module( ConfigModule.NAME );
+        MongoDBEntityStoreConfiguration mongoConfig = config.forMixin( MongoDBEntityStoreConfiguration.class ).declareDefaults();
+        mongoConfig.hostname().set( ES_DOCKER.getDockerHost() );
+        mongoConfig.port().set( Integer.valueOf( ES_DOCKER.getExposedContainerPort( "27017/tcp" ) ) );
+    }
+
+    @ClassRule
+    public static final OptionalDockerRule ES_DOCKER = new OptionalDockerRule( DockerRule.builder()
+                                                            .imageName( "mongo:3.5.8" )
+                                                            .expose( "27017" )
+                                                            .waitForTimeout( 120 )
+                                                            .waitFor( WaitFor.tcpPort(27017) ) );
+<% }
+if(  polygene.entitystore === 'MySQL' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+        // See the @Ignore annotation above
+        throw new UnsupportedOperationException();
+    }
+<% }
+if(  polygene.entitystore === 'PostgreSQL' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+        // See the @Ignore annotation above
+        throw new UnsupportedOperationException();
+    }
+<% }
+if(  polygene.entitystore === 'Preferences' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if(  polygene.entitystore === 'Redis' ) {
+%>
+    private void entityStoreSetup( ApplicationAssembly assembly )
+    {
+        ModuleAssembly config = assembly.layer( ConfigurationLayer.NAME ).module( ConfigModule.NAME );
+
+        RedisEntityStoreConfiguration redisConfig = config.forMixin( RedisEntityStoreConfiguration.class )
+                                                          .declareDefaults();
+        redisConfig.host().set( ES_DOCKER.getDockerHost() );
+        redisConfig.port().set( Integer.valueOf( ES_DOCKER.getExposedContainerPort( "6379/tcp" ) ) );
+    }
+
+    @ClassRule
+    public static final OptionalDockerRule ES_DOCKER = new OptionalDockerRule( DockerRule.builder()
+                                                         .imageName( "redis:3.2.8-alpine"  )
+                                                         .expose( "6379" )
+                                                         .waitForTimeout( 120 )
+                                                         .waitFor( WaitFor.tcpPort( 6379 ) ) );
+<% }
+if(  polygene.entitystore === 'Riak' ) {
+    polygene.needsDelayChecker = true;
+%>
+    private void entityStoreSetup( ApplicationAssembly assembly )
+    {
+        ModuleAssembly config = assembly.layer( ConfigurationLayer.NAME ).module( ConfigModule.NAME );
+
+        RiakEntityStoreConfiguration riakConfig = config.forMixin( RiakEntityStoreConfiguration.class ).declareDefaults();
+        String host = ES_DOCKER.getDockerHost();
+        String port = ES_DOCKER.getExposedContainerPort( "8087/tcp" );
+        riakConfig.hosts().set( java.util.Collections.singletonList( host + ':' + port ) );
+    }
+
+    @ClassRule
+    public static final OptionalDockerRule ES_DOCKER = new OptionalDockerRule( DockerRule.builder()
+                                                         .imageName( "basho/riak-kv:ubuntu-2.2.3"  )
+                                                         .expose( "8087" )
+                                                         .waitForTimeout( 120 )
+                                                         .waitFor( WaitFor.logMessageSequence( "riak_auth_mods started on node" ) )
+                                                         .waitFor( new DelayChecker( 3000L ) ) );
+<% }
+if(  polygene.entitystore === 'SQLite' ) {
+%>
+    private void entityStoreSetup(ApplicationAssembly assembly )
+    {
+    }
+<% }
+if( polygene.caching === 'Memcache' ) {
+%>
+
+    private void cacheSetup( ApplicationAssembly assembly )
+    {
+        ModuleAssembly config = assembly.layer( ConfigurationLayer.NAME ).module( ConfigModule.NAME );
+
+        MemcacheConfiguration memcacheConfig = config.forMixin( MemcacheConfiguration.class ).declareDefaults();
+        memcacheConfig.addresses().set( CACHE_DOCKER.getDockerHost() + ":" + CACHE_DOCKER.getExposedContainerPort( "11211/tcp" ) );
+    }
+
+    @ClassRule
+    public static final OptionalDockerRule CACHE_DOCKER = new OptionalDockerRule( DockerRule.builder()
+                                                              .imageName( "memcached:1.4.36-alpine"  )
+                                                              .expose( "11211" )
+                                                              .waitForTimeout( 120 )
+                                                              .waitFor( WaitFor.tcpPort( 11211 ) ) );
+
+<%
+}
+if( polygene.indexing === 'SQL' ) {
+%>
+    private void indexingSetup( ApplicationAssembly assembly )
+    {
+        // See the @Ignore annotation above
+        throw new UnsupportedOperationException();
+    }
+<%
+}
+%>
+
+<%
+if( polygene.needsDocker ) {
+%>
+    /**
+     * This JUnit Rule will skip tests if no Docker service is available.
+     */
+    public static class OptionalDockerRule implements TestRule
+    {
+        private final DockerRuleBuilder dockerRuleBuilder;
+        private DockerRule dockerRule;
+
+        private OptionalDockerRule( DockerRuleBuilder dockerRuleBuilder )
+        {
+            this.dockerRuleBuilder = dockerRuleBuilder;
+        }
+
+        @Override
+        public Statement apply( Statement base, Description description )
+        {
+            try
+            {
+                DefaultDockerClient.fromEnv().build().listImages();
+            }
+            catch( Throwable ex )
+            {
+                Assume.assumeNoException( ex );
+            }
+
+            dockerRule = dockerRuleBuilder.build();
+            return dockerRule.apply( base, description );
+        }
+
+        public String getDockerHost()
+        {
+            return dockerRule.getDockerHost();
+        }
+
+        public String getExposedContainerPort( String containerPort )
+        {
+            return dockerRule.getExposedContainerPort( containerPort );
+        }
+    }
+<%
+}
+%>
+
+<%
+if( polygene.needsDelayChecker ) {
+%>
+    private static class DelayChecker
+        implements StartCondition
+    {
+        private final long millis;
+        private final long doneAt;
+
+        DelayChecker( long millis )
+        {
+            this.millis = millis;
+            this.doneAt = System.currentTimeMillis() + millis;
+        }
+
+        @Override
+        public StartConditionCheck build( DockerRule currentRule )
+        {
+            return new StartConditionCheck()
+            {
+                @Override
+                public boolean check()
+                {
+                    return System.currentTimeMillis() > doneAt;
+                }
+
+                @Override
+                public String describe()
+                {
+                    return String.format( "delay check %d ms", millis );
+                }
+
+                @Override
+                public void after()
+                {
+                }
+            };
+        }
+    }
+<% }
+%>}
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap.tmpl
new file mode 100644
index 0000000..bb16465
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap.tmpl
@@ -0,0 +1,72 @@
+<%#
+ *  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 <%= polygene.packageName %>.bootstrap;
+
+import java.util.function.Consumer;
+import org.apache.polygene.api.structure.Application;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ApplicationAssembly;
+import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
+<% if( polygene.hasFeature('envisage' ) ) {
+%>import org.apache.polygene.envisage.Envisage;
+import org.apache.polygene.api.structure.ApplicationDescriptor;
+<% } %>
+import <%= polygene.packageName %>.bootstrap.connectivity.ConnectivityLayer;
+import <%= polygene.packageName %>.bootstrap.config.ConfigurationLayer;
+import <%= polygene.packageName %>.bootstrap.domain.DomainLayer;
+import <%= polygene.packageName %>.bootstrap.infrastructure.InfrastructureLayer;
+
+public class <%= polygene.name %>ApplicationAssembler extends LayeredApplicationAssembler
+{
+    private Consumer<ApplicationAssembly> customize;
+
+    public <%= polygene.name %>ApplicationAssembler( String name, String version, Application.Mode mode, Consumer<ApplicationAssembly> customize )
+        throws AssemblyException
+    {
+        super( name, version, mode );
+        this.customize = customize;
+    }
+
+    @Override
+    protected void assembleLayers( ApplicationAssembly assembly )
+        throws AssemblyException
+    {
+        LayerAssembly config = this.createLayer( ConfigurationLayer.class );
+        ModuleAssembly configModule = assemblerOf( ConfigurationLayer.class ).configModule();
+        LayerAssembly infra = new InfrastructureLayer(configModule).assemble( assembly.layer( InfrastructureLayer.NAME ) );
+        LayerAssembly domain = this.createLayer( DomainLayer.class );
+        LayerAssembly connect = this.createLayer( ConnectivityLayer.class );
+        connect.uses( domain );
+        connect.uses( infra );
+        domain.uses( infra );
+        infra.uses( config );
+        customize.accept( assembly );
+    }
+<% if( polygene.hasFeature('envisage' ) ) {
+%>
+    @Override
+    protected void onModelCreated( ApplicationDescriptor model )
+    {
+        new Envisage().run( model );
+    }
+<% }
+%>}
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/customUnixStartScript.txt.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/customUnixStartScript.txt.tmpl
new file mode 100644
index 0000000..e2867fd
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/customUnixStartScript.txt.tmpl
@@ -0,0 +1,175 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  ${applicationName} start up script for UN*X
+##
+##############################################################################
+
+# default to 'development' mode
+if [ -z \$APP_MODE ] ; then
+    export APP_MODE=development
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: \$0 may be a link
+PRG="\$0"
+# Need this for relative symlinks.
+while [ -h "\$PRG" ] ; do
+    ls=`ls -ld "\$PRG"`
+    link=`expr "\$ls" : '.*-> \\(.*\\)\$'`
+    if expr "\$link" : '/.*' > /dev/null; then
+        PRG="\$link"
+    else
+        PRG=`dirname "\$PRG"`"/\$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"\$PRG\"`/${appHomeRelativePath}" >/dev/null
+APP_HOME="`pwd -P`"
+cd "\$SAVED" >/dev/null
+
+APP_NAME="${applicationName}"
+APP_BASE_NAME=`basename "\$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and ${optsEnvironmentVar} to pass JVM options to this script.
+DEFAULT_JVM_OPTS=${defaultJvmOpts}
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "\$*"
+}
+
+die () {
+    echo
+    echo "\$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=\$APP_HOME/config/\$APP_MODE:$classpath
+
+# Determine the Java command to use to start the JVM.
+if [ -n "\$JAVA_HOME" ] ; then
+    if [ -x "\$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="\$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="\$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "\$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: \$JAVA_HOME
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "\$cygwin" = "false" -a "\$darwin" = "false" -a "\$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ \$? -eq 0 ] ; then
+        if [ "\$MAX_FD" = "maximum" -o "\$MAX_FD" = "max" ] ; then
+            MAX_FD="\$MAX_FD_LIMIT"
+        fi
+        ulimit -n \$MAX_FD
+        if [ \$? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: \$MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: \$MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if \$darwin; then
+    GRADLE_OPTS="\$GRADLE_OPTS \\"-Xdock:name=\$APP_NAME\\" \\"-Xdock:icon=\$APP_HOME/media/gradle.icns\\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if \$cygwin ; then
+    APP_HOME=`cygpath --path --mixed "\$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "\$CLASSPATH"`
+    JAVACMD=`cygpath --unix "\$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in \$ROOTDIRSRAW ; do
+        ROOTDIRS="\$ROOTDIRS\$SEP\$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^(\$ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "\$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="\$OURCYGPATTERN|(\$GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "\$@" ; do
+        CHECK=`echo "\$arg"|egrep -c "\$OURCYGPATTERN" -`
+        CHECK2=`echo "\$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ \$CHECK -ne 0 ] && [ \$CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args\$i`=`cygpath --path --ignore --mixed "\$arg"`
+        else
+            eval `echo args\$i`="\"\$arg\""
+        fi
+        i=\$((i+1))
+    done
+    case \$i in
+        (0) set -- ;;
+        (1) set -- "\$args0" ;;
+        (2) set -- "\$args0" "\$args1" ;;
+        (3) set -- "\$args0" "\$args1" "\$args2" ;;
+        (4) set -- "\$args0" "\$args1" "\$args2" "\$args3" ;;
+        (5) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" ;;
+        (6) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" ;;
+        (7) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" "\$args6" ;;
+        (8) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" "\$args6" "\$args7" ;;
+        (9) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" "\$args6" "\$args7" "\$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\\\n "\$i" | sed "s/'/'\\\\\\\\''/g;1s/^/'/;\\\$s/\\\$/' \\\\\\\\/" ; done
+    echo " "
+}
+APP_ARGS=\$(save "\$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- \$DEFAULT_JVM_OPTS \$JAVA_OPTS \$${optsEnvironmentVar} <%% if ( appNameSystemProperty ) { %>"\"-D${appNameSystemProperty}=\$APP_BASE_NAME\"" <%% } %>-classpath "\"\$CLASSPATH\"" ${mainClassName} "\$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "\$(uname)" = "Darwin" ] && [ "\$HOME" = "\$PWD" ]; then
+  cd "\$(dirname "\$0")"
+fi
+
+exec "\$JAVACMD" "\$@"
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/customWindowsStartScript.txt.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/customWindowsStartScript.txt.tmpl
new file mode 100644
index 0000000..8f262bc
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/customWindowsStartScript.txt.tmpl
@@ -0,0 +1,89 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  ${applicationName} startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.\
+
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%${appHomeRelativePath}
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and ${optsEnvironmentVar} to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=${defaultJvmOpts}
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto setmode
+
+set CMD_LINE_ARGS=%*
+
+:setmode
+if "x%APP_MODE%" <> "x" goto execute
+set APP_MODE=development
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\\config\\%APP_MODE%;$classpath
+
+@rem Execute ${applicationName}
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% <%% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<%% } %> -classpath "%CLASSPATH%" ${mainClassName} %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable ${exitEnvironmentVar} if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%${exitEnvironmentVar}%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/dev-keystore.p12 b/tools/generator-polygene/app/templates/RestAPIApplication/dev-keystore.p12
new file mode 100644
index 0000000..2225309
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/dev-keystore.p12
Binary files differ
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/web-shiro.ini.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/web-shiro.ini.tmpl
new file mode 100644
index 0000000..7ebfeb3
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/web-shiro.ini.tmpl
@@ -0,0 +1,44 @@
+# 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.
+
+# =============================================================================
+# Tutorial INI configuration
+#
+# Usernames/passwords are based on the classic Mel Brooks' film "Spaceballs" :)
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# Users and their (optional) assigned roles
+# username = password, role1, role2, ..., roleN
+# -----------------------------------------------------------------------------
+[users]
+root = secret, admin
+guest = guest, guest
+presidentskroob = 12345, president
+darkhelmet = ludicrousspeed, darklord, schwartz
+lonestarr = vespa, goodguy, schwartz
+
+# -----------------------------------------------------------------------------
+# Roles with assigned permissions
+# roleName = perm1, perm2, ..., permN
+# -----------------------------------------------------------------------------
+[roles]
+admin = *
+schwartz = lightsaber:*
+goodguy = winnebago:drive:eagle5
+
+[urls]
+/ = authcBasic
+/** = authcBasic
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/web.xml.tmpl b/tools/generator-polygene/app/templates/RestAPIApplication/web.xml.tmpl
deleted file mode 100644
index bdc6301..0000000
--- a/tools/generator-polygene/app/templates/RestAPIApplication/web.xml.tmpl
+++ /dev/null
@@ -1,46 +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.
-  ~
-  ~
-%><?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-         version="2.5">
-
-    <display-name><%= polygene.name %></display-name>
-<% if( polygene.hasFeature( "security" )) { %>
-    <listener>
-        <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
-    </listener>
-<% } %>
-<% if( polygene.hasFeature( "security" ) ) { %>
-    <filter>
-        <filter-name>ShiroFilter</filter-name>
-        <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
-    </filter>
-<% } %>
-<% if( polygene.hasFeature( "security" ) ) { %>
-    <!-- Filter all web requests.  This filter mapping is typically declared
-        before all others to ensure any other filters are secured as well: -->
-    <filter-mapping>
-        <filter-name>ShiroFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-<% } %>
-
-</web-app>
diff --git a/tools/generator-polygene/app/templates/UserInterfaceLayer/CommandLineModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/UserInterfaceLayer/CommandLineModule/bootstrap.tmpl
index eb158c8..244cc2c 100644
--- a/tools/generator-polygene/app/templates/UserInterfaceLayer/CommandLineModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/UserInterfaceLayer/CommandLineModule/bootstrap.tmpl
@@ -32,7 +32,7 @@
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        // AUTO-GENERATION not supported yet.
+        // AUTO-GENERATION not fully supported yet.
         return module;
     }
 }
\ No newline at end of file
diff --git a/tools/generator-polygene/app/templates/buildtool/build.js b/tools/generator-polygene/app/templates/buildtool/build.js
index 630908f..dbd3ac3 100644
--- a/tools/generator-polygene/app/templates/buildtool/build.js
+++ b/tools/generator-polygene/app/templates/buildtool/build.js
@@ -27,11 +27,11 @@
         }
         p.copyTemplate(p.ctx, 'buildtool/gradle-root.tmpl', 'build.gradle');
         p.copyTemplate(p.ctx, 'buildtool/settings.tmpl', 'settings.gradle');
-        p.copyTemplate(p.ctx, 'buildtool/gradlew.tmpl', 'gradlew');
-        p.copyTemplate(p.ctx, 'buildtool/gradlew-bat.tmpl', 'gradlew.bat');
+        p.copyTemplate(p.ctx, 'buildtool/wrapper/gradlew.tmpl', 'gradlew');
+        p.copyTemplate(p.ctx, 'buildtool/wrapper/gradlew-bat.tmpl', 'gradlew.bat');
 
-        p.ctx.fs.copy(p.ctx.templatePath('buildtool/gradle-wrapper.jar_'), p.ctx.destinationPath('gradle/wrapper/gradle-wrapper.jar'));
-        p.ctx.fs.copy(p.ctx.templatePath('buildtool/gradle-wrapper.properties_'), p.ctx.destinationPath('gradle/wrapper/gradle-wrapper.properties'));
+        p.copyBinary(p.ctx, 'buildtool/wrapper/gradle-wrapper.jar_', 'gradle/wrapper/gradle-wrapper.jar');
+        p.copyBinary(p.ctx, 'buildtool/wrapper/gradle-wrapper.properties_','gradle/wrapper/gradle-wrapper.properties');
     }
 };
 
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-app.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-app.tmpl
index 623ee78..22cd161 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-app.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-app.tmpl
@@ -17,26 +17,99 @@
  *
  *
 -%>
+apply plugin: 'application'
 
-plugins {
-  id 'war'
-  id "org.akhikhl.gretty" version "1.4.0"
+mainClassName="<%= polygene.packageName %>.app.<%= polygene.name %>Launcher"
+
+startScripts {
+  applicationName = "<%= polygene.name %>"
+  optsEnvironmentVar = "<%= polygene.name.toUpperCase() %>_OPTS"
+
+  // GC Tuning strategies, see https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/
+  // Strict memory bound
+  // defaultJvmOpts << "-Xmx512M -Xms512M"
+
+  // Goal oriented, "throughput" and "max pause"
+  // defaultJvmOpts << "-XX:MaxGCPauseMillis=300 -XX:GCTimeRatio=19"
+
+  // Garbage Collector
+  // OneOf; -XX:+UseG1GC, -XX:+UseConcMarkSweepGC, -XX:-UseParallelOldGC, -XX:+UseSerialGC
+  defaultJvmOpts << "-XX:+UseG1GC"
+
+  // Custom start scripts
+  unixStartScriptGenerator.template = resources.text.fromFile('src/scripts/customUnixStartScript.txt')
+  windowsStartScriptGenerator.template = resources.text.fromFile('src/scripts/customWindowsStartScript.txt')
 }
 
 dependencies {
-  compile project( ":bootstrap" )
-  compile project( ":model" )
-<% if( polygene.applicationtype === 'Rest API' ) {
-%>  compile project( ":rest" )<% } %>
+  implementation project( ":bootstrap" )
+  implementation project( ":model" )
+<%
+if( polygene.applicationtype === 'Rest API' ) {
+%>  implementation project( ":rest" )
+  implementation "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
+  runtimeOnly "org.restlet.jee:org.restlet.ext.servlet:$restletVersion"
+<%
+}
 
-  compile "org.apache.polygene.core:org.apache.polygene.core.spi:$polygeneVersion"
-  compile "org.apache.polygene.core:org.apache.polygene.core.bootstrap:$polygeneVersion"
-  compile "org.apache.polygene.libraries:org.apache.polygene.library.servlet:$polygeneVersion"
-<% if( polygene.applicationtype === 'Rest API' ) {
-%>  compile "javax.servlet:servlet-api:2.5"
-  compile "org.restlet.jee:org.restlet:2.3.4"<% } %>
+if( hasFeature( 'security' ) ) {
+%>  implementation "org.apache.polygene.libraries:org.apache.polygene.library.shiro-web:$polygeneVersion"
+<%
+}
+%>  implementation "org.apache.polygene.core:org.apache.polygene.core.spi:$polygeneVersion"
+  implementation "org.apache.polygene.core:org.apache.polygene.core.bootstrap:$polygeneVersion"
+  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.entitystore-<%= polygene.entitystoremodule.toLowerCase() %>:$polygeneVersion"
+  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.indexing-<%= polygene.indexing.toLowerCase() %>:$polygeneVersion"
+  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.serialization-javaxjson:$polygeneVersion"
+<%
+if( polygene.caching !== "None" ) {
+%>  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.cache-<%= polygene.caching.toLowerCase() %>:$polygeneVersion"
+<%
+}
+if( polygene.metrics !== "None" ) {
+%>  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.metrics-<%= polygene.metrics.toLowerCase() %>:$polygeneVersion"
+<%
+}
+if( hasFeature( 'envisage' ) ) {
+%>  implementation "org.apache.polygene.tools:org.apache.polygene.tool.envisage:$polygeneVersion"
+<%
+}
+if( polygene.entitystore == 'LevelDB'  ) {
+%>  runtimeOnly "org.fusesource.leveldbjni:leveldbjni-all:$levelDbVersion"
+<%
+}
+if( polygene.entitystore == 'DerbySQL'  ) {
+%>  runtimeOnly "org.apache.derby:derby:$derbyVersion"
+<%
+}
+if( polygene.entitystore == 'H2SQL'  ) {
+%>  runtimeOnly "com.h2database:h2:$h2Version"
+<%
+}
+if( polygene.entitystore == 'MySQL'  ) {
+%>  runtimeOnly "mysql:mysql-connector-java:$mysqlVersion"
+<%
+}
+if( polygene.entitystore == 'PostgreSQL' || polygene.indexing == 'SQL' ) {
+%>  runtimeOnly "org.postgresql:postgresql:$postgresVersion"
+<%
+}
+if( polygene.entitystore == 'SQLite'  ) {
+%>  runtimeOnly "org.xerial:sqlite-jdbc:$sqliteVersion"
+<%
+}
+%>  runtimeOnly "org.apache.polygene.core:org.apache.polygene.core.runtime:$polygeneVersion"
+  runtimeOnly "org.apache.johnzon:johnzon-core:$johnzonVersion"
+  runtimeOnly "org.apache.johnzon:johnzon-mapper:$johnzonVersion"
+  runtimeOnly "org.apache.geronimo.specs:geronimo-json_1.1_spec:1.0"
+  runtimeOnly "ch.qos.logback:logback-classic:$logbackVersion"
+  runtimeOnly "ch.qos.logback:logback-core:$logbackVersion"
 
-  runtime "org.apache.polygene.core:org.apache.polygene.core.runtime:$polygeneVersion"
-  runtime "org.restlet.jee:org.restlet.ext.servlet:2.3.4"
+  testImplementation "org.apache.polygene.tools:org.apache.polygene.tool.model-detail:$polygeneVersion"
+  testImplementation "org.apache.polygene.core:org.apache.polygene.core.testsupport:$polygeneVersion"
+  testImplementation "com.github.tdomzal:junit-docker-rule:0.3"
+}
 
+tasks.withType(Tar){
+  compression = Compression.GZIP
 }
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
index 0d8dab2..13085c0 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
@@ -18,27 +18,48 @@
  *
 -%>
 dependencies {
-  compile project( ":model" )
-<% if( polygene.applicationtype === 'Rest API' ) {
-%>  compile project( ":rest" )<% } %>
+  implementation project( ":model" )
+<%
+if( polygene.applicationtype === 'Rest API' ) {
+%>  implementation project( ":rest" )
+<%
+}
+%>  implementation "org.apache.polygene.core:org.apache.polygene.core.spi:$polygeneVersion"
+  implementation "org.apache.polygene.core:org.apache.polygene.core.bootstrap:$polygeneVersion"
+  implementation "org.apache.polygene.libraries:org.apache.polygene.library.fileconfig:$polygeneVersion"
+<%
+if( polygene.applicationtype === 'Rest API' ) {
+    if( polygene.hasFeature('security') ) {
+%>  implementation "org.apache.polygene.libraries:org.apache.polygene.library.shiro-web:$polygeneVersion"
+<%
+    }
+%>  implementation "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
+  implementation "org.apache.polygene.libraries:org.apache.polygene.library.http:$polygeneVersion"
+<%
+}
 
-  compile "org.apache.polygene.core:org.apache.polygene.core.spi:$polygeneVersion"
-  compile "org.apache.polygene.core:org.apache.polygene.core.bootstrap:$polygeneVersion"
-
-  compile "org.apache.polygene.libraries:org.apache.polygene.library.fileconfig:$polygeneVersion"
-<% if( polygene.applicationtype === 'Rest API' ) { %>
-  compile "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
-<% } %>
-  compile "org.apache.polygene.extensions:org.apache.polygene.extension.entitystore-<%= polygene.entitystoremodule.toLowerCase() %>:$polygeneVersion"
-  compile "org.apache.polygene.extensions:org.apache.polygene.extension.indexing-<%= polygene.indexing.toLowerCase() %>:$polygeneVersion"
-  compile "org.apache.polygene.extensions:org.apache.polygene.extension.serialization-<%= polygene.serialization.toLowerCase() %>:$polygeneVersion"
-
-<% if( polygene.caching !== "None" ) { %>
-  compile "org.apache.polygene.extensions:org.apache.polygene.extension.cache-<%= polygene.caching.toLowerCase() %>:$polygeneVersion"
-<% } %>
-
-<% if( polygene.metrics !== "None" ) { %>
-  compile "org.apache.polygene.extensions:org.apache.polygene.extension.metrics-<%= polygene.metrics.toLowerCase() %>:$polygeneVersion"
-<% } %>
-
-}
\ No newline at end of file
+if( polygene.entitystore.indexOf('SQL') >= 0 || polygene.indexing === 'SQL' ) {
+%>  implementation "org.apache.polygene.libraries:org.apache.polygene.library.sql-<%= polygene.dbpool.toLowerCase() %>:$polygeneVersion"
+<%
+}
+%>
+  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.entitystore-<%= polygene.entitystoremodule.toLowerCase() %>:$polygeneVersion"
+  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.indexing-<%= polygene.indexing.toLowerCase() %>:$polygeneVersion"
+  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.serialization-javaxjson:$polygeneVersion"
+<%
+if( polygene.caching !== "None" ) {
+%>  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.cache-<%= polygene.caching.toLowerCase() %>:$polygeneVersion"
+<%
+}
+    if( polygene.metrics !== "None" ) {
+%>  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.metrics-<%= polygene.metrics.toLowerCase() %>:$polygeneVersion"
+<%
+    }
+if( polygene.hasFeature('jmx' ) ) {
+%>  implementation "org.apache.polygene.libraries:org.apache.polygene.library.jmx:$polygeneVersion"
+<%
+    }
+if( polygene.hasFeature('envisage' ) ) {
+%>  implementation "org.apache.polygene.tools:org.apache.polygene.tool.envisage:$polygeneVersion"
+<% }
+%>}
\ No newline at end of file
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl
index d9a954f..6b5dcab 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl
@@ -21,16 +21,16 @@
 dependencies {
 
 <% if( hasFeature( 'security' ) ) {
-%>    compile "org.apache.polygene.libraries:org.apache.polygene.library.shiro-core:$polygeneVersion"
+%>    implementation "org.apache.polygene.libraries:org.apache.polygene.library.shiro-core:$polygeneVersion"
 <% } %>
 <% if( polygene.applicationtype === 'Rest API' ) {
-%>    compile "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
+%>    implementation "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
 <% } %>
 <% if( polygene.hasFeature( 'mixin scripting' ) ) {
-%>    compile "org.apache.polygene.libraries:org.apache.polygene.library.scripting:$polygeneVersion"
+%>    implementation "org.apache.polygene.libraries:org.apache.polygene.library.scripting:$polygeneVersion"
 <% } %>
 <% if( polygene.hasFeature( 'jmx' ) ) {
-%>    compile "org.apache.polygene.libraries:org.apache.polygene.library.jmx:$polygeneVersion"
+%>    implementation "org.apache.polygene.libraries:org.apache.polygene.library.jmx:$polygeneVersion"
 <% } %>
 
 }
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl
index d07ac02..098e919 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl
@@ -19,11 +19,11 @@
 -%>
 
 dependencies {
-  compile project( ":model" )
+  implementation project( ":model" )
 
-  compile "org.apache.polygene.core:org.apache.polygene.core.api:$polygeneVersion"
+  implementation "org.apache.polygene.core:org.apache.polygene.core.api:$polygeneVersion"
 <% if( polygene.applicationtype === 'Rest API' ) {
-%>    compile "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
+%>  implementation "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
 <% } %>
 
 }
\ No newline at end of file
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl
index 52b61d5..6d2a6bf 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl
@@ -18,19 +18,54 @@
  *
 -%>
 
-version = 1.0
-
-rootProject.ext {
-  polygeneVersion = "<%=polygene.version %>"
+if( project.version == 'unspecified' )
+{
+  project.version = System.properties.version ?: '0'
 }
 
+rootProject.ext {
+  polygeneVersion = "<%= polygene.version %>"
+  logbackVersion = "1.2.3"
+  johnzonVersion = "1.1.0"
+<% if( polygene.applicationtype === "Rest API" ) {
+%>  jettyVersion = "9.2.17.v20160517"
+  restletVersion = "2.3.4"
+<%
+}
+if( polygene.entitystore == 'DerbySQL'  ) {
+%>  derbyVersion = "10.13.1.1"
+<%
+}
+if( polygene.entitystore == 'H2SQL'  ) {
+%>  h2Version = "1.4.194"
+<%
+}
+if( polygene.entitystore == 'MySQL'  ) {
+%>  mysqlVersion = "6.0.6"
+<%
+}
+if( polygene.entitystore == 'PostgreSQL' || polygene.indexing == 'SQL' ) {
+%>  postgresVersion = "42.0.0"
+<%
+}
+if( polygene.entitystore == 'LevelDB'  ) {
+%>  levelDbVersion = "1.8"
+<%
+}
+if( polygene.entitystore == 'SQLite'  ) {
+%>  sqliteVersion = "3.16.1"
+<%
+}
+%>}
+
 allprojects() {
-  apply plugin: 'java'
+  apply plugin: 'java-library'
   apply plugin: 'maven'
 
   defaultTasks 'assemble'
 
   repositories {
+    mavenLocal()
     mavenCentral()
     maven { name 'restlet-repo'; url 'http://maven.restlet.org/' }
 <% if( polygene.entitystore == 'Jdbm' ) {
@@ -38,7 +73,7 @@
   }
 
   dependencies {
-    compile "org.apache.polygene.core:org.apache.polygene.core.api:$polygeneVersion"
-    testCompile "org.apache.polygene.core:org.apache.polygene.core.testsupport:$polygeneVersion"
+    implementation "org.apache.polygene.core:org.apache.polygene.core.api:$polygeneVersion"
+    testImplementation "org.apache.polygene.core:org.apache.polygene.core.testsupport:$polygeneVersion"
   }
 }
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.jar_ b/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.jar_
deleted file mode 100644
index 0087cd3..0000000
--- a/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.jar_
+++ /dev/null
Binary files differ
diff --git a/tools/generator-polygene/app/templates/buildtool/gradlew-bat.tmpl b/tools/generator-polygene/app/templates/buildtool/gradlew-bat.tmpl
deleted file mode 100644
index 3d06f18..0000000
--- a/tools/generator-polygene/app/templates/buildtool/gradlew-bat.tmpl
+++ /dev/null
@@ -1,109 +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.
- *
- *
--%>
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem  Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/tools/generator-polygene/app/templates/buildtool/gradlew.tmpl b/tools/generator-polygene/app/templates/buildtool/gradlew.tmpl
deleted file mode 100755
index 11c35cc..0000000
--- a/tools/generator-polygene/app/templates/buildtool/gradlew.tmpl
+++ /dev/null
@@ -1,183 +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.
- *
- *
--%>
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/tools/generator-polygene/build.gradle b/tools/generator-polygene/build.gradle
index 06eaa0e..c4589b7 100644
--- a/tools/generator-polygene/build.gradle
+++ b/tools/generator-polygene/build.gradle
@@ -36,6 +36,28 @@
 }
 
 /**
+ * Copy current Gradle Wrapper into generator templates.
+ *
+ * This is because we don't store the Gradle Wrapper in this project in order to
+ * - keep it in synch with the Gradle Wrapper used to build the whole Polygene SDK
+ * - don't include the Gradle Wrapper in the source distribution
+ */
+def prepareTemplateGradleWrapper = task( 'prepareTemplateGradleWrapper', type: Copy ) {
+  from( rootProject.rootDir ) {
+    include( 'gradlew' )
+    rename { 'gradlew.tmpl' }
+  }
+  from( rootProject.rootDir ) {
+    include( 'gradlew.bat' )
+    rename { 'gradlew-bat.tmpl' }
+  }
+  from( rootProject.file( 'gradle/wrapper/' ) ) {
+    rename { "${ it }_" }
+  }
+  into( 'app/templates/buildtool/wrapper' )
+}
+
+/**
  * Generate a Gradle init script that registers a maven repository with the currently built artifacts.
  * Used by the generator tests.
  */
@@ -61,7 +83,7 @@
  * Runs the generator tests.
  */
 def npmTest = task( 'npmTest', type: NpmTask ) {
-  dependsOn 'npmInstall', setsCurrentVersionToPackageJson, generateStageMavenRepositoryInitScript
+  dependsOn 'npmInstall', setsCurrentVersionToPackageJson, generateStageMavenRepositoryInitScript, prepareTemplateGradleWrapper
   description = 'Runs Polygene generator tests'
   args = [ 'run', 'test' ]
   inputs.file file( 'package.json' )
diff --git a/tools/generator-polygene/dev-status.xml b/tools/generator-polygene/dev-status.xml
index dc6c0e6..0928c46 100644
--- a/tools/generator-polygene/dev-status.xml
+++ b/tools/generator-polygene/dev-status.xml
@@ -24,13 +24,13 @@
         http://polygene.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <!--none,early,beta,stable,mature-->
-    <codebase>stable</codebase>
+    <codebase>none</codebase>
 
     <!-- none, brief, good, complete -->
-    <documentation>good</documentation>
+    <documentation>none</documentation>
 
     <!-- none, some, good, complete -->
-    <unittests>complete</unittests>
+    <unittests>none</unittests>
 
   </status>
   <licenses>
diff --git a/tools/generator-polygene/package.json b/tools/generator-polygene/package.json
index 57ac117..74f6290 100644
--- a/tools/generator-polygene/package.json
+++ b/tools/generator-polygene/package.json
@@ -1,7 +1,7 @@
 {
   "name": "generator-polygene",
   "version": "3.0.0",
-  "polygene_version": "3.0.0",
+  "polygene_version": "0",
   "description": "Generates an Apache Polygene project.",
   "homepage": "https://polygene.apache.org",
   "license": "Apache-2.0",
diff --git a/tools/src/docs/yeoman_polygene.txt b/tools/generator-polygene/src/docs/yeoman_polygene.txt
similarity index 78%
rename from tools/src/docs/yeoman_polygene.txt
rename to tools/generator-polygene/src/docs/yeoman_polygene.txt
index 0a9e779..85e50a7 100644
--- a/tools/src/docs/yeoman_polygene.txt
+++ b/tools/generator-polygene/src/docs/yeoman_polygene.txt
@@ -19,14 +19,29 @@
 
 [[tools-shell,Command Line Shell]]
 = Polygene Generator =
-Apache Polygene comes with a Yeoman code generator, to quickly set up a development
-environment for Polygene applications.
+Apache Polygene comes with a http://yeoman.io/[Yeoman] code generator, to
+quickly set up a project for Polygene applications.
+
+== Usage ==
+
+You will need `node` installed in your machine. In case you don't have it
+(you can check this typing `node --version` in your terminal) please visit
+this https://nodejs.org/en/download/[link].
+
+Then run the following command to install Yeoman and the Polygene generator:
 
 [source,shell]
 ----
-mkdir projectdirname
-cd projectdirname
-yo polygene
+$ npm install -g yo generator-polygene
+----
+
+Then run the following commands to get started:
+
+[source,shell]
+----
+$ mkdir projectdirname
+$ cd projectdirname
+$ yo polygene
 ----
 
 It will ask a lot of questions. For choice questions, you operate up and down, and with multi-choice, you
@@ -90,7 +105,16 @@
   SQLite
 ----
 
-=== Indexin/Query system ===
+If one of the SQL options are given, then a question of connection pool will pop up.
+
+[source,shell]
+----
+? Which connection pool do you want to use?
+  BoneCP
+> DBCP
+----
+
+=== Indexing/Query system ===
 Select of a pluggable Indexing and Query subsystem.
 
 In Polygene, the indexing/query system is separated from store and retrieve. This allows us to optimize direct
@@ -272,7 +296,11 @@
           "visibility": "application",
           "configuration" : [
             { "name": "backend", "type": "java.lang.String" },
-            { "name": "connectString", "type": "java.lang.String" }
+            { "name": "connectString", "type": "java.lang.String",
+              "description": [
+                  "The connection string to the authentication and authorization backend system."
+              ]
+            }
           ]
         }
       ]
@@ -325,11 +353,18 @@
 
 [source,shell]
 ----
-  create bootstrap/src/main/java/com/sensetif/sink/bootstrap/config/ConfigurationLayer.java
+   create bootstrap/src/main/java/com/sensetif/sink/bootstrap/config/ConfigurationLayer.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/InfrastructureLayer.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/domain/DomainLayer.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/connectivity/ConnectivityLayer.java
-   create app/src/main/webapp/WEB-INF/web.xml
+   create rest/src/main/java/com/sensetif/sink/rest/FloodRestApplication.java
+   create app/src/main/java/com/sensetif/sink/app/FloodLauncher.java
+   create app/src/main/config/development/web-shiro.ini
+   create app/src/main/config/qa/web-shiro.ini
+   create app/src/main/config/staging/web-shiro.ini
+   create app/src/main/config/production/web-shiro.ini
+   create app/src/test/java/com/sensetif/sink/app/BootstrapTest.java
+   create bootstrap/src/main/java/com/sensetif/sink/bootstrap/FloodApplicationAssembler.java
    create app/build.gradle
    create bootstrap/build.gradle
    create model/build.gradle
@@ -343,34 +378,53 @@
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/config/ConfigModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/MemcacheCachingModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/FileConfigurationModule.java
-   create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/SQLIndexingModule.java
+   create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/RdfIndexingModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/CodahaleMetricsModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/JavaxJsonSerializationModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/infrastructure/CassandraStorageModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/domain/CrudModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/domain/UserModule.java
-   create model/src/main/java/com/sensetif/sink/model/user/Users.java
-   create model/src/main/java/com/sensetif/sink/model/user/Roles.java
    create model/src/main/java/com/sensetif/sink/model/user/User.java
+   create model/src/main/java/com/sensetif/sink/model/user/Users.java
    create model/src/main/java/com/sensetif/sink/model/user/Role.java
+   create model/src/main/java/com/sensetif/sink/model/user/Roles.java
    create model/src/main/java/com/sensetif/sink/model/user/Permission.java
+   create model/src/main/java/com/sensetif/sink/model/user/Permissions.java
    create model/src/main/java/com/sensetif/sink/model/user/Group.java
    create model/src/main/java/com/sensetif/sink/model/user/Groups.java
    create model/src/main/java/com/sensetif/sink/model/user/AuthService.java
+   create model/src/main/java/com/sensetif/sink/model/user/AuthBackend.java
    create model/src/main/java/com/sensetif/sink/model/user/AuthConfiguration.java
-   create model/src/main/resources/com/sensetif/sink/model/user/AuthConfiguration.yaml
+   create app/src/main/config/development/AuthService.properties
+   create app/src/main/config/qa/AuthService.properties
+   create app/src/main/config/staging/AuthService.properties
+   create app/src/main/config/production/AuthService.properties
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/domain/OrganizationModule.java
-   create model/src/main/java/com/sensetif/sink/model/organization/Organizations.java
    create model/src/main/java/com/sensetif/sink/model/organization/Organization.java
    create model/src/main/java/com/sensetif/sink/model/organization/Project.java
+   create model/src/main/java/com/sensetif/sink/model/organization/Contract.java
+   create model/src/main/java/com/sensetif/sink/model/organization/ContractPart.java
+   create model/src/main/java/com/sensetif/sink/model/organization/Order.java
+   create model/src/main/java/com/sensetif/sink/model/organization/OrderConfirmation.java
    create model/src/main/java/com/sensetif/sink/model/organization/Invoice.java
    create model/src/main/java/com/sensetif/sink/model/organization/CreditLimit.java
-   create model/src/main/java/com/sensetif/sink/model/organization/OrderConfirmation.java
+   create model/src/main/java/com/sensetif/sink/model/organization/Label.java
    create model/src/main/java/com/sensetif/sink/model/organization/PaypalNotification.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/domain/SensorModule.java
-   create model/src/main/java/com/sensetif/sink/model/sensor/SensorData.java
-   create model/src/main/java/com/sensetif/sink/model/sensor/Sensor.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/SensorDetails.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/SensorPoll.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/Access.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/JsonDocumentAddress.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/XmlDocumentAddress.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/ModbusDeviceAddress.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/JsonPathSelector.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/XPathSelector.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/ModbusSelector.java
    create model/src/main/java/com/sensetif/sink/model/sensor/PollSchedule.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/AccessType.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/Address.java
+   create model/src/main/java/com/sensetif/sink/model/sensor/Selector.java
+   create bootstrap/src/main/java/com/sensetif/sink/bootstrap/domain/JmxModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/domain/SecurityModule.java
    create model/src/main/java/com/sensetif/sink/model/security/CryptoConfiguration.java
    create model/src/main/java/com/sensetif/sink/model/security/CryptoException.java
@@ -381,8 +435,18 @@
    create model/src/main/java/com/sensetif/sink/model/security/SecurityRepository.java
    create model/src/main/java/com/sensetif/sink/model/security/User.java
    create model/src/main/java/com/sensetif/sink/model/security/UserFactory.java
+   create bootstrap/src/main/java/com/sensetif/sink/bootstrap/connectivity/HttpServerModule.java
    create bootstrap/src/main/java/com/sensetif/sink/bootstrap/connectivity/RestApiModule.java
    create rest/src/main/java/com/sensetif/sink/rest/security/DefaultEnroler.java
    create rest/src/main/java/com/sensetif/sink/rest/security/DefaultVerifier.java
+   create app/src/main/config/development/es-cassandra.properties
+   create app/src/main/config/qa/es-cassandra.properties
+   create app/src/main/config/staging/es-cassandra.properties
+   create app/src/main/config/production/es-cassandra.properties
 ----
 
+Notice that there is a ++app/src/main/config++ directory with 4 sub-directories. Each of those subdirectories
+represents one of the modes in ++Application.Mode++. The start script will look for the environment variable
+SYS_ENVIRONMENT and select the ++Application.Mode++ accordingly and set the configuration directory
+(i.e. make it part of the CLASSPATH) to such.
+
diff --git a/tools/generator-polygene/test/generator_test.js b/tools/generator-polygene/test/generator_test.js
index d4ee454..1afd9a1 100644
--- a/tools/generator-polygene/test/generator_test.js
+++ b/tools/generator-polygene/test/generator_test.js
@@ -22,13 +22,13 @@
 var shell = require('shelljs');
 
 //See http://yeoman.io/authoring/testing.html
-
-// test with all defaults first.
-test();
+var restApiAppType = "Rest API";
+var commandLineAppType = "Command Line";
+var defaultAppType = restApiAppType;
 
 var appTypes = [
-    "Rest API",
-    'Command Line'
+    restApiAppType,
+    commandLineAppType
 ];
 
 var entityStores = [
@@ -64,12 +64,6 @@
     'EhCache'
 ];
 
-var serializations = [
-    'JavaxJson',
-    'JavaxXml',
-    'MessagePack'
-];
-
 var metricses = [
     'None',
     'Codahale'
@@ -79,84 +73,88 @@
     [],
     ['jmx'],
     ['mixin scripting'],
-    ['security'],
     ['jmx', 'mixin scripting'],
-    ['jmx', 'scripting'],
-    ['mixin scripting', 'scripting'],
-    ['jmx', 'mixin scripting', 'scripting']
+    ['security'],
+    ['jmx', 'security'],
+    ['mixin scripting', 'security'],
+    ['jmx', 'mixin scripting', 'security'],
+    ['envisage'],
+    ['jmx', 'envisage'],
+    ['mixin scripting', 'envisage'],
+    ['jmx', 'mixin scripting', 'envisage'],
+    ['security', 'envisage'],
+    ['jmx', 'security', 'envisage'],
+    ['mixin scripting', 'security', 'envisage'],
+    ['jmx', 'mixin scripting', 'security', 'envisage']
 ];
 
-appTypes.forEach(function (appType) {
-    test(appType, "Memory", "Rdf", "JavaxJson", "Memcache", "Codahale", "[]");
-});
+// test with all defaults first.
+test();
 
-entityStores.forEach(function (entityStore) {
-    test("Rest API", entityStore, "Rdf", "JavaxJson", "Memcache", "Codahale", "[]");
-});
-
-indexings.forEach(function (indexing) {
-    test("Rest API", "Memory", indexing, "JavaxJson", "Memcache", "Codahale", "[]");
-});
-
-serializations.forEach(function (serialization) {
-    test("Rest API", "Memory", "Rdf", serialization, "Memcache", "Codahale", "[]");
-});
-
-cachings.forEach(function (caching) {
-    test("Rest API", "Memory", "Rdf", "JavaxJson", caching, "Codahale", "[]");
-});
-
-metricses.forEach(function (metrics) {
-    test("Rest API", "Memory", "Rdf", "JavaxJson", "Memcache", metrics, "[]");
-});
-
-featuresset.forEach(function (feature) {
-    test("Rest API", "Memory", "Rdf", "JavaxJson", "Memcache", "Codahale", feature);
-});
-
-// All Tests !!!!
-if(process.env.TEST_ALL == 'yes') {
+if (process.env.TEST_ALL === 'yes') {
+    // All Tests !!!!
     appTypes.forEach(function (appType) {
         entityStores.forEach(function (entitystore) {
             indexings.forEach(function (indexing) {
-                serializations.forEach(function (serialization) {
-                    cachings.forEach(function (caching) {
-                        metricses.forEach(function (metrics) {
-                            featuresset.forEach(function (features) {
-                                test(appType, entitystore, indexing, serialization, caching, metrics, features)
-                            });
+                cachings.forEach(function (caching) {
+                    metricses.forEach(function (metrics) {
+                        featuresset.forEach(function (features) {
+                            test(appType, entitystore, indexing, caching, metrics, features)
                         });
                     });
                 });
             });
         });
     });
+} else {
+    // Subset
+    appTypes.forEach(function (appType) {
+        test(appType, "Memory", "Rdf", "Memcache", "Codahale", "[]");
+    });
+
+    entityStores.forEach(function (entityStore) {
+        test(defaultAppType, entityStore, "Rdf", "Memcache", "Codahale", "[]");
+    });
+
+    indexings.forEach(function (indexing) {
+        test(defaultAppType, "Memory", indexing, "Memcache", "Codahale", "[]");
+    });
+
+    cachings.forEach(function (caching) {
+        test(defaultAppType, "Memory", "Rdf", caching, "Codahale", "[]");
+    });
+
+    metricses.forEach(function (metrics) {
+        test(defaultAppType, "Memory", "Rdf", "Memcache", metrics, "[]");
+    });
+
+    featuresset.forEach(function (feature) {
+        test(defaultAppType, "Memory", "Rdf", "Memcache", "Codahale", feature);
+    });
 }
 
-function test(appType, entityStore, indexing, serialization, caching, metrics, features) {
+function test(appType, entityStore, indexing, caching, metrics, features) {
     describe('polygene-generator', function () {
-        var testName = 'generates a Gradle buildable Apache Polygene project with '
-            + entityStore + 'EntityStore, '
-            + indexing + 'Indexing, '
-            + serialization + 'Serialization, '
-            + caching + 'Caching, '
-            + metrics + 'Metrics';
-        if(features) {
-            testName += ', and ' + features;
+        var testName = appType + ' with '
+            + entityStore + ' EntityStore - '
+            + indexing + ' Indexing - '
+            + caching + ' Caching - '
+            + metrics + ' Metrics';
+        if (features && features.length > 0) {
+            testName += ' - ' + features.toString().replace(new RegExp(',', 'g'), ' - ');
         }
-        testName += '.';
-        var testDirName = testName.replace(new RegExp('[, ]','g'), '_');
+        var testDirName = testName.replace(new RegExp(' - ', 'g'), '_').replace(new RegExp(' ', 'g'), '_');
         it(testName,
             function () {
-                this.timeout(10000);
+                console.log("\n\nTest: " + testName);
+                this.timeout(60000);
                 return helpers.run(path.join(__dirname, '../app'))
-                    .inDir(path.join(__dirname, '../build/npm-test/'+testDirName))
+                    .inDir(path.join(__dirname, '../build/npm-test/' + testDirName))
                     .withPrompts({
-                        name: 'test-project',
+                        name: 'TestProject',
                         packageName: 'org.apache.polygene.generator.test',
                         applicationtype: appType,
                         entitystore: entityStore,
-                        serialization: serialization,
                         indexing: indexing,
                         caching: caching,
                         metrics: metrics,
@@ -169,5 +167,5 @@
 
 function buildAndVerify(dir) {
     assert.file(['gradlew', 'settings.gradle', 'build.gradle']);
-    assert(shell.exec(path.join(dir, 'gradlew') + ' classes --init-script ../../stagedMavenRepoInitScript.gradle').code == 0);
+    assert(shell.exec(path.join(dir, 'gradlew') + ' check --init-script ../../stagedMavenRepoInitScript.gradle').code == 0);
 }
diff --git a/tools/model-detail/dev-status.xml b/tools/model-detail/dev-status.xml
index e124151..c65f229 100644
--- a/tools/model-detail/dev-status.xml
+++ b/tools/model-detail/dev-status.xml
@@ -30,7 +30,7 @@
     <documentation>brief</documentation>
 
     <!-- none, some, good, complete -->
-    <unittests>none</unittests>
+    <unittests>some</unittests>
 
   </status>
   <licenses>
diff --git a/tools/model-detail/src/docs/model-detail.txt b/tools/model-detail/src/docs/model-detail.txt
new file mode 100644
index 0000000..333016c
--- /dev/null
+++ b/tools/model-detail/src/docs/model-detail.txt
@@ -0,0 +1,52 @@
+///////////////////////////////////////////////////////////////
+ * 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.
+///////////////////////////////////////////////////////////////
+
+[[tools-model-detail,Detailed Application Model]]
+= Detailed Application Model =
+
+For troubleshooting it can be handy to log the application model, or write it to some file, when activating an application.
+
+This library is what <<tools-envisage>> uses under the hood.
+
+include::../../build/docs/buildinfo/artifact.txt[]
+
+== Usage ==
+
+On application bootstrap:
+
+[snippet,java]
+----
+source=tools/model-detail/src/test/java/org/apache/polygene/tools/model/DocumentationSupport.java
+tag=usage
+----
+
+    . Given an application assembler,
+    . and a Polygene runtime,
+    . create the `ApplicationModel`.
+    . Use the `createApplicationDetailDescriptor()` static method to create a detailed application model object.
+    . Use its `toJson()` method to get a detailed report of the application model.
+    . Continue with regular application activation.
+
+Here is what a sample JSON dump looks like:
+
+[snippet,javascript]
+----
+source=tools/model-detail/src/test/resources/doc-support-report.json
+tag=report
+----
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ActivatorDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ActivatorDetailDescriptor.java
index 0b331e2..552e114 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ActivatorDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ActivatorDetailDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonObject;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.activation.ActivatorDescriptor;
 import org.apache.polygene.api.util.Visitable;
 import org.apache.polygene.api.util.Visitor;
@@ -174,4 +177,30 @@
     {
         return descriptor.toString();
     }
+
+    public JsonObject toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        if( service() != null )
+        {
+            builder.add( "service", service().toString() );
+        }
+        if( importedService() != null )
+        {
+            builder.add( "importedService", importedService().toString() );
+        }
+        if( module() != null )
+        {
+            builder.add( "module", module().toString() );
+        }
+        if( layer() != null )
+        {
+            builder.add( "layer", layer().toString() );
+        }
+        if( application() != null )
+        {
+            builder.add( "application", application().toString() );
+        }
+        return builder.build();
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptor.java
index fd3abc3..e23247f 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ApplicationDetailDescriptor.java
@@ -22,6 +22,11 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObject;
+import javax.json.JsonObjectBuilder;
+import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.ApplicationDescriptor;
 import org.apache.polygene.api.util.HierarchicalVisitor;
 import org.apache.polygene.api.util.VisitableHierarchy;
@@ -110,4 +115,25 @@
         }
         return visitor.visitLeave( this );
     }
+
+    public JsonObject toJson()
+    {
+        JsonObjectBuilder appBuilder = Json.createObjectBuilder();
+        String appName = descriptor().name();
+        String version = descriptor().version();
+        Application.Mode mode = descriptor().mode();
+        appBuilder.add( "name", appName );
+        appBuilder.add( "version", version );
+        appBuilder.add( "mode", mode.toString() );
+
+        JsonArrayBuilder layersBuilder = Json.createArrayBuilder();
+        layers().forEach( layer -> layersBuilder.add( layer.toJson() ) );
+        appBuilder.add( "layers", layersBuilder.build() );
+
+        JsonArrayBuilder activatorsBuilder = Json.createArrayBuilder();
+        activators().forEach( activator -> activatorsBuilder.add( activator.toJson() ) );
+        appBuilder.add( "activators", activatorsBuilder.build() );
+
+        return appBuilder.build();
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeDetailDescriptor.java
index 3b5e0e3..f62a4ff 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeDetailDescriptor.java
@@ -23,6 +23,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.composite.CompositeDescriptor;
 import org.apache.polygene.api.composite.MethodDescriptor;
 
@@ -49,7 +52,6 @@
 
     /**
      * @return Descriptor of this {@code CompositeDetailDescriptor}. Never return {@code null}.
-     *
      * @since 0.5
      */
     public final T descriptor()
@@ -59,7 +61,6 @@
 
     /**
      * @return Methods of this {@code CompositeDetailDescriptor}. Never return {@code null}.
-     *
      * @since 0.5
      */
     public final Iterable<CompositeMethodDetailDescriptor> methods()
@@ -69,7 +70,6 @@
 
     /**
      * @return Mixins of this {@code CompositeDetailDescriptor}. Never return {@code null}.
-     *
      * @since 0.5
      */
     public final Iterable<MixinDetailDescriptor> mixins()
@@ -81,9 +81,7 @@
      * Return method detail descriptor of the requested method. Returns {@code null} if not found.
      *
      * @param aMethod Method to look up. This argument must not be {@code null}.
-     *
      * @return method detail descriptor of the requested method.
-     *
      * @since 0.5
      */
     public final CompositeMethodDetailDescriptor getMethodDescriptor( Method aMethod )
@@ -103,7 +101,6 @@
 
     /**
      * @return Module that own this {@code CompositeDetailDescriptor}.
-     *
      * @since 0.5
      */
     public final ModuleDetailDescriptor module()
@@ -141,4 +138,22 @@
     {
         return descriptor.toString();
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "type", descriptor().primaryType().getName() );
+        builder.add( "visibility", descriptor().visibility().name() );
+        {
+            JsonArrayBuilder typesBuilder = Json.createArrayBuilder();
+            descriptor().types().forEach( type -> typesBuilder.add( type.getName() ) );
+            builder.add( "types", typesBuilder );
+        }
+        {
+            JsonArrayBuilder mixinsBuilder = Json.createArrayBuilder();
+            mixins().forEach( mixin -> mixinsBuilder.add( mixin.toJson() ) );
+            builder.add( "mixins", mixinsBuilder );
+        }
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeMethodDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeMethodDetailDescriptor.java
index 7a2bda4..84e3215 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeMethodDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/CompositeMethodDetailDescriptor.java
@@ -19,7 +19,12 @@
  */
 package org.apache.polygene.tools.model.descriptor;
 
+import java.lang.reflect.Parameter;
+import java.util.Arrays;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.composite.MethodDescriptor;
 
 public final class CompositeMethodDetailDescriptor
@@ -44,7 +49,6 @@
 
     /**
      * @return Descriptor of this {@code CompositeMethodDetailDescriptor}. Never return {@code null}.
-     *
      * @since 0.5
      */
     public final MethodDescriptor descriptor()
@@ -54,8 +58,7 @@
 
     /**
      * @return Constraints of this {@code CompositeMethodDetailDescriptor}.
-     *         Returns {@code null} if this method does not have any constraints.
-     *
+     * Returns {@code null} if this method does not have any constraints.
      * @since 0.5
      */
     public final MethodConstraintsDetailDescriptor constraints()
@@ -65,8 +68,7 @@
 
     /**
      * @return Concerns of this {@code CompositeMethodDetailDescriptor}. Returns {@code null} if this method does not
-     *         have any concerns.
-     *
+     * have any concerns.
      * @since 0.5
      */
     public final MethodConcernsDetailDescriptor concerns()
@@ -76,8 +78,7 @@
 
     /**
      * @return Side-effects of this {@code CompositeMethodDetailDescriptor}. Returns {@code null}
-     *         if this method does not have any side effects.
-     *
+     * if this method does not have any side effects.
      * @since 0.5
      */
     public final MethodSideEffectsDetailDescriptor sideEffects()
@@ -87,7 +88,6 @@
 
     /**
      * @return Composite that owns this {@code CompositeMethodDetailDescriptor}.
-     *
      * @since 0.5
      */
     public final CompositeDetailDescriptor composite()
@@ -132,4 +132,24 @@
     {
         return descriptor.method().getName();
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "name", descriptor().method().getName() );
+        builder.add( "type", descriptor().method().getReturnType().getName() );
+        {
+            JsonArrayBuilder paramsBuilder = Json.createArrayBuilder();
+            Arrays.stream( descriptor().method().getParameters() )
+                  .map( Parameter::toString )
+                  .forEach( paramsBuilder::add );
+//                  .forEach( param -> paramsBuilder.add( param.getName() + " : " + param.getType() ) );
+            builder.add( "parameters", paramsBuilder );
+        }
+        builder.add( "constraints", constraints().toJson() );
+        builder.add( "concerns", concerns().toJson() );
+        builder.add( "sideeffects", sideEffects().toJson() );
+
+        return builder;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ConstructorDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ConstructorDetailDescriptor.java
index 152fdaa..6700b5b 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ConstructorDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ConstructorDetailDescriptor.java
@@ -20,6 +20,8 @@
 package org.apache.polygene.tools.model.descriptor;
 
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.composite.ConstructorDescriptor;
 
 /**
@@ -142,4 +144,10 @@
         return descriptor.constructor().getDeclaringClass().getSimpleName();
     }
 
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "name", descriptor().constructor().getName() );
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/EntityDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/EntityDetailDescriptor.java
index a08f6a2..1db78b7 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/EntityDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/EntityDetailDescriptor.java
@@ -19,6 +19,7 @@
  */
 package org.apache.polygene.tools.model.descriptor;
 
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.entity.EntityDescriptor;
 import org.apache.polygene.api.util.Visitable;
 import org.apache.polygene.api.util.Visitor;
@@ -26,8 +27,7 @@
 /**
  * Entity Detail Descriptor.
  */
-public final class EntityDetailDescriptor
-    extends CompositeDetailDescriptor<EntityDescriptor>
+public final class EntityDetailDescriptor extends CompositeDetailDescriptor<EntityDescriptor>
     implements Visitable<EntityDetailDescriptor>
 {
     EntityDetailDescriptor( EntityDescriptor aDescriptor )
@@ -41,4 +41,10 @@
     {
         return visitor.visit( this );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = super.toJson();
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceCompositeDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceCompositeDescriptor.java
index 629a6fd..a87cd08 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceCompositeDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceCompositeDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.stream.Stream;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.CompositeDescriptor;
 import org.apache.polygene.api.service.ImportedServiceDescriptor;
@@ -100,4 +103,18 @@
     {
         return Classes.toURI( primaryType() );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "name", importedService().type().getName() );
+        builder.add( "visibility", importedService().visibility().name() );
+        builder.add( "importer", importedService().serviceImporter().getName() );
+        {
+            JsonArrayBuilder typesBuilder = Json.createArrayBuilder();
+            importedService().types().forEach( type -> typesBuilder.add( type.getName() ) );
+            builder.add( "types", typesBuilder );
+        }
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceDetailDescriptor.java
index 7f64a79..67ae962 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ImportedServiceDetailDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.util.HierarchicalVisitor;
 import org.apache.polygene.api.util.VisitableHierarchy;
 
@@ -71,4 +74,15 @@
         }
         return visitor.visitLeave( this );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = super.toJson();
+        {
+            JsonArrayBuilder activatorsBuilder = Json.createArrayBuilder();
+            activators().forEach( activator -> activatorsBuilder.add( activator.toJson() ) );
+            builder.add( "activators", activatorsBuilder.build() );
+        }
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedFieldDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedFieldDetailDescriptor.java
index b1a635c..4645e45 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedFieldDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedFieldDetailDescriptor.java
@@ -20,6 +20,8 @@
 package org.apache.polygene.tools.model.descriptor;
 
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.composite.InjectedFieldDescriptor;
 
 public final class InjectedFieldDetailDescriptor
@@ -126,4 +128,11 @@
         return descriptor.field().getName();
     }
 
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "name", descriptor().field().getName() );
+        builder.add( "type", descriptor().field().getType().getName() );
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedMethodDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedMethodDetailDescriptor.java
index a7e6fe7..29ad80e 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedMethodDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedMethodDetailDescriptor.java
@@ -20,6 +20,8 @@
 package org.apache.polygene.tools.model.descriptor;
 
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.composite.InjectedMethodDescriptor;
 
 
@@ -140,4 +142,10 @@
         methodConcern = descriptor;
     }
 
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "name", descriptor().method().getName() );
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedParametersDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedParametersDetailDescriptor.java
index 33d4b45..beef9fb 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedParametersDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/InjectedParametersDetailDescriptor.java
@@ -20,6 +20,8 @@
 package org.apache.polygene.tools.model.descriptor;
 
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.composite.InjectedParametersDescriptor;
 
 public class InjectedParametersDetailDescriptor
@@ -69,17 +71,32 @@
         return method;
     }
 
-    final void setConstructor( ConstructorDetailDescriptor aDescriptor )
+    final void setConstructor( ConstructorDetailDescriptor constructorDescriptor )
         throws IllegalArgumentException
     {
-        Objects.requireNonNull( aDescriptor, "aDescriptor" );
-        constructor = aDescriptor;
+        Objects.requireNonNull( constructorDescriptor, "constructorDescriptor" );
+        constructor = constructorDescriptor;
     }
 
-    final void setMethod( InjectedMethodDetailDescriptor aDescriptor )
+    final void setMethod( InjectedMethodDetailDescriptor methodDescriptor )
         throws IllegalArgumentException
     {
-        Objects.requireNonNull( aDescriptor, "aDescriptor" );
-        method = aDescriptor;
+        Objects.requireNonNull( methodDescriptor, "methodDescriptor" );
+        method = methodDescriptor;
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        if( method != null )
+        {
+            builder.add( "method", method().toJson() );
+        }
+        if( constructor != null )
+        {
+            builder.add( "constructor", constructor().toJson() );
+        }
+        return builder;
+    }
+
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/LayerDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/LayerDetailDescriptor.java
index e312701..d96f12d 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/LayerDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/LayerDetailDescriptor.java
@@ -22,6 +22,10 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObject;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.structure.LayerDescriptor;
 import org.apache.polygene.api.util.HierarchicalVisitor;
 import org.apache.polygene.api.util.VisitableHierarchy;
@@ -160,4 +164,29 @@
     {
         return descriptor.name();
     }
+
+    public JsonObject toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "name", descriptor().name() );
+        {
+            JsonArrayBuilder modulesBuilder = Json.createArrayBuilder();
+            modules().forEach( module -> modulesBuilder.add( module.toJson() ) );
+            builder.add( "modules", modulesBuilder.build() );
+        }
+
+        {
+            JsonArrayBuilder usedLayersBuilder = Json.createArrayBuilder();
+            usedLayers().forEach( layer -> usedLayersBuilder.add( layer.descriptor().name() ) );
+            builder.add( "usedLayers", usedLayersBuilder.build() );
+        }
+
+        {
+            JsonArrayBuilder activatorsBuilder = Json.createArrayBuilder();
+            activators().forEach( activator -> activatorsBuilder.add( activator.toJson() ) );
+            builder.add( "activators", activatorsBuilder.build() );
+        }
+
+        return builder.build();
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernDetailDescriptor.java
index 82a6264..62a332d 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernDetailDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.concern.ConcernDescriptor;
 
 public final class MethodConcernDetailDescriptor
@@ -138,4 +141,29 @@
         aDescriptor.setMethodConcern( this );
         injectedFields.add( aDescriptor );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "fragment", descriptor().modifierClass().getName() );
+        JsonObjectBuilder injectionBuilder = Json.createObjectBuilder();
+        {
+            JsonArrayBuilder constructorsBuilder = Json.createArrayBuilder();
+            constructors().forEach( constructor -> constructorsBuilder.add( constructor.toJson() ) );
+            builder.add( "constructors", constructorsBuilder );
+        }
+        builder.add( "injection", injectionBuilder );
+        {
+            JsonArrayBuilder injectedFieldsBuilder = Json.createArrayBuilder();
+            injectedFields().forEach( field -> injectedFieldsBuilder.add( field.toJson() ) );
+            injectionBuilder.add( "fields", injectedFieldsBuilder );
+        }
+        {
+            JsonArrayBuilder injectedMethodsBuilder = Json.createArrayBuilder();
+            injectedMethods().forEach( method -> injectedMethodsBuilder.add( method.toJson() ) );
+            injectionBuilder.add( "methods", injectedMethodsBuilder );
+        }
+
+        return builder;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
index 0d644b5..f10972d 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConcernsDetailDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.concern.ConcernsDescriptor;
 
 public final class MethodConcernsDetailDescriptor
@@ -82,4 +85,15 @@
         aDescriptor.setConcerns( this );
         concerns.add( aDescriptor );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        {
+            JsonArrayBuilder concernsBuilder = Json.createArrayBuilder();
+            concerns().forEach( concern -> concernsBuilder.add( concern.toJson() ) );
+            builder.add( "concerns", concernsBuilder );
+        }
+        return builder;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintDetailDescriptor.java
index 7dc3102..6550b82 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintDetailDescriptor.java
@@ -20,6 +20,8 @@
 package org.apache.polygene.tools.model.descriptor;
 
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.constraint.ConstraintDescriptor;
 
 public final class MethodConstraintDetailDescriptor
@@ -67,4 +69,11 @@
         Objects.requireNonNull( aDescriptor, "aDescriptor" );
         constraints = aDescriptor;
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+
+        return builder;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
index 8b0f6cd..d8eadd3 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodConstraintsDetailDescriptor.java
@@ -22,6 +22,7 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.constraint.ConstraintsDescriptor;
 
 public final class MethodConstraintsDetailDescriptor
@@ -83,4 +84,9 @@
         aDescriptor.setConstraints( this );
         constraints.add( aDescriptor );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        return null;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
index 484e031..b727a2e 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectDetailDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.sideeffect.SideEffectDescriptor;
 
 public final class MethodSideEffectDetailDescriptor
@@ -135,4 +138,28 @@
         aDescriptor.setMethodSideEffect( this );
         injectedFields.add( aDescriptor );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "fragment", descriptor().modifierClass().getName() );
+        JsonObjectBuilder injectionBuilder = Json.createObjectBuilder();
+        {
+            JsonArrayBuilder constructorsBuilder = Json.createArrayBuilder();
+            constructors().forEach( constructor -> constructorsBuilder.add( constructor.toJson() ) );
+            builder.add( "constructors", constructorsBuilder );
+        }
+        builder.add( "injection", injectionBuilder );
+        {
+            JsonArrayBuilder injectedFieldsBuilder = Json.createArrayBuilder();
+            injectedFields().forEach( field -> injectedFieldsBuilder.add( field.toJson() ) );
+            injectionBuilder.add( "fields", injectedFieldsBuilder );
+        }
+        {
+            JsonArrayBuilder injectedMethodsBuilder = Json.createArrayBuilder();
+            injectedMethods().forEach( method -> injectedMethodsBuilder.add( method.toJson() ) );
+            injectionBuilder.add( "methods", injectedMethodsBuilder );
+        }
+        return builder;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
index 9be166b..4648f03 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MethodSideEffectsDetailDescriptor.java
@@ -22,6 +22,8 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
 import org.apache.polygene.api.sideeffect.SideEffectsDescriptor;
 
 public final class MethodSideEffectsDetailDescriptor
@@ -84,4 +86,11 @@
         aDescriptor.setSideEffects( aDescriptor );
         sideEffects.add( aDescriptor );
     }
+
+    public JsonArrayBuilder toJson()
+    {
+        JsonArrayBuilder builder = Json.createArrayBuilder();
+        sideEffects().forEach( sideeffect -> sideeffect.toJson() );
+        return builder;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
index 544efdb..7f4e6d5 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/MixinDetailDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.mixin.MixinDescriptor;
 
 public final class MixinDetailDescriptor
@@ -133,4 +136,29 @@
     {
         return descriptor.mixinClass().getSimpleName();
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "mixin", descriptor().mixinClass().getName() );
+        JsonObjectBuilder injectionBuilder = Json.createObjectBuilder();
+        {
+            JsonArrayBuilder constructorsBuilder = Json.createArrayBuilder();
+            constructors().forEach( constructor -> constructorsBuilder.add( constructor.toJson() ) );
+            builder.add( "constructors", constructorsBuilder );
+        }
+        builder.add( "injection", injectionBuilder );
+        {
+            JsonArrayBuilder injectedFieldsBuilder = Json.createArrayBuilder();
+            injectedFields().forEach( field -> injectedFieldsBuilder.add( field.toJson() ) );
+            injectionBuilder.add( "fields", injectedFieldsBuilder );
+        }
+        {
+            JsonArrayBuilder injectedMethodsBuilder = Json.createArrayBuilder();
+            injectedMethods().forEach( method -> injectedMethodsBuilder.add( method.toJson() ) );
+            injectionBuilder.add( "methods", injectedMethodsBuilder );
+        }
+
+        return builder;
+    }
 }
\ No newline at end of file
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ModuleDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ModuleDetailDescriptor.java
index d956b13..cf6a65d 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ModuleDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ModuleDetailDescriptor.java
@@ -22,6 +22,10 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObject;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.util.HierarchicalVisitor;
 import org.apache.polygene.api.util.VisitableHierarchy;
@@ -241,4 +245,21 @@
     {
         return descriptor.name();
     }
+
+    public JsonObject toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "name", descriptor.name() );
+        {
+            JsonArrayBuilder servicesBuilder = Json.createArrayBuilder();
+            services().forEach( service -> servicesBuilder.add( service.toJson() ) );
+            builder.add( "services", servicesBuilder.build() );
+        }
+        {
+            JsonArrayBuilder activatorsBuilder = Json.createArrayBuilder();
+            activators().forEach( activator -> activatorsBuilder.add( activator.toJson() ) );
+            builder.add( "activators", activatorsBuilder.build() );
+        }
+        return builder.build();
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ObjectDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ObjectDetailDescriptor.java
index 7c90e58..cd380ca 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ObjectDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ObjectDetailDescriptor.java
@@ -22,6 +22,9 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.object.ObjectDescriptor;
 import org.apache.polygene.api.util.Visitable;
 import org.apache.polygene.api.util.Visitor;
@@ -126,4 +129,29 @@
     {
         return descriptor.toString();
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "visibility", descriptor().visibility().name() );
+        JsonObjectBuilder injectionBuilder = Json.createObjectBuilder();
+        {
+            JsonArrayBuilder constructorsBuilder = Json.createArrayBuilder();
+            constructors().forEach( constructor -> constructorsBuilder.add( constructor.toJson() ) );
+            builder.add( "constructors", constructorsBuilder );
+        }
+        builder.add( "injection", injectionBuilder );
+        {
+            JsonArrayBuilder injectedFieldsBuilder = Json.createArrayBuilder();
+            injectedFields().forEach( field -> injectedFieldsBuilder.add( field.toJson() ) );
+            injectionBuilder.add( "fields", injectedFieldsBuilder );
+        }
+        {
+            JsonArrayBuilder injectedMethodsBuilder = Json.createArrayBuilder();
+            injectedMethods().forEach( method -> injectedMethodsBuilder.add( method.toJson() ) );
+            injectionBuilder.add( "methods", injectedMethodsBuilder );
+        }
+
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceDetailDescriptor.java
index c2ab9f3..0e3c1da 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceDetailDescriptor.java
@@ -22,6 +22,7 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.service.ServiceDescriptor;
 import org.apache.polygene.api.util.HierarchicalVisitor;
@@ -96,4 +97,10 @@
         }
         return visitor.visitLeave( this );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = super.toJson();
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceUsage.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceUsage.java
index 2504138..69644f5 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceUsage.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ServiceUsage.java
@@ -19,6 +19,9 @@
  */
 package org.apache.polygene.tools.model.descriptor;
 
+import javax.json.Json;
+import javax.json.JsonObjectBuilder;
+
 public final class ServiceUsage
 {
 
@@ -58,4 +61,18 @@
         return layer;
     }
 
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = Json.createObjectBuilder();
+        builder.add( "layer", layer().toString() );
+        if( ownerDescriptor() instanceof CompositeDetailDescriptor )
+        {
+            builder.add( "composite", ( (CompositeDetailDescriptor) ownerDescriptor() ).toJson() );
+        }
+        if( ownerDescriptor() instanceof ObjectDetailDescriptor )
+        {
+            builder.add( "object", ( (ObjectDetailDescriptor) ownerDescriptor() ).toJson() );
+        }
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/TransientDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/TransientDetailDescriptor.java
index e66087a..bf1c4d2 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/TransientDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/TransientDetailDescriptor.java
@@ -19,6 +19,7 @@
  */
 package org.apache.polygene.tools.model.descriptor;
 
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.composite.TransientDescriptor;
 import org.apache.polygene.api.util.Visitable;
 import org.apache.polygene.api.util.Visitor;
@@ -41,4 +42,10 @@
     {
         return visitor.visit( this );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = super.toJson();
+        return builder;
+    }
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ValueDetailDescriptor.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ValueDetailDescriptor.java
index 3e2dbe5..06919e9 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ValueDetailDescriptor.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/ValueDetailDescriptor.java
@@ -19,9 +19,10 @@
  */
 package org.apache.polygene.tools.model.descriptor;
 
-import org.apache.polygene.api.value.ValueDescriptor;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.util.Visitable;
 import org.apache.polygene.api.util.Visitor;
+import org.apache.polygene.api.value.ValueDescriptor;
 
 /**
  * Value Detail Descriptor.
@@ -41,4 +42,11 @@
     {
         return visitor.visit( this );
     }
+
+    public JsonObjectBuilder toJson()
+    {
+        JsonObjectBuilder builder = super.toJson();
+        return builder;
+    }
+
 }
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/package.html b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/package.html
index 29e572d..3b9d45c 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/package.html
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/descriptor/package.html
@@ -19,6 +19,6 @@
   -->
 <html>
     <body>
-        <h2>Detailled Application Model Descriptors.</h2>
+    <h2>Detailed Application Model Descriptors.</h2>
     </body>
 </html>
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/APIFinder.java b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/APIFinder.java
index 6035836..75e312f 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/APIFinder.java
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/APIFinder.java
@@ -34,7 +34,7 @@
 
     public List<ServiceDetailDescriptor> findModuleAPI( ModuleDetailDescriptor descriptor )
     {
-        ArrayList<ServiceDetailDescriptor> list = new ArrayList<ServiceDetailDescriptor>();
+        ArrayList<ServiceDetailDescriptor> list = new ArrayList<>();
 
         for( ServiceDetailDescriptor serviceDetailDescriptor : descriptor.services() )
         {
@@ -46,7 +46,7 @@
 
     public List<ServiceDetailDescriptor> findLayerAPI( LayerDetailDescriptor descriptor )
     {
-        ArrayList<ServiceDetailDescriptor> list = new ArrayList<ServiceDetailDescriptor>();
+        ArrayList<ServiceDetailDescriptor> list = new ArrayList<>();
 
         for( ModuleDetailDescriptor moduleDetailDescriptor : descriptor.modules() )
         {
diff --git a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/package.html b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/package.html
index da040d9..1f7164f 100644
--- a/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/package.html
+++ b/tools/model-detail/src/main/java/org/apache/polygene/tools/model/util/package.html
@@ -19,6 +19,6 @@
   -->
 <html>
     <body>
-        <h2>Detailled Application Model Utilities.</h2>
+    <h2>Detailed Application Model Utilities.</h2>
     </body>
 </html>
diff --git a/tools/model-detail/src/test/java/org/apache/polygene/tools/model/DocumentationSupport.java b/tools/model-detail/src/test/java/org/apache/polygene/tools/model/DocumentationSupport.java
new file mode 100644
index 0000000..cb6bba9
--- /dev/null
+++ b/tools/model-detail/src/test/java/org/apache/polygene/tools/model/DocumentationSupport.java
@@ -0,0 +1,118 @@
+/*
+ *  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.polygene.tools.model;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import javax.json.Json;
+import javax.json.JsonObject;
+import javax.json.stream.JsonGenerator;
+import org.apache.polygene.api.activation.ActivationException;
+import org.apache.polygene.api.activation.PassivationException;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.structure.Application;
+import org.apache.polygene.api.structure.ApplicationDescriptor;
+import org.apache.polygene.bootstrap.ApplicationAssembler;
+import org.apache.polygene.bootstrap.ApplicationAssembly;
+import org.apache.polygene.bootstrap.Energy4Java;
+import org.apache.polygene.bootstrap.LayerAssembly;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.tools.model.descriptor.ApplicationDetailDescriptor;
+import org.junit.Test;
+
+import static java.util.Collections.singletonMap;
+import static java.util.stream.Collectors.joining;
+import static org.apache.polygene.tools.model.descriptor.ApplicationDetailDescriptorBuilder.createApplicationDetailDescriptor;
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+public class DocumentationSupport
+{
+    interface HttpService {}
+
+    interface MyDomain {}
+
+    @Test
+    public void usage() throws ActivationException, PassivationException, IOException
+    {
+        // START SNIPPET: usage
+        ApplicationAssembler assembler = // (1)
+            // END SNIPPET: usage
+            applicationFactory -> {
+                ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
+                assembly.setName( "my-app" );
+                assembly.setMode( Application.Mode.staging );
+
+                LayerAssembly network = assembly.layer( "network" );
+                ModuleAssembly http = network.module( "http" );
+                http.services( HttpService.class ).instantiateOnStartup();
+
+                LayerAssembly application = assembly.layer( "application" );
+                ModuleAssembly domain = application.module( "domain" );
+                domain.transients( MyDomain.class ).visibleIn( Visibility.application );
+
+                network.uses( application );
+
+                return assembly;
+            };
+        // START SNIPPET: usage
+        Energy4Java polygene = new Energy4Java(); // (2)
+        ApplicationDescriptor model = polygene.newApplicationModel( assembler ); // (3)
+        ApplicationDetailDescriptor detailedModel = createApplicationDetailDescriptor( model ); // (4)
+
+        System.out.println( detailedModel.toJson().toString() ); // (5)
+
+        Application application = model.newInstance( polygene.spi() ); // (6)
+        try
+        {
+            application.activate();
+            // END SNIPPET: usage
+            ClassLoader loader = getClass().getClassLoader();
+            try( InputStream input = loader.getResourceAsStream( "doc-support-report.json" ) )
+            {
+                String text = new BufferedReader( new InputStreamReader( input ) )
+                    .lines()
+                    .filter( line -> !line.startsWith( "//" ) )
+                    .collect( joining( "\n" ) );
+                JsonObject reference = Json.createReader( new StringReader( text ) ).readObject();
+
+                JsonObject detailedModelReport = detailedModel.toJson();
+
+                StringWriter writer = new StringWriter();
+                Json.createWriterFactory( singletonMap( JsonGenerator.PRETTY_PRINTING, true ) )
+                    .createWriter( writer )
+                    .write( detailedModelReport );
+                System.out.println( "--------\n" + writer.toString() );
+
+                assertThat( reference, equalTo( detailedModelReport ) );
+            }
+            // START SNIPPET: usage
+        }
+        finally
+        {
+            application.passivate();
+        }
+        // END SNIPPET: usage
+    }
+}
diff --git a/tools/model-detail/src/test/resources/doc-support-report.json b/tools/model-detail/src/test/resources/doc-support-report.json
new file mode 100644
index 0000000..a804f83
--- /dev/null
+++ b/tools/model-detail/src/test/resources/doc-support-report.json
@@ -0,0 +1,129 @@
+// START SNIPPET: report
+{
+  "name":"my-app",
+  "version":"1.0",
+  "mode":"staging",
+  "layers":[
+    {
+      "name":"network",
+      "modules":[
+        {
+          "name":"http",
+          "services":[
+            {
+              "type":"org.apache.polygene.tools.model.DocumentationSupport$HttpService",
+              "visibility":"module",
+              "types":[
+                "org.apache.polygene.tools.model.DocumentationSupport$HttpService",
+                "org.apache.polygene.api.service.ServiceComposite"
+              ],
+              "mixins":[
+                {
+                  "mixin":"org.apache.polygene.api.identity.HasIdentity$HasIdentityMixin",
+                  "constructors":[
+                    {
+                      "name":"org.apache.polygene.api.identity.HasIdentity_HasIdentityMixin_Stub"
+                    }
+                  ],
+                  "injection":{
+
+                  }
+                }
+              ]
+            },
+            {
+              "type":"org.apache.polygene.api.unitofwork.UnitOfWorkFactory",
+              "visibility":"module",
+              "types":[
+                "org.apache.polygene.api.unitofwork.UnitOfWorkFactory",
+                "org.apache.polygene.api.service.ServiceComposite"
+              ],
+              "mixins":[
+                {
+                  "mixin":"org.apache.polygene.runtime.unitofwork.UnitOfWorkFactoryMixin",
+                  "constructors":[
+                    {
+                      "name":"org.apache.polygene.runtime.unitofwork.UnitOfWorkFactoryMixin_Stub"
+                    }
+                  ],
+                  "injection":{
+
+                  }
+                },
+                {
+                  "mixin":"org.apache.polygene.api.identity.HasIdentity$HasIdentityMixin",
+                  "constructors":[
+                    {
+                      "name":"org.apache.polygene.api.identity.HasIdentity_HasIdentityMixin_Stub"
+                    }
+                  ],
+                  "injection":{
+
+                  }
+                }
+              ]
+            }
+          ],
+          "activators":[
+          ]
+        }
+      ],
+      "usedLayers":[
+        "application"
+      ],
+      "activators":[
+      ]
+    },
+    {
+      "name":"application",
+      "modules":[
+        {
+          "name":"domain",
+          "services":[
+            {
+              "type":"org.apache.polygene.api.unitofwork.UnitOfWorkFactory",
+              "visibility":"module",
+              "types":[
+                "org.apache.polygene.api.unitofwork.UnitOfWorkFactory",
+                "org.apache.polygene.api.service.ServiceComposite"
+              ],
+              "mixins":[
+                {
+                  "mixin":"org.apache.polygene.runtime.unitofwork.UnitOfWorkFactoryMixin",
+                  "constructors":[
+                    {
+                      "name":"org.apache.polygene.runtime.unitofwork.UnitOfWorkFactoryMixin_Stub"
+                    }
+                  ],
+                  "injection":{
+
+                  }
+                },
+                {
+                  "mixin":"org.apache.polygene.api.identity.HasIdentity$HasIdentityMixin",
+                  "constructors":[
+                    {
+                      "name":"org.apache.polygene.api.identity.HasIdentity_HasIdentityMixin_Stub"
+                    }
+                  ],
+                  "injection":{
+
+                  }
+                }
+              ]
+            }
+          ],
+          "activators":[
+          ]
+        }
+      ],
+      "usedLayers":[
+      ],
+      "activators":[
+      ]
+    }
+  ],
+  "activators":[
+  ]
+}
+// END SNIPPET: report
diff --git a/tutorials/cargo/src/test/java/org/apache/polygene/tutorials/cargo/step2/SequencingConcernTest.java b/tutorials/cargo/src/test/java/org/apache/polygene/tutorials/cargo/step2/SequencingConcernTest.java
index 84cf70b..2c83d5e 100644
--- a/tutorials/cargo/src/test/java/org/apache/polygene/tutorials/cargo/step2/SequencingConcernTest.java
+++ b/tutorials/cargo/src/test/java/org/apache/polygene/tutorials/cargo/step2/SequencingConcernTest.java
@@ -19,19 +19,21 @@
  */
 package org.apache.polygene.tutorials.cargo.step2;
 
-import org.junit.Ignore;
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.apache.polygene.test.mock.MockComposite;
 import org.apache.polygene.test.mock.MockPlayerMixin;
+import org.junit.Ignore;
+import org.junit.Test;
 
-import static org.easymock.EasyMock.*;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -52,15 +54,9 @@
     public void failingBooking()
         throws ActivationException, AssemblyException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( ShippingServiceTestComposite.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> module.transients( ShippingServiceTestComposite.class )
+        );
         ShippingService shippingService = createMock( ShippingService.class );
         Cargo cargo = createMock( Cargo.class );
         Voyage voyage = createMock( Voyage.class );
@@ -89,15 +85,9 @@
     public void successfulBooking()
         throws ActivationException, AssemblyException
     {
-        SingletonAssembler assembler = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( ShippingServiceTestComposite.class );
-            }
-        };
+        SingletonAssembler assembler = new SingletonAssembler(
+            module -> module.transients( ShippingServiceTestComposite.class )
+        );
         ShippingService shippingService = createMock( ShippingService.class );
         Cargo cargo = createMock( Cargo.class );
         Voyage voyage = createMock( Voyage.class );
@@ -117,7 +107,7 @@
 
     @Mixins( MockPlayerMixin.class )
     @Concerns( SequencingConcern.class )
-    public static interface ShippingServiceTestComposite
+    public interface ShippingServiceTestComposite
         extends ShippingService, HasSequence, MockComposite
     {
     }
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial10/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial10/HelloWorldTest.java
index 4cc74e2..762fd53 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial10/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial10/HelloWorldTest.java
@@ -19,12 +19,10 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial10;
 
+import org.apache.polygene.api.composite.TransientBuilder;
+import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.polygene.api.composite.TransientBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.SingletonAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -38,15 +36,7 @@
     public void setUp()
         throws Exception
     {
-        assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        assembly = new SingletonAssembler( module -> module.transients( HelloWorldComposite.class ));
     }
 
     @Test
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial3/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial3/HelloWorldTest.java
index acd4533..2870d27 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial3/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial3/HelloWorldTest.java
@@ -19,11 +19,9 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial3;
 
+import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.SingletonAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -37,15 +35,9 @@
     public void setUp()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.transients( HelloWorldComposite.class )
+        );
 
         helloWorld = assembly.module().newTransient( HelloWorldComposite.class );
     }
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial4/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial4/HelloWorldTest.java
index 3cf3bf2..a635a67 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial4/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial4/HelloWorldTest.java
@@ -19,11 +19,9 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial4;
 
+import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.SingletonAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -37,15 +35,9 @@
     public void setUp()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.transients( HelloWorldComposite.class )
+        );
         helloWorld = assembly.module().newTransientBuilder( HelloWorldComposite.class ).newInstance();
     }
 
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial5/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial5/HelloWorldTest.java
index 526f738..82f259e 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial5/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial5/HelloWorldTest.java
@@ -19,11 +19,9 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial5;
 
+import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.SingletonAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -37,15 +35,9 @@
     public void setUp()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.transients( HelloWorldComposite.class )
+        );
         helloWorld = assembly.module().newTransientBuilder( HelloWorldComposite.class ).newInstance();
     }
 
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial6/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial6/HelloWorldTest.java
index 0330bc6..0d3c101 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial6/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial6/HelloWorldTest.java
@@ -19,11 +19,9 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial6;
 
+import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.SingletonAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -37,15 +35,9 @@
     public void setUp()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.transients( HelloWorldComposite.class )
+        );
         helloWorld = assembly.module().newTransient(HelloWorldComposite.class );
     }
 
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial7/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial7/HelloWorldTest.java
index 7592313..6c9a291 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial7/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial7/HelloWorldTest.java
@@ -19,11 +19,9 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial7;
 
+import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.SingletonAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -37,15 +35,9 @@
     public void setUp()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.transients( HelloWorldComposite.class )
+        );
         helloWorld = assembly.module().newTransientBuilder( HelloWorldComposite.class ).newInstance();
     }
 
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial8/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial8/HelloWorldTest.java
index e8a753b..4555a44 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial8/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial8/HelloWorldTest.java
@@ -19,13 +19,11 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial8;
 
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -39,15 +37,9 @@
     public void setUp()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.transients( HelloWorldComposite.class )
+        );
         TransientBuilderFactory builderFactory = assembly.module();
         TransientBuilder<HelloWorldComposite> builder = builderFactory.newTransientBuilder( HelloWorldComposite.class );
         builder.prototype().name().set( "Hello" );
diff --git a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial9/HelloWorldTest.java b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial9/HelloWorldTest.java
index 37384f9..b3c4d3b 100644
--- a/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial9/HelloWorldTest.java
+++ b/tutorials/composites/src/test/java/org/apache/polygene/tutorials/composites/tutorial9/HelloWorldTest.java
@@ -19,13 +19,11 @@
  */
 package org.apache.polygene.tutorials.composites.tutorial9;
 
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -39,15 +37,9 @@
     public void setUp()
         throws Exception
     {
-        SingletonAssembler assembly = new SingletonAssembler()
-        {
-            @Override
-            public void assemble( ModuleAssembly module )
-                throws AssemblyException
-            {
-                module.transients( HelloWorldComposite.class );
-            }
-        };
+        SingletonAssembler assembly = new SingletonAssembler(
+            module -> module.transients( HelloWorldComposite.class )
+        );
         TransientBuilderFactory builderFactory = assembly.module();
         TransientBuilder<HelloWorldComposite> builder = builderFactory.newTransientBuilder( HelloWorldComposite.class );
         builder.prototype().name().set( "Hello" );
diff --git a/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java b/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
index 1ff59eb..908030f 100644
--- a/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
+++ b/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
@@ -19,15 +19,15 @@
  */
 package org.apache.polygene.tutorials.hello;
 
+import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
-import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
@@ -35,7 +35,7 @@
 public class HelloTest4 extends AbstractPolygeneTest
 {
 
-    public static final Identity TEST_IDENTITY = new StringIdentity( "123" );
+    public static final Identity TEST_IDENTITY = StringIdentity.identityOf( "123" );
 
     @Override
     public void assemble( ModuleAssembly module )
@@ -43,6 +43,7 @@
     {
         module.entities( Hello.class );
         module.services( MemoryEntityStoreService.class );
+        module.defaultServices();
     }
 
     @Test