Cleaning up the header generation code.