Rewrite of "template.perl"

Now I decide to make the sections in each chapter easy to reach,
via splitting them, bundle each of them into a sumroutin. This is
a good shot, I think, but it is not finished yet.