Add tag editor template, code cleanup