Added template system to regenerate HTML from templates.