As I see it, this file `newapp.js` should try to be mostly about view-layer concerns, which is similar to what you're doing in other JS files under `fxide/content`. But this block and other pieces of this file also have a lot of logic mixed in, with many calls to `app-manager.js`. Maybe those parts should move down to `app-manager.js` and this file sends a message to kick it off?