templates: remove legacy code
templates: cache templates in browser
fix new-template issue
add marker to unsaved templates
refactor: move activation into template obj
templates: add save indicator