restructure application to use a Navigator