@Override
 @SuppressWarnings("ConstantConditions")
 protected void adjustMvcArguments(@Nonnull MVCGroup group, @Nonnull Map<String, Object> args) {
   super.adjustMvcArguments(group, args);
   FactoryBuilderSupport builder = (FactoryBuilderSupport) group.getMember(BUILDER);
   args.put(BUILDER, builder);
   for (Map.Entry<String, Object> variable : args.entrySet()) {
     builder.setVariable(variable.getKey(), variable.getValue());
   }
 }
 @Override
 protected void initializeNonArtifactMember(
     @Nonnull MVCGroup group,
     @Nonnull String type,
     @Nonnull Object member,
     @Nonnull Map<String, Object> args) {
   if (member instanceof Script) {
     ((GroovyAwareMVCGroup) group).buildScriptMember(type);
   } else {
     super.initializeNonArtifactMember(group, type, member, args);
   }
 }
  @Override
  protected void destroyMembers(@Nonnull MVCGroup group, boolean fireDestructionEvents) {
    super.destroyMembers(group, fireDestructionEvents);

    try {
      FactoryBuilderSupport builder = (FactoryBuilderSupport) group.getMember(BUILDER);
      if (builder != null) {
        builder.dispose();
        builder.getVariables().clear();
      }
    } catch (Exception e) {
      // TODO find out why this call breaks applet mode on shutdown
      LOG.error(
          "Application encountered an error while destroying group '" + group.getMvcId() + "'",
          sanitize(e));
    }
  }