Replaced and tweaked template.