Improved static management, code factoring
fixing load order for proper template resolution with apps
adding default template
improve trace