Refactor template list