PEP8 all the things! Plus removed empty values when building the header
PEP8 and test case for dropping empty values