fixing the template and removing the old indexes