case insensitive header comparisons fixes #220 and #275
formatting