This improves header handling.

Fixes issue #29.
Merge pull request #36 from dylan-foundry/fix-headers

This improves header handling.