setup base and index templates