All these layouts, dialogs, and template assets...I wonder if we should move this to some external file we include.  Ask @mjschranz for his opinion.  This is just a lot of essentially repeated code that we could hide behind a few `require()` calls.  I'm happy either way.