UI fixes
updated template
sorting of template variables