Application templates refactoring