Reorganize template