More refactoring. Creating the application node on-the-fly.