Reorganise template files