                             right: doc.right
 
                         if target is "modal"
-                            source.set "modal", tab
+                            this.source.modal = tab
                         else if target is "tab"
-                            tabs = source.get "tabs"
+                            tabs = this.source.tabs
                             tabs.setEach "active", false
-                            source.get("tabs").pushObject tab
+                            this.source.tabs.pushObject tab
                         else if target is "active"
-                            tabs = source.get "tabs"
+                            tabs = this.source.tabs
                             index = tabs.indexOf tabs.findBy "active"
                             tabs.replace index, 1, [tab]
                         else # top
-                            source.get("tabs")
+                            this.source.tabs
                                 .clear()
                                 .pushObject tab
 
-                    Em.run.scheduleOnce "afterRender", ->
+                    scheduleOnce "afterRender", ->
                         $(".loading").removeClass "in-progress"
 
-                source.endPropertyChanges()
+                this.source.endPropertyChanges()
                 resolve doc
             , (err) =>
                 $(".loading").removeClass "in-progress"
                 @controllerFor("openxpki").set("model", source)
-                Em.run.scheduleOnce "afterRender", ->
+                scheduleOnce "afterRender", ->
                     $ ".modal.oxi-error-modal"
                     .modal "show"
-                source.set "error",
+                this.source.error =
                     message: "The server did not return JSON data as
                     expected.\nMaybe your authentication session has expired."
-                    resolve {}
-
-
-export default Route
+                resolve {}

                        @transitionTo "openxpki", doc.goto

                else if doc.structure
                    source.set "navEntries", doc.structure
                    source.set "user", doc.user
                    source.set "rtoken", doc.rtoken

                else
                    if doc.page and doc.main

import Route from '@ember/routing/route'
import EmberObject, { computed } from '@ember/object'
import { tracked } from '@glimmer/tracking'
import { A } from '@ember/array'
import { later, scheduleOnce, cancel } from '@ember/runloop'
import { inject as injectCtrl } from '@ember/controller'
import Promise from 'rsvp'

export default Route.extend
    config: injectCtrl()        # injects ConfigController

    queryParams:
        startat:
            refreshModel: true
