init = () => {

  window.$tm = { ...env, utils, url: new URL(window.location.href) };

  // cleanup previous session
  cleanup();

  registerPublicClasses($tm);

  // build and integrate global options
  updateGlobals($tm);

  // register meta file (if not done yet)
  createMetaFile($tm.logger);

  // create indeces
  const indeces = attachIndeces($tm);

  // create services
  const services = getInitializedServices(indeces);
  Object.assign($tm, services);

  // load defaults
  loadDefaultView($tm.config.sys.defaultView);

  // Run the fixer to update older wikis
  services.fixer.fix();

  // all graphs need to register here. @see routineWalk()
  $tm.registry = [];
  setInterval(routineCheck, 5000);

  // AT THE VERY END: register change listener with the callback manager
  registerChangeListener($tm.callbackManager);

  // register DOM listeners
  registerMousemoveListener();
  registerClickListener();

  // check for fullscreen directives
  if ($tm.url.query['tmap-enlarged']) {
    prepareFullscreenStart($tm.url);
  }

  // issue notification
  $tm.logger('warn', 'TiddlyMap\'s caretaker successfully started');

}
This module is responsible for registering a global namespace
under $tw and loading (and refreshing) the configuration and services.

Attention: Careful with the order of the function calls in this
functions body!