Refactor simple index templates.