Perhaps I'm missing something, but there doesn't seem to be any important differences between this and launchapp.js. Could we reuse that here?