Optimise header setup

The sections iterator neither needs to query twice just to get headerClass, nor needs to short twice.
Merge pull request #9 from hlfcoding/patch-4

Optimise header setup