Refactor template paths