Updated as per bill's comments (before reordering the tutorial to show templating first).