Refactor template files and improve many render