anchor.diff:    }
   <% if repository.keycloak? -%>
   
  +  @javax.annotation.Nonnull
  +  public org.realityforge.gwt.keycloak.Keycloak getKeycloak()
  +  {
  +    return _keycloak;
  +  }
  +
  +  @javax.annotation.Nonnull
  +  protected org.realityforge.gwt.keycloak.KeycloakListener newKeycloakListener()
  +  {
  +    return new ApplicationKeycloakListener();
  +  }
  +
  +  protected class ApplicationKeycloakListener
  +    extends org.realityforge.gwt.keycloak.KeycloakListenerAdapter
  +  {
  +    @Override
  +    public void onReady( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak, final boolean authenticated )
  +    {
  +      if ( authenticated )
  +      {
  +        start();
  +      }
  +      else
  +      {
  +        keycloak.login();
  +      }
  +    }
  +  }
  +<% end -%>
   <% if repository.imit? -%>
  +<% if repository.keycloak? -%>
  +
     private void updateReplicantToken()
     {
       replicant.Replicant.context().setAuthToken( getKeycloak().getToken() );
     }
   
  -  private void setupReplicantToken()
  -  {
  +<% end -%>
  +  private void registerReplicantConnector()
  +  {
  +    final replicant.WebSocketConfig config = replicant.WebSocketConfig.create( com.google.gwt.core.client.GWT.getHostPageBaseURL() + "api", getKeycloak() );
  +    replicant.Replicant.context().registerConnector( ensureInjector().getSystemSchema(), new replicant.WebSocketTransport( config ) );
  +  }
  +
  +  private void prepareReplicant()
  +  {
  +    replicant.WebStorageCacheService.install();
  +    elemental2.dom.DomGlobal.window.addEventListener( "beforeunload", e -> replicant.Replicant.context().deactivate(), true );
  +<% if repository.keycloak? -%>
       updateReplicantToken();
       elemental2.dom.DomGlobal.setInterval( e -> getKeycloak().updateToken( 30, this::updateReplicantToken ), 5000 );
  -  }
  -
  -<% end -%>
  -  @javax.annotation.Nonnull
  -  public org.realityforge.gwt.keycloak.Keycloak getKeycloak()
  -  {
  -    return _keycloak;
  -  }
  -
  -  @javax.annotation.Nonnull
  -  protected org.realityforge.gwt.keycloak.KeycloakListener newKeycloakListener()
  -  {
  -    return new ApplicationKeycloakListener();
  -  }
  -
  -  protected class ApplicationKeycloakListener
  -    extends org.realityforge.gwt.keycloak.KeycloakListenerAdapter
  -  {
  -    @Override
  -    public void onReady( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak, final boolean authenticated )
  -    {
  -      if ( authenticated )
  -      {
  -        start();
  -      }
  -      else
  -      {
  -        keycloak.login();
  -      }
  -    }
  +<% end -%>
     }
   <% end -%>
   }
  
positive.code:   }
  <% if repository.arez? -%>
  
    private void setupArezLocator()
    {
      arez.Arez.context().registerLocator( ensureInjector().getLocator() );
    }
  
negative.code: 
    public void start()
    {
  <% if repository.appcache? -%>
      setupAppCache();
  <% end -%>
  <% if repository.imit? -%>
      prepareReplicant();
  <% end -%>
      setupUncaughtExceptionHandler();
      performStart();
    }
  
    protected final void postInjetorSetup()
    {
  <% if repository.arez? -%>
      registerArezLocator();
  <% end -%>
  <% if repository.imit? -%>
      registerReplicantConnector();
  <% end -%>
    }
  
    private void setupUncaughtExceptionHandler()
  