Fix and improve template documentation