diff --git a/src/main.ts b/src/main.ts
index 03a9afaeaa041fc58ceec03ad30075403413a708..3ce3f162b2ee740c44aff93422cb259faa5fd85f 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -26,24 +26,19 @@ async function main() {
     const navigation = new Navigation(allowsChild);
     platform.setNavigation(navigation);
     const urlRouter = createRouter({ navigation, history: platform.history });
-    const applySegment = getNavigation(navigation);
-    const rootViewModel = new RootViewModel(config, {platform, navigation, urlCreator: urlRouter, applySegment});
+    const rootViewModel = new RootViewModel(config, {platform, navigation, urlCreator: urlRouter});
     const rootView = new RootView(rootViewModel);
     root.appendChild(rootView.mount());
 }
 
 function allowsChild(parent, child) {
-    return true;
-}
-
-function getNavigation(navigation) {
-
-    function applySegment(segment: string, value?: string) {
-        const s = navigation.segment(segment, value);
-        const path = navigation.pathFrom([s]);
-        navigation.applyPath(path);
+    const { type } = child;
+    switch (parent?.type) {
+        case undefined:
+            return type === "start" || type === "account-setup" || type === "timeline";
+        default:
+            return false;
     }
-
-    return applySegment;
 }
+
 main();
diff --git a/src/viewmodels/AccountSetupViewModel.ts b/src/viewmodels/AccountSetupViewModel.ts
index 448b79a9b904d80cead20df2a2d956ca3752549d..8ad243db207a8ae5327a85f1fbab3a6f002bc056 100644
--- a/src/viewmodels/AccountSetupViewModel.ts
+++ b/src/viewmodels/AccountSetupViewModel.ts
@@ -1,4 +1,4 @@
-import { ViewModel, Client, ObservableValue, LoadStatus } from "hydrogen-view-sdk";
+import { ViewModel, Client, LoadStatus } from "hydrogen-view-sdk";
 import { IChatterboxConfig } from "../types/IChatterboxConfig";
 import { generateRandomString } from "../random";
 import "hydrogen-view-sdk/style.css";
@@ -9,13 +9,11 @@ export class AccountSetupViewModel extends ViewModel {
     private _client: Client;
     private _termsStage?: any;
     private _password: string;
-    private _applySegment: any;
 
     constructor(options) {
         super(options);
         this._client = options.client;
         this._config = options.config;
-        this._applySegment = options.applySegment;
         this._startRegistration();
     }
 
@@ -35,7 +33,7 @@ export class AccountSetupViewModel extends ViewModel {
         }
         // stage is username when registration is completed
         const loginPromise = this.login(stage, this._password);
-        this._applySegment("timeline", loginPromise);
+        this.navigation.push("timeline", loginPromise);
     }
 
     async login(username: string, password: string): Promise<void> {
@@ -55,7 +53,7 @@ export class AccountSetupViewModel extends ViewModel {
     }
 
     dismiss() {
-        this._applySegment("start");
+        this.navigation.push("start");
     }
 
     private get _homeserver(): string {
diff --git a/src/viewmodels/ChatterboxViewModel.ts b/src/viewmodels/ChatterboxViewModel.ts
index 342b4b70a6a0cf46038c7de9d497a6fd1122a2e4..6e4e5ba27dd6e87b113e776221d33d997821fc65 100644
--- a/src/viewmodels/ChatterboxViewModel.ts
+++ b/src/viewmodels/ChatterboxViewModel.ts
@@ -1,16 +1,14 @@
-import { RoomViewModel, ViewModel, TimelineViewModel, ComposerViewModel} from "hydrogen-view-sdk";
+import { RoomViewModel, ViewModel, ComposerViewModel} from "hydrogen-view-sdk";
 
 export class ChatterboxViewModel extends ViewModel {
     private _messageComposerViewModel?: ComposerViewModel;
     private _roomViewModel?: RoomViewModel;
     private _loginPromise: Promise<void>;
-    private _applySegment: (segment) => void;
 
     constructor(options) {
         super(options);
         this._client = options.client;
         this._loginPromise = options.loginPromise;
-        this._applySegment = options.applySegment;
     }
 
     async loadRoom() {
@@ -54,7 +52,7 @@ export class ChatterboxViewModel extends ViewModel {
     }
 
     minimize() {
-        this._applySegment("start");
+        this.navigation.push("start");
     }
 
     get timelineViewModel() {
diff --git a/src/viewmodels/RootViewModel.ts b/src/viewmodels/RootViewModel.ts
index fa7a999f04dc76c618c3e113bfb52e6992f91f59..d696f5617acc2913209e6a1b9ce192f18ce70601 100644
--- a/src/viewmodels/RootViewModel.ts
+++ b/src/viewmodels/RootViewModel.ts
@@ -1,10 +1,10 @@
-import { ViewModel, Client, Platform} from "hydrogen-view-sdk";
+import { ViewModel, Client, Navigation, createRouter, Platform } from "hydrogen-view-sdk";
 import { IChatterboxConfig } from "../types/IChatterboxConfig";
 import { ChatterboxViewModel } from "./ChatterboxViewModel";
 import "hydrogen-view-sdk/style.css";
 import { AccountSetupViewModel } from "./AccountSetupViewModel";
 
-type Options = { platform: Platform, navigation: ReturnType<createNavigation>, applySegment: (segment: string, value?: string) => void };
+type Options = { platform: Platform, navigation: ReturnType<Navigation>, urlCreator: ReturnType<createRouter> };
 
 export class RootViewModel extends ViewModel {
     private _config: IChatterboxConfig;
@@ -12,13 +12,11 @@ export class RootViewModel extends ViewModel {
     private _chatterBoxViewModel?: ChatterboxViewModel;
     private _accountSetupViewModel?: AccountSetupViewModel;
     private _activeSection: string = "start";
-    private _applySegment: Options["applySegment"];
 
     constructor(config: IChatterboxConfig, options: Options) {
         super(options);
         this._config = config;
         this._client = new Client(this.platform);
-        this._applySegment = options.applySegment;
         this._setupNavigation();
     }
 
@@ -31,10 +29,10 @@ export class RootViewModel extends ViewModel {
     async start() {
         const sessionAlreadyExists = await this.attemptStartWithExistingSession();
         if (sessionAlreadyExists) {
-            this._applySegment("timeline");
+            this.navigation.push("timeline");
             return;
         }
-        this._applySegment("account-setup");
+        this.navigation.push("account-setup");
     }
 
     private async _showTimeline(loginPromise: Promise<void>) {
@@ -45,7 +43,6 @@ export class RootViewModel extends ViewModel {
                     client: this._client,
                     config: this._config,
                     state: this._state,
-                    applySegment: this._applySegment,
                     loginPromise,
                 })
             ));
@@ -61,7 +58,6 @@ export class RootViewModel extends ViewModel {
                 client: this._client,
                 config: this._config,
                 state: this._state,
-                applySegment: this._applySegment,
             })
         ));
         this.emitChange("activeSection");