Update index and templateF