Minor improvements on index.template