Various template fixes.